diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2023-07-27 18:57:40 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2023-08-04 09:45:15 +0200 |
commit | a5756053b3463fe009e97e4fbf81eedeae5d277b (patch) | |
tree | 07f74655787cb48f70c857717fdf272fa4e3afbd /util | |
parent | a8c5512798161722ab3be1115404369f6b82118e (diff) |
Fix typos in QLocaleXmlWriter
The script and territory to exclude from reports about unused ones
were swapped, so we excluded a territory from the script list (which
didn't contain it anyway) and vice versa.
The test for whether to report used the non-existent .territories
attribute by mistake for .__territories
Change-Id: I29e9d9f8f34883d7c3a5ac15470d9e7a0366e3db
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
(cherry picked from commit 37c5a9f20b9973a0f29c05965e243622f5596da0)
Diffstat (limited to 'util')
-rw-r--r-- | util/locale_database/qlocalexml.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/util/locale_database/qlocalexml.py b/util/locale_database/qlocalexml.py index a3e2fb9d2b..e63e8d4c98 100644 --- a/util/locale_database/qlocalexml.py +++ b/util/locale_database/qlocalexml.py @@ -324,9 +324,9 @@ class QLocaleXmlWriter (object): self.__languages = set(p[1] for p in language_map.values() if not p[1].isspace()) self.__scripts = set(p[1] for p in script_map.values() - if p[1] != 'ZZ') + if p[1] != 'Zzzz') self.__territories = set(p[1] for p in territory_map.values() - if p[1] != 'Zzzz') + if p[1] != 'ZZ') def likelySubTags(self, entries): self.__openTag('likelySubtags') @@ -360,7 +360,7 @@ class QLocaleXmlWriter (object): self.__write('</localeDatabase>') self.__rawOutput = self.__complain - if self.__languages or self.__scripts or self.territories: + if self.__languages or self.__scripts or self.__territories: grumble('Some enum members are unused, corresponding to these tags:\n') import textwrap def kvetch(kind, seq, g = grumble, w = textwrap.wrap): |