Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatryk Andrzejewski <p.andrzejewski@clearcode.cc>2014-09-19 16:29:38 +0400
committerPatryk Andrzejewski <p.andrzejewski@clearcode.cc>2014-09-19 16:29:38 +0400
commit2a37303f88912f344668080aeaf89177400c8434 (patch)
tree9a4ad8cbde5ae9eb00d0575b10b59d64a896c823 /plugins/UserSettings/functions.php
parentc70befbb8d41f500565d06e521a8651ff52be3c4 (diff)
feedback
Diffstat (limited to 'plugins/UserSettings/functions.php')
-rwxr-xr-xplugins/UserSettings/functions.php21
1 files changed, 9 insertions, 12 deletions
diff --git a/plugins/UserSettings/functions.php b/plugins/UserSettings/functions.php
index 7372532b54..5af0c8d9f6 100755
--- a/plugins/UserSettings/functions.php
+++ b/plugins/UserSettings/functions.php
@@ -276,23 +276,20 @@ function languageTranslateWithCode($label)
$ex = explode('-', $label);
$lang = languageTranslate($ex[0]);
- if (count($ex) == 2)
- {
+ if (count($ex) == 2 && $ex[0] != $ex[1]) {
$countryKey = 'UserCountry_country_' . $ex[1];
- }
- else
- {
- $countryKey = 'UserCountry_country_' . $label;
- $label = $label . '-' . $label;
- }
+ $country = Piwik::translate($countryKey);
- $country = Piwik::translate($countryKey);
+ if ($country == $countryKey) {
+ return sprintf("%s (%s)", $lang, $ex[0]);
+ }
- if ($country == $countryKey) {
- $country = Piwik::translate('General_Unknown');
+ return sprintf("%s - %s (%s)", $lang, $country, $label);
+
+ } else {
+ return sprintf("%s (%s)", $lang, $ex[0]);
}
- return sprintf("%s - %s - (%s)", $lang, $country, $label);
}
/**