diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2023-07-27 17:24:01 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2023-08-01 15:36:06 +0200 |
commit | 615047e98f1ef2a6d1d1d1830c74d1d02dcec336 (patch) | |
tree | 05aa4c384962c3d0925b23736344b218634ed761 /util/locale_database/cldr.py | |
parent | 37c5a9f20b9973a0f29c05965e243622f5596da0 (diff) |
Ignore parentLocales nodes with component="..." attributes
From CLDR v43, "The parentLocale elements now have an optional
component attribute, with a value of segmentations or
collations. These should be used for inheritance for those respective
elements." Since we aren't extracting collation or segmentation data
for the present, omit these elements from the scan for parentLocale
information.
Task-number: QTBUG-111550
Change-Id: I42871929f539c1852471812801953f2fc8be0e8a
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Diffstat (limited to 'util/locale_database/cldr.py')
-rw-r--r-- | util/locale_database/cldr.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/locale_database/cldr.py b/util/locale_database/cldr.py index 91b46d6a01..78ed7a70a0 100644 --- a/util/locale_database/cldr.py +++ b/util/locale_database/cldr.py @@ -708,7 +708,8 @@ enumdata.py (keeping the old name as an alias): def __parentLocale(self, cache = {}): # see http://www.unicode.org/reports/tr35/#Parent_Locales if not cache: - for tag, attrs in self.__supplementalData.find('parentLocales'): + for tag, attrs in self.__supplementalData.find('parentLocales', + ('component',)): parent = attrs.get('parent', '') for child in attrs['locales'].split(): cache[child] = parent |