62 Commits

Author SHA1 Message Date
Edward Welbourne
303863170c QLocale: fix likely subtags to include und -> en_Latn_US
The lack of this was hidden by other rules (redundant with it) until
CLDR v45, but v46 prunes the redundant rules, breaking this. So
include the missing rule and tweak the code that assumed likely
sub-tag rules preserved language, since this one doesn't. Rework the
tail of withLikelySubtagsAdded() to correctly use this rule, now that
we have it. (The prior comment about there being no match-all was
wrong: CLDR did have it, but our data skipped it.) Amended one test
affected by it (when system locale wasn't en_US).

Pick-to: 6.8
Task-number: QTBUG-130877
Change-Id: I2a415b67af4bc8aa6a766bcc1e349ee5bda9f174
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-12-05 14:42:56 +01:00
Edward Welbourne
d0635094d8 QLocaleXML: use XML-safe form to write exemplar city content
Although the other parts of the locale-specific data for zone name
L10n were written using safeInTag() I'd foolishly used plain inTag()
for the exemplar city - which, of course, can also contain crazy stuff
and, it turns out, one of them (albeit this may be a CLDR "whoopsie")
does in fact end in a &lt; (in xnr.xml in v46). So use safeInTag()
there as well and be faithful to CLDR (even if this does turn out to
be an error).

Task-number: QTBUG-130877
Change-Id: Idca22ce689cdd2409c50078498a2badfeecd4de2
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-11-26 16:25:11 +01:00
Mate Barany
bb32299e75 Add type annotations to Locale
Task-number: QTBUG-129564
Pick-to: 6.8
Change-Id: I6fe00162251ffa56c86ba2af98b8f066c9b5f09b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-11-14 00:56:12 +01:00
Mate Barany
3045a08e5e Add type annotations to QLocaleXmlWriter
Also fix the annotation of englishNaming in cldr.py. Spotted it while
annotating __enumTable.

Task-number: QTBUG-129564
Pick-to: 6.8
Change-Id: I93f698b4cf1b5ae90c21fe77330e4f167143a9f3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-11-11 19:33:44 +01:00
Mate Barany
519d3d36c3 Add type annotations to Spacer
Task-number: QTBUG-129564
Pick-to: 6.8
Change-Id: I942d135da630f7ba6641170a1a597b0578aca878
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2024-11-08 02:42:30 +01:00
Mate Barany
feb39b2d03 Add type annotations to QLocaleXmlReader
Task-number: QTBUG-129564
Pick-to: 6.8
Change-Id: I8711152840e6bcb39ff1b1e67ff60b53801f28f0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-11-07 15:16:58 +01:00
Edward Welbourne
cfc80488d1 Simplify QLocaleXmlWriter.__openTag()
The other methods that open a tag, potentially with attributes, all
now share __attrJoin() as the tool to combine the attributes and the
tag.  Do the same in __openTag().

Change-Id: Ib252b5901b9e1459cbb8c5706ff56f1b7b639d3d
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-11-04 19:29:49 +01:00
Mate Barany
d298a706ba Remove unused kids from qlocalexml.py
These are probably remnants of times forgotten.

Task-number: QTBUG-129564
Pick-to: 6.8
Change-Id: Ic3ec03201758801e341253cd82ab8034f7fde9b7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-10-29 22:28:51 +01:00
Edward Welbourne
87af2b81e4 Fix typos in documentation
Change-Id: I04436e3f399b44ca541f9b2868857a7e2adccaf2
Reviewed-by: Jaishree Vyas <jaishree.vyas@qt.io>
2024-10-23 20:34:54 +02:00
Mate Barany
bd475ddf47 Add type annotations to LocaleKeySorter
Task-number: QTBUG-128634
Pick-to: 6.8
Change-Id: I9a4261746cac029b0abf26fbd03b1915a0035147
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2024-10-16 14:20:02 +02:00
Edward Welbourne
ff58e09c8d Fix sorting of timezone alias table to be in case-insensitive order
The lookup into it is done case-insensitively (because user-supplied
names of zones might not have the right case) but I forgot to make the
sorting of the data table case-insensitive in the aliases. Regenerate
data: only the qtimezone*_data_p.h are changed by the reindexing of
zone aliases.

Pick-to: 6.8
Change-Id: Id5e95c245c7ca421a77298f23baefe6b7021a396
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-10-08 20:53:14 +02:00
Edward Welbourne
cf48fc4bc8 Prune timezone L10n data in preparation for writing it to C++ files
The data is very big but much of it is inherited by zones from those
that they map to via likely-subtag reduction, so omit the data where
it coincides with the result of such an inheritance; this shall
complicate the reading of the data, but saves dramatically on its
size, reducing it to "only" c. 2 MiB.

Task-number: QTBUG-115158
Change-Id: I53ff13e29f1f73a551d73d75773373bb90673c8e
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-08-27 19:02:45 +02:00
Edward Welbourne
e97476bb7a Read timezone L10n data from QLocaleXML files
This includes the data in the Locale objects read prior to writing
CLDR data out to relevant files. Actually writing the new data out
shall follow in a later commit.

Task-number: QTBUG-115158
Change-Id: Iaf1466242eb31e66d8ace0bec2ffe7554f66fc10
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-08-20 18:43:05 +02:00
Edward Welbourne
8b456bbd9a Include timezone L10n data in QLocaleXML files
This makes the XML file bigger by a factor of roughly 8, at about 30
MB. Code to read the new data out of it shall follow in a later
commit.

Task-number: QTBUG-115158
Change-Id: I7b9b6abe88be2457fa6cf0e8d7b6a68845136770
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-08-20 18:43:05 +02:00
Edward Welbourne
99285e6060 Include metazone data in QTZP_data_p.h when timezone_locale is active
This also expands the IANA ID table (by about 5 KiB) even when the
feature is inactive, since it includes all IANA zones referenced by
the new data, as well as those for which CLDR has aliases.

Add code to QTZlocale.cpp to use this locale-independent data. This
shall need expanded once locale-dependent data is also available.

Task-number: QTBUG-115158
Change-Id: I720f10cb9ae4cf87dfd8bb66af965a45d49c389a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-07-22 10:41:34 +02:00
Edward Welbourne
85f0e26371 QLocaleXML: improve handling of XML-unsafe element text
Use CDATA when outside ASCII. Share the attribute-packing code for an
open-tag in a static method. In passing, tweak a comment's text.

Change-Id: Ic8b75afc56d537a1a51d13797c737d4bfcc1f910
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-07-15 13:58:43 +02:00
Edward Welbourne
b657036861 QLocaleXML: use attributes in the MS-naming data where practical
The msLandZones/territorycode and msZoneIana/iana can become
attributes of their parent nodes instead of child elements, as
territory codes and IANA IDs are plain ASCII and not unduly long.
In the process, rename territorycode to territory.

Change-Id: Iab9901da01d15abc8c5db7a7d57f925fce8bb521
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-07-15 13:58:43 +02:00
Edward Welbourne
313688e9cf QLocaleXML: use attributes in the zone alias table
Replacing elements for the alias and IANA ID with attribute makes the
table more compact, albeit the ComodRivadavia like is a little long.
(Some existing msLandZones/ianaids lines are longer, though.)

Change-Id: Iab2b55a21857402ad7c863ef33abd241f1d58a8d
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-07-15 13:58:43 +02:00
Edward Welbourne
6705728aba QLocaleXML: use attributes for likely subtag tag parts
This makes the likely subtag part of the file more compact.
Introduces a QLocaleXmlWriter.asTag() for attribute-only elements;
this requires the Spacer to recognize self-closing elements as not
increasing the indent needed.

Change-Id: I1b73b755f9841617a5c002cf624785321e808d0c
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-07-15 13:58:43 +02:00
Edward Welbourne
bd5bb70b7c QLocaleXML: Use enum values instead of names in likely subtag map
The existing naming lists provide the needed mapping and this prepares
the way to move the language, script and territory into the from and
to elements as attributes, saving some file-size. It incidentally
pushes the mapping to enum values upstream and simplifies the
downstream processing.

Change-Id: I8f6d2615d52b14d46d1b795539c71f8afdc310ca
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2024-07-11 15:57:51 +02:00
Edward Welbourne
0a65ded704 QLocaleXML: Omit code forms of locale tags
These were written (and empty for the Any* enum members) but never
read. We, in any case, infer what we need from the enum members, via
the languageList, scriptList and territoryList elements.

In the process, add a comment between the fromXml() and toXml()
methods of Locale to remind those editing the code to also edit the
schema describing the XML.

Change-Id: Ie5e51f594c2636802eefd8159954105718d9af52
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-07-11 15:57:51 +02:00
Edward Welbourne
23dc3b9e08 Move sorting of likely subtag table upstream to QLocaleXmlReader
This means LocaleDataWriter.likelySubtags() now only gets an iterable,
so doesn't know when it's on the last item to skip the comma after it,
but that seems to be acceptable in modern C++.

Change-Id: I9d3bb9af3bb46b28b7a2529e27ab72a72c358503
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-07-08 19:55:20 +02:00
Edward Welbourne
fd786667ab QLocaleXml: unify and shrink language, script and territory lists
The id and code are reliably pure ASCII with no special characters, so
can safely be expressed as attributes. Extend the reader and writer
classes to handle using attributes on a simple text element.

This leaves only the name as text content, so skip the extra
<name>...</name> layer. As the resulting element is inside a *List
element that tells us whether it's a language, script or territory we
don't need to have different elements and can unify them all as simply
a <naming id="..." code="...">...</naming> element. This makes these
sections of the XML file considerably terser, with no change to the
generated data.

Change-Id: Id2e884f1d2713341524549cc49253eb33b5aa487
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-07-08 19:55:20 +02:00
Edward Welbourne
9c8df22147 QLocaleXml: use tabs for indentation
One character instead of four adds up to a lot of saved bytes when a
file has many lines: and the timezone name L10n data is going to add a
lot of lines.

Task-number: QTBUG-115158
Change-Id: I856f3771266a70b7a9ef4078a9b4aecf42315831
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-06-11 15:43:04 +02:00
Edward Welbourne
15019f8667 QLocaleXml: include a <?xml> preamble
Make our encoding explicit and enable more tools to understand what
they're looking at.

Change-Id: I29327364a5eaac51eeda9a4fb3b8e9b7527ca488
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-06-11 15:43:04 +02:00
Edward Welbourne
a9446b1c3b QLocaleXml: include Qt version in the localeDatabase tag
Also move the CLDR version into the tag. The version numbers are plain
ASCII, with no special characters, so can safely be attributes. In
the process, fix a mistake in __openTag()'s handling of attributes;
join with plain space, no comma.

Having the Qt version in the XML makes it possible to assert
compatibility between the Qt version that generated it and the one
that's consuming it.

Change-Id: I6fa6b668b072ff3616955d81af2cffaba5b67250
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-06-11 15:43:04 +02:00
Edward Welbourne
af57b23b62 Move clearing of self-aliases upstream to QLocaleXmlWriter
The duplicate entries just bulked up the intermediate file.
Makes no change to generated data.

Task-number: QTBUG-115158
Change-Id: I6dc0d1f79f8dcf2e46264c6f9d1ae06ff4c91394
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-06-05 16:39:45 +02:00
Edward Welbourne
69aefa4edf Update C Locale constructor to match others on ids and codes
It was setting *_code='0' for the Any* forms of language, script and
territory; this is wrong, the codes for these are all empty or other
special tokens (like 'und', 'Zzzz', 'ZZ'). The IDs for them are zero,
as an int not a string, but were omitted. Also add the variant
details, for all that they're currently unused, for consistency.

This makes no difference to the generated data.

Task-number: QTBUG-115158
Change-Id: I339d1b201e50e2bbc510758ffbbaae0fa02277d4
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-06-02 15:26:05 +02:00
Edward Welbourne
0c809fc3b5 Derive C locale data from en_US, overriding minor details
The qlocalexml.py Locale.C() had to replicate a whole lot of data that
isn't really relevant to how C differs from en_US and every addition
to what we support required further additions to it. So pass the en_US
Locale object to the pseudoconstructor so that C can inherit from it
and only override the parts where we care about the difference.

Hand-code shortening for short Jalali month names, to match Soroush's
original contribution, and include the narrow forms in the hard-coded
data to keep the generated data unchanged (for now). Note some of the
departures from CLDR; we may want to drop these overrides later.

In the process, convert the mapping from keys to locales to
consistently use IDs for all members of the key, instead of using the
(empty) code value for (as yet unused) variant; it now gets ID 0 and
is consistent with returns from codesToIdNames(). This makes life
easier for the code that now has to construct an en_US key.

Task-number: QTBUG-115158
Change-Id: I3d7acb6a4059daec1bba341fcf015c39c7a6803b
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-06-02 15:25:52 +02:00
Edward Welbourne
72a7dddc25 QLocaleXML: Improve documentation, tidy up a bit
Omit parentheses round what python will form into a tuple anyway.
Include trailing commas on last entries of tuples so adding future
entries don't drag the existing line into their diffs.
Let the writer's tag-opener handle attributes, if supplied.
Clean up spacing in some doc-strings.
This is all preparation for further changes, to limit their diffs.

Change-Id: I989ae28bbd235b2af9c1d72467d4741c4f1f20ae
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-06-02 15:25:36 +02:00
Edward Welbourne
9534341654 Integrate timezone data into the CLDR-via-QLocaleXml pipeline
Future work shall need the timezone alias data to be synchronized
between the (expanded) locale-independent timezone data and the
(coming) locale-dependent timezone data. The latter shall need to come
via QLocaleXml, hence the former now needs to, too.

This makes no change to the generated data, aside from changing the
regeneration instructions for qtimezoneprivate_data_p.h, to use the
same scripts as locale data, instead of cldr2qtimezone.py, which is
now removed.

Task-number: QTBUG-115158
Change-Id: I47ddd95f6af1855cbb1f601e9074c13f213cd61c
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-06-02 15:25:27 +02:00
Edward Welbourne
4e23dbb742 Add assorted notes and suggestions in util/locale_database/
Change-Id: I22534943f2c9710d501235672811a861a5fd3aea
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-06-02 15:25:21 +02:00
Edward Welbourne
5f8dc8ea5f Purge an almost-redundant duplicate datetime format conversion
The QLocale XML reader was passing datetime formats through a format
conversion despite the data being converted at the point where we read
it from CLDR. It turns out this was needed because the long date and
time formats in our hard-coded data for the C Locale object used CLDR
format strings, unlike all other Locale objects. Fix those two formats
in the C locale and remove the redundant processing step. This, in
turn, enables the parser to include the date and time formats in its
general handling of most fields that it reads.

This does not result in any change to the generated data QLocale uses
(although it does change the intermediate QLocale XML file).

Task-number: QTBUG-115158
Change-Id: Iaf9da206158043dda2e9e5a3790f009b100e46b4
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-04-30 18:30:15 +02:00
Edward Welbourne
e08ca2c9c8 Fix spacing inconsistencies brought to light by flake8
It has many grumbles about spacing, but at least this code is
currently consistent about its departure from PEP8's spacing rules
(and closer to Qt's) for the present. We can review whether to do a
drastic spacing revolution later.

Change-Id: Ife4e8a5b02b63434bd9c7ac7ba4cbc11b6311f9f
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-04-23 20:51:19 +02:00
Edward Welbourne
cf0ebc9ad3 Fix typo in doc comment for QLocaleXmlWriter.close()
Change-Id: I128ed5e0ebd01a7ed1f3a3049d2b63f1df042562
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2024-04-22 18:56:20 +02:00
Edward Welbourne
f2a2379de8 Use dict comprehensions more in cldr.py and qlocalexml.py
They're a bit more readable than calling dict on a generator.

Change-Id: I3177e31b1f617b80d1cf5d5f83df7036fc0c4c01
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2024-04-22 18:56:20 +02:00
Edward Welbourne
1ae24f8b50 Use CLDR's names in QLocale::*ToName() for language, script, territory
Various comments need to continue using the enumdata.py names, as they
associate data with particular enum members, but we can now correctly
use the en.xml versions of their names when we report them, rather
than the enum-friendly names we use in the code. Since this now means
the data may stray outside plain ASCII - it'll be UTF-8-encoded - this
implies replacing the QLatin1StringView()s of the code that formerly
read this data with QString::fromUtf8().

Fixes: QTBUG-94460
Change-Id: Id3b08875a46af58c0555c3e303b0e15a19441509
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-09 17:53:42 +02:00
Edward Welbourne
743ceb7cc2 Move enum-name-munging from LocaleHeaderWriter to QLocaleXmlReader
The former needed the latter's .dupes to do the job, so can now just
take a method as a tool to do the job instead, letting .dupes become
private. In the process refine the munging to free enumdata.py from
having to capitalize each word in its names. This will, in due course,
let us use more natural forms in various comments. This causes no
change to generted data.

Update enumdata.py's introduction doc, mainly to reflect this but also
fixing the out-of-date names (old *_list have long been *_map) and
adding some details to other paragraphs.

Task-number: QTBUG-94460
Change-Id: If195b2e94a53a495fc4f1f216bed07a910439fa7
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2023-08-09 17:53:26 +02:00
Edward Welbourne
37c5a9f20b 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>
2023-08-01 15:35:57 +02:00
Lucie Gérard
05fc3aef53 Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.

Task-number: QTBUG-67283
Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-05-16 16:37:38 +02:00
Ievgenii Meshcheriakov
41458fafa0 locale_database: Use f-strings in Python code
Replace most uses of str.format() and string arithmetic by f-strings.
This results in more compact code and the code is easier to read
when using an appropriate editor.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: I3409f745b5d0324985cbd5690f5eda8d09b869ca
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-16 19:04:20 +02:00
Ievgenii Meshcheriakov
65a0e04072 locale_database: Add schema for intermediate locale data files
The schema is in RelaxNG Compact syntax. It can be used to validate
files produced by the cldr2qlocalexml.py script and also gives an
overview of the file format.

Change-Id: I344978f2201c5e67e236ab580a12ad33262f33cb
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-16 18:27:28 +02:00
Ievgenii Meshcheriakov
53382b7b07 locale_database: Don't use u prefix for strings in python files
This prefix is useless with Python 3.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: Ic008d53fe506865759e9a5003f439f7ac107b9e6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-15 17:06:53 +02:00
Ievgenii Meshcheriakov
b02d17c5c0 Convert CLDR scripts to Python 3
The convertion is moslty done using 2to3 script with manual cleanup
afterwards.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: I4d33b04e7269c55a83ff2deb876a23a78a89f39d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-15 17:06:53 +02:00
Ievgenii Meshcheriakov
1887c4ecc1 locale_database: Sort lists of unused tags before printing
This way the output is easier to compare between versions.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: If4053c574c4ad200a179b06276bd889f2cb9e1c6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-06 15:17:15 +02:00
Ievgenii Meshcheriakov
0b2646c495 locale_data: Add new line at the end of script output
Output of cldr2qlocalexml.py looks weird without the final new line.

Task-number: QTBUG-83488
Pick-to: 6.2
Change-Id: I5d675e475c57cdc8101887c39052007ba0a19857
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-07-06 14:21:39 +02:00
Edward Welbourne
1a49d7d1e0 Report unused enum members after CLDR data scan
We should at least know when members of QLocale's enums aren't adding
any value, and it may make sense to deprecate the unused ones.

Change-Id: Icf202f81d2a35904c13ccdc202d41985bcb3f2e6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-06-07 17:14:14 +02:00
Edward Welbourne
e51831260a Nomenclature change: s/countr/territor/g in locale scripts
Change the nomenclature used in the scripts and the QLocaleXML data
format to use "territory" and "territories" in place of "country" and
"countries". Does not change the generated source files.

Change-Id: I4b208d8d01ad2bfc70d289fa6551f7e0355df5ef
Reviewed-by: JiDe Zhang <zhangjide@uniontech.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-05-26 18:00:01 +02:00
Edward Welbourne
21e0ef3ccf Rename util/locale_database/enumdata.py's various *_list to *_map
These variables provide mappings, not lists, so name them non-deceptively.

Change-Id: Idf15e78ad73790bc86dd8b9d4f248d1c4f73993c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-05-26 18:00:01 +02:00
Edward Welbourne
181424d9b5 QLocaleXmlWriter.enumData(): move enumdata import to method from caller
The only reason cldr.py imported enumdata was so as to pass what it
imported to writer.enumData(); that method might as well do the import
itself.

Change-Id: Ie77dcd29058f926b8cca4deef35837f30505859f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2021-05-26 18:00:01 +02:00