summaryrefslogtreecommitdiffstats
path: root/util/locale_database/qlocalexml.py
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2023-07-27 18:57:40 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2023-08-01 15:35:57 +0200
commit37c5a9f20b9973a0f29c05965e243622f5596da0 (patch)
tree64a51e392c36536caeb53735902cbe33ef285f79 /util/locale_database/qlocalexml.py
parent4e23da908621d3bc02e8f0a661ee0946f9a124f6 (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. TheTest for whether to report used the non-existend .territories attribute by mistake for .__territories Change-Id: I29e9d9f8f34883d7c3a5ac15470d9e7a0366e3db Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Diffstat (limited to 'util/locale_database/qlocalexml.py')
-rw-r--r--util/locale_database/qlocalexml.py6
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):