diff options
author | Mario <mario@mariovavti.com> | 2020-11-05 08:46:42 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-11-05 08:46:42 +0000 |
commit | bafbf0416462c6f18c3fb6c8c06a063c8d6fdae6 (patch) | |
tree | 8929845be585b09d0f420621281c5531e1efad3e /vendor/commerceguys/intl/scripts/generate_locale_data.php | |
parent | 6f93d9848c43019d43ea76c27d42d657ba031cd7 (diff) | |
parent | fdefa101d84dc2a9424eaedbdb003a4c30ec5d01 (diff) | |
download | volse-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.php | 10 |
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"; |