summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2022-09-27 18:53:03 -0400
committerBrian Evans <grknight@gentoo.org>2022-09-27 19:02:02 -0400
commit5ca8d30155e11d97b20f79acec40632c2e06fcd5 (patch)
tree7531fb116791f8328c0bb0cabe42265ca67e6df9 /MLEB/cldr/CldrCurrencies.php
parentMerge branch 'master' into wikitest (diff)
downloadextensions-1.35.2.tar.gz
extensions-1.35.2.tar.bz2
extensions-1.35.2.zip
Update MLEB to 2021.12v1.35.2
This is the final version for MW 1.35 Signed-off-by: Brian Evans <grknight@gentoo.org>
Diffstat (limited to 'MLEB/cldr/CldrCurrencies.php')
-rw-r--r--MLEB/cldr/CldrCurrencies.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/MLEB/cldr/CldrCurrencies.php b/MLEB/cldr/CldrCurrencies.php
index 694202da..2ce2af0e 100644
--- a/MLEB/cldr/CldrCurrencies.php
+++ b/MLEB/cldr/CldrCurrencies.php
@@ -23,12 +23,12 @@ class CldrCurrency {
$value = [];
switch ( $data ) {
- case 'symbols' :
+ case 'symbols':
$filename = __DIR__ . '/CldrCurrency/Symbols.php';
$value['symbols'] = 'currencySymbols';
break;
- case 'fractions' :
- case 'locale' :
+ case 'fractions':
+ case 'locale':
$filename = __DIR__ . '/CldrSupplemental/Supplemental.php';
$value['fractions'] = 'currencyFractions';
$value['locale'] = 'localeCurrencies';
@@ -75,7 +75,7 @@ class CldrCurrency {
}
// get the default (either the 'root' language, or the original ISO code)
- $default = self::$cache['symbols'][$currency_code]['root'] ?? $currency_code;
+ $default = self::$cache['symbols'][$currency_code][CLDRParser::LANGUAGE_DEFAULT] ?? $currency_code;
// language code might or might not exist
if ( array_key_exists( $language_code, self::$cache['symbols'][$currency_code] ) ) {
@@ -92,7 +92,7 @@ class CldrCurrency {
'DEFAULT',
self::$cache['symbols'][$currency_code][$language_code]
) ) {
- return self::$cache['symbols'][$currency_code][$language_code]['DEFAULT'];
+ return self::$cache['symbols'][$currency_code][$language_code][CLDRParser::LOCALITY_DEFAULT];
} else {
return $default;
}
@@ -139,7 +139,7 @@ class CldrCurrency {
if ( array_key_exists( $currency_code, self::$cache['fractions'] ) ) {
return (int)self::$cache['fractions'][$currency_code]['digits'];
} else {
- return (int)self::$cache['fractions']['DEFAULT']['digits'];
+ return (int)self::$cache['fractions'][CLDRParser::CURRENCY_DEFAULT]['digits'];
}
}
}