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
path: root/core/Intl
diff options
context:
space:
mode:
authorChristian Schmidt <github@chsc.dk>2018-07-27 04:46:58 +0300
committerdiosmosis <diosmosis@users.noreply.github.com>2018-07-27 04:46:58 +0300
commit09c4fcc56a0e86728c3e37c94131312bc4cd703c (patch)
tree0dd8ba18e95018e4d5a6252e65691bd81ac722cc /core/Intl
parent70d1b446778909b3beda16ff4dc50fdd968d63ea (diff)
Translate currency names (#13068)
* Translate currency names * Update tests * Fix more tests * Use plural form in config key name * Update screenshots
Diffstat (limited to 'core/Intl')
-rw-r--r--core/Intl/Data/Provider/CurrencyDataProvider.php7
-rw-r--r--core/Intl/Data/Resources/currencies.php14
2 files changed, 12 insertions, 9 deletions
diff --git a/core/Intl/Data/Provider/CurrencyDataProvider.php b/core/Intl/Data/Provider/CurrencyDataProvider.php
index ae73a5bce0..1ec3e901d1 100644
--- a/core/Intl/Data/Provider/CurrencyDataProvider.php
+++ b/core/Intl/Data/Provider/CurrencyDataProvider.php
@@ -8,6 +8,8 @@
namespace Piwik\Intl\Data\Provider;
+use Piwik\Config;
+
/**
* Provides currency data.
*/
@@ -26,6 +28,11 @@ class CurrencyDataProvider
{
if ($this->currencyList === null) {
$this->currencyList = require __DIR__ . '/../Resources/currencies.php';
+
+ $custom = Config::getInstance()->General['currencies'];
+ foreach ($custom as $code => $name) {
+ $this->currencyList[$code] = array($code, $name);
+ }
}
return $this->currencyList;
diff --git a/core/Intl/Data/Resources/currencies.php b/core/Intl/Data/Resources/currencies.php
index 6190c3108f..8e0e89b149 100644
--- a/core/Intl/Data/Resources/currencies.php
+++ b/core/Intl/Data/Resources/currencies.php
@@ -34,10 +34,9 @@ return array(
'BHD' => array('.د.ب', 'Bahraini dinar'),
'BDT' => array('৳', 'Bangladeshi taka'),
'BBD' => array('$', 'Barbadian dollar'),
- 'BYR' => array('Br', 'Belarusian ruble'),
+ 'BYN' => array('Br', 'Belarusian ruble'),
'BZD' => array('$', 'Belize dollar'),
'BMD' => array('$', 'Bermudian dollar'),
- 'BTC' => array('BTC', 'Bitcoin'),
'BTN' => array('Nu.', 'Bhutanese ngultrum'),
'BOB' => array('Bs.', 'Bolivian boliviano'),
'BAM' => array('KM', 'Bosnia Herzegovina mark'),
@@ -62,7 +61,6 @@ return array(
'XPF' => array('F', 'CFP franc'),
'CUC' => array('$', 'Cuban convertible peso'),
'CUP' => array('$', 'Cuban peso'),
- 'CMG' => array('ƒ', 'Curaçao and Sint Maarten guilder'),
'CZK' => array('Kč', 'Czech koruna'),
'DKK' => array('kr', 'Danish krone'),
'DJF' => array('Fr', 'Djiboutian franc'),
@@ -103,14 +101,13 @@ return array(
'LSL' => array('L', 'Lesotho loti'),
'LRD' => array('$', 'Liberian dollar'),
'LYD' => array('ل.د', 'Libyan dinar'),
- 'LTL' => array('Lt', 'Lithuanian litas'),
'MOP' => array('P', 'Macanese pataca'),
'MKD' => array('ден', 'Macedonian denar'),
'MGA' => array('Ar', 'Malagasy ariary'),
'MWK' => array('MK', 'Malawian kwacha'),
'MYR' => array('RM', 'Malaysian ringgit'),
'MVR' => array('ރ.', 'Maldivian rufiyaa'),
- 'MRO' => array('UM', 'Mauritanian ouguiya'),
+ 'MRU' => array('UM', 'Mauritanian ouguiya'),
'MUR' => array('₨', 'Mauritian rupee'),
'MXN' => array('$', 'Mexican peso'),
'MDL' => array('L', 'Moldovan leu'),
@@ -140,9 +137,9 @@ return array(
'RUB' => array('руб.', 'Russian ruble'),
'RWF' => array('Fr', 'Rwandan franc'),
'SHP' => array('£', 'Saint Helena pound'),
- 'SVC' => array('₡', 'Salvadoran colón'),
+ 'SSP' => array('£', 'South Sudanese pound'),
'WST' => array('T', 'Samoan tala'),
- 'STD' => array('Db', 'São Tomé and Príncipe dobra'),
+ 'STN' => array('Db', 'São Tomé and Príncipe dobra'),
'SAR' => array('ر.س', 'Saudi riyal'),
'RSD' => array('дин. or din.', 'Serbian dinar'),
'SCR' => array('₨', 'Seychellois rupee'),
@@ -166,7 +163,7 @@ return array(
'TTD' => array('$', 'Trinidad and Tobago dollar'),
'TND' => array('د.ت', 'Tunisian dinar'),
'TRY' => array('TL', 'Turkish lira'),
- 'TMM' => array('m', 'Turkmenistani manat'),
+ 'TMT' => array('m', 'Turkmenistani manat'),
'UGX' => array('Sh', 'Ugandan shilling'),
'UAH' => array('₴', 'Ukrainian hryvnia'),
'AED' => array('د.إ', 'United Arab Emirates dirham'),
@@ -179,5 +176,4 @@ return array(
'XOF' => array('Fr', 'West African CFA franc'),
'YER' => array('﷼', 'Yemeni rial'),
'ZMW' => array('ZK', 'Zambian kwacha'),
- 'ZWL' => array('$', 'Zimbabwean dollar'),
);