aboutsummaryrefslogtreecommitdiffstats
path: root/en
diff options
context:
space:
mode:
authorfilip <filip.komar@gmail.com>2016-05-15 11:37:40 +0200
committerfilip <filip.komar@gmail.com>2016-05-15 11:37:40 +0200
commit8710f94c9f038c81e9ad89a0a2a20cc693247a96 (patch)
treee092a79334fde2e63d5fd076ce0399e1af159d64 /en
parent7ad5d3aba6ce9c60d231948b523fb0a9f68bb190 (diff)
downloadwww-8710f94c9f038c81e9ad89a0a2a20cc693247a96.tar
www-8710f94c9f038c81e9ad89a0a2a20cc693247a96.tar.gz
www-8710f94c9f038c81e9ad89a0a2a20cc693247a96.tar.bz2
www-8710f94c9f038c81e9ad89a0a2a20cc693247a96.tar.xz
www-8710f94c9f038c81e9ad89a0a2a20cc693247a96.zip
improve visual representation of countries and continents on DL page
Diffstat (limited to 'en')
-rw-r--r--en/downloads/get/index.php26
-rw-r--r--en/downloads/get/lib.php14
2 files changed, 30 insertions, 10 deletions
diff --git a/en/downloads/get/index.php b/en/downloads/get/index.php
index b121e3407..21e9bed86 100644
--- a/en/downloads/get/index.php
+++ b/en/downloads/get/index.php
@@ -131,12 +131,19 @@ try {
}
// Feedback about current mirror location + trigger for alt mirrors.
+ if (array_key_exists($one_mirror['country'], $countries)) {
+ $mirrors_country_name = $countries[$one_mirror['country']];
+ } else if (array_key_exists($one_mirror['country'], MGA_Geoip::$MGA_COUNTRY_CODE_TO_COUNTRY_NAME)) {
+ $mirrors_country_name = MGA_Geoip::$MGA_COUNTRY_CODE_TO_COUNTRY_NAME[$one_mirror['country']];
+ } else {
+ $mirrors_country_name = $one_mirror['country'];
+ }
$dl2_mirror_alt = sprintf(
_r('This <a href="%s">%s</a> download mirror is located in %s (%s).'),
$one_mirror['mirror_url'],
$one_mirror['mirror_host'],
- rewrite_city($one_mirror['city']) . ', ' . $countries[$one_mirror['country']],
- $one_mirror['country']
+ rewrite_city($one_mirror['city']),
+ $mirrors_country_name
)
. ' ' . _r('If it does not work well for you, <a href="#om" id="other_mirrors_btn">check out these other mirrors</a>.');
@@ -233,9 +240,22 @@ if (array_key_exists('sha512', $product)) {
</div>
<?php endif; ?>
<p><?php
+ if (array_key_exists($_SESSION['country'], $countries)) {
+ $country_name = $countries[$_SESSION['country']];
+ } else if (array_key_exists($_SESSION['country'], MGA_Geoip::$MGA_COUNTRY_CODE_TO_COUNTRY_NAME)) {
+ $country_name = MGA_Geoip::$MGA_COUNTRY_CODE_TO_COUNTRY_NAME[$_SESSION['country']];
+ } else {
+ $country_name = $_SESSION['country'];
+ }
+
+ if (array_key_exists($_SESSION['continent'], MGA_Geoip::$MGA_CONTINENT_CODE_TO_CONTINENT_NAME)) {
+ $continent_name = MGA_Geoip::$MGA_CONTINENT_CODE_TO_CONTINENT_NAME[$_SESSION['continent']];
+ } else {
+ $continent_name = $_SESSION['continent'];
+ }
echo sprintf(
_r('Your IP address is %s and you seem to be in %s, %s.'),
- $_SESSION['ip'], $_SESSION['country'], $_SESSION['continent']
+ $_SESSION['ip'], $country_name, $continent_name
);
?></p>
</div>
diff --git a/en/downloads/get/lib.php b/en/downloads/get/lib.php
index c51515115..65baa10a3 100644
--- a/en/downloads/get/lib.php
+++ b/en/downloads/get/lib.php
@@ -15,12 +15,12 @@ $countries = array(
'AR' => 'Argentina',
'AU' => 'Australia',
'BE' => 'Belgique',
- 'BG' => 'България (Bulgaria)',
+ 'BG' => 'България - Bulgaria',
'BR' => 'Brasil',
- 'BY' => 'Беларусь (Belarus)', // Belarus
+ 'BY' => 'Беларусь - Belarus',
'CA' => 'Canada',
'CH' => 'Switzerland',
- 'CN' => '中国 (China)', // China
+ 'CN' => '中国 - China',
'CZ' => 'Česko', // Czechia
'DE' => 'Deutschland',
'DK' => 'Danmark',
@@ -28,19 +28,19 @@ $countries = array(
'ES' => 'España',
'FR' => 'France',
'GB' => 'Great Britain',
- 'GR' => 'Ελλάδα (Greece)', // Greece
+ 'GR' => 'Ελλάδα - Greece',
'GT' => 'Guatemala',
'ID' => 'Indonesia',
'IT' => 'Italia',
- 'JP' => '日本国 (Japan)', // Japan
+ 'JP' => '日本国 - Japan',
'NC' => 'Nouvelle-Calédonie',
'NL' => 'Nederlands',
'PH' => 'Philipines',
'PL' => 'Polska',
- 'RU' => 'Россия',
+ 'RU' => 'Россия - Russia',
'SE' => 'Sverige',
'TR' => 'Türkiye',
- 'TW' => '臺灣 (Taiwan)', // Taiwan
+ 'TW' => '臺灣 - Taiwan',
'UA' => 'Ukraine',
'UK' => 'the UK',
'US' => 'the USA',