From 8710f94c9f038c81e9ad89a0a2a20cc693247a96 Mon Sep 17 00:00:00 2001 From: filip Date: Sun, 15 May 2016 11:37:40 +0200 Subject: improve visual representation of countries and continents on DL page --- en/downloads/get/index.php | 26 +++++++++++++++++++++++--- en/downloads/get/lib.php | 14 +++++++------- 2 files changed, 30 insertions(+), 10 deletions(-) (limited to 'en/downloads') 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 %s 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, check out these other mirrors.'); @@ -233,9 +240,22 @@ if (array_key_exists('sha512', $product)) {

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', -- cgit v1.2.1