diff options
author | Mario <mario@mariovavti.com> | 2020-06-15 07:01:35 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2020-06-15 07:01:35 +0000 |
commit | 63a6b4a162041d8381c9e58c641b44ec5120011a (patch) | |
tree | 73386c5a5349ed5eec8bd165f68d47a6b60c6639 /vendor/commerceguys/intl/scripts/generate_locale_data.php | |
parent | 7270da6a28f836f94f6d98557df9532e587c3646 (diff) | |
download | volse-hubzilla-63a6b4a162041d8381c9e58c641b44ec5120011a.tar.gz volse-hubzilla-63a6b4a162041d8381c9e58c641b44ec5120011a.tar.bz2 volse-hubzilla-63a6b4a162041d8381c9e58c641b44ec5120011a.zip |
composer update commerceguys/intl
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"; |