qt6-bb10/util/locale_database
Edward Welbourne 4b2eb26bf9 Fix ordering of Windows timezones
The list is meant to be sorted in increasing order, requiring
"<anything> (Mexico)" to appear after "<anything>" but in two out of
four cases such pairs were in the wrong order. China sorts after
Chatham Island and lexical sorting of numbers doesn't match sorting by
numeric value.

Assert the expected ordering. (The more important check needs a
QBAV::compare(), which isn't constexpr, so we can't static_assert.)
Later commits shall use binary chop exploiting this ordering. The
assertion failed without the rest of this change.

Also improve the comments describing the data tables these searches
check and the types of their entries. Some were inaccurate, others
merely unclear. Likewise, comment the sorting expectations in the
python code that generates the tables.

Change-Id: I640a3cca8f820c5fd5939a2fe5feb96b04407335
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-02-01 21:50:50 +01:00
..
testlocales Preparations to deprecate QItemDelegate 2023-10-05 21:08:45 +02:00
README Update CLDR to v37, adding Nigerian Pidgin as a new language 2020-10-26 15:28:59 +02:00
cldr.py Use CLDR's names in QLocale::*ToName() for language, script, territory 2023-08-09 17:53:42 +02:00
cldr2qlocalexml.py Prepare to support taking CLDR data from its github upstream 2024-01-19 15:38:25 +01:00
cldr2qtimezone.py Fix ordering of Windows timezones 2024-02-01 21:50:50 +01:00
dateconverter.py Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
enumdata.py Change enumdata.py names so comments read more naturally 2023-08-09 17:53:45 +02:00
formattags.txt
iso639_3.py Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
ldml.py Move special-case LDML value to a module global 2024-01-29 15:14:43 +01:00
localetools.py Use CLDR's names in QLocale::*ToName() for language, script, territory 2023-08-09 17:53:42 +02:00
qlocalexml.py Use CLDR's names in QLocale::*ToName() for language, script, territory 2023-08-09 17:53:42 +02:00
qlocalexml.rnc Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
qlocalexml2cpp.py Use CLDR's names in QLocale::*ToName() for language, script, territory 2023-08-09 17:53:42 +02:00

README

locale_database is used to generate qlocale data from CLDR.

CLDR is the Common Locale Data Repository, a database for localized
data (like date formats, country names etc).  It is provided by the
Unicode consortium.

See cldr2qlocalexml.py for how to run it and qlocalexml2cpp.py to
update the locale data tables (principally text/qlocale_data_p.h and
time/q*calendar_data_p.h under src/corelib/). See enumdata.py for when
and how to update the data it provides. You shall definitely need to
pass --no-verify or -n to git commit for these changes.

See cldr2qtimezone.py on how to update tables of Windows-specific
names for zones and UTC-offset zone names.