aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/commerceguys/intl/scripts/generate_locale_data.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-11-05 08:46:42 +0000
committerMario <mario@mariovavti.com>2020-11-05 08:46:42 +0000
commitbafbf0416462c6f18c3fb6c8c06a063c8d6fdae6 (patch)
tree8929845be585b09d0f420621281c5531e1efad3e /vendor/commerceguys/intl/scripts/generate_locale_data.php
parent6f93d9848c43019d43ea76c27d42d657ba031cd7 (diff)
parentfdefa101d84dc2a9424eaedbdb003a4c30ec5d01 (diff)
downloadvolse-hubzilla-5.0.tar.gz
volse-hubzilla-5.0.tar.bz2
volse-hubzilla-5.0.zip
Merge branch '5.0RC'5.0
Diffstat (limited to 'vendor/commerceguys/intl/scripts/generate_locale_data.php')
-rw-r--r--vendor/commerceguys/intl/scripts/generate_locale_data.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/vendor/commerceguys/intl/scripts/generate_locale_data.php b/vendor/commerceguys/intl/scripts/generate_locale_data.php
index 4e2b617b8..d1e77b8d8 100644
--- a/vendor/commerceguys/intl/scripts/generate_locale_data.php
+++ b/vendor/commerceguys/intl/scripts/generate_locale_data.php
@@ -4,11 +4,19 @@
* Generates the $parents array for the Locale class.
*/
+require __DIR__ . '/generate_base.php';
+
$parentLocales = __DIR__ . '/assets/cldr-core/supplemental/parentLocales.json';
$parentLocales = json_decode(file_get_contents($parentLocales), true);
$parentLocales = $parentLocales['supplemental']['parentLocales']['parentLocale'];
-$parentLocales = var_export($parentLocales, true) . ';';
+foreach ($parentLocales as $locale => $parentLocale) {
+ $localeParts = explode('-', $locale);
+ if (in_array($localeParts[0], $ignoredLocales)) {
+ unset($parentLocales[$locale]);
+ }
+}
+$parentLocales = var_export($parentLocales, true) . ';';
$export = "<?php\n\n";
$export .= '$parents = ' . str_replace(['array (', ')'], ['[', ']'], $parentLocales);
$export .= "\n";