qt6-bb10/util/locale_database
Mate Barany 9709c4f842 Use replace instead of rename in localetools.py
On Unix, if target exists and it is a file, rename silently replaces it
if the user has permission. However, on Windows, if the target exists,
FileExistError will be raised.

With replace, if target points to an existing file or empty directory,
it will be unconditionally replaced.

Change-Id: I2774152fec78a00c4ca6c9d1b927e503df2f2e84
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit eff8e6b885dfa3f26523ca39164725b4932c31bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-09-18 09:51:00 +00:00
..
testlocales Include relevant Unicode Inc. copyright line in generated data files 2024-08-31 08:56:42 +00:00
README Add a note to README about encoding errors on windows 2024-09-18 09:50:58 +00:00
cldr.py Fix typo in cldr.py 2024-09-18 09:50:55 +00:00
cldr2qlocalexml.py Derive C locale data from en_US, overriding minor details 2024-06-02 15:25:52 +02:00
dateconverter.py Improve fidelity of approximation to CLDR zone representations 2024-04-22 11:58:25 +02:00
enumdata.py Update CLDR to v45, adding language Kuvi 2024-07-17 12:57:30 +02:00
formattags.txt Rename util/locale_database/ to include the e that was missing 2019-05-20 20:42:10 +02:00
iso639_3.py Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
ldml.py Add assorted notes and suggestions in util/locale_database/ 2024-06-02 15:25:21 +02:00
localetools.py Use replace instead of rename in localetools.py 2024-09-18 09:51:00 +00:00
qlocalexml.py Update C Locale constructor to match others on ids and codes 2024-06-02 15:26:05 +02:00
qlocalexml.rnc Integrate timezone data into the CLDR-via-QLocaleXml pipeline 2024-06-02 15:25:27 +02:00
qlocalexml2cpp.py qlocalexml2cpp.py: rework StringData handling of bit-sizes 2024-06-02 15:26:17 +02:00
zonedata.py Simplify UTC offset ID data by computing the offsets 2024-06-02 15:25:13 +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,
time/q*calendar_data_p.h and time/qtimezone*_data_p.h under
src/corelib/). See enumdata.py and zonedata.py for when and how to
update the data they provide. You shall definitely need to pass
--no-verify or -n to git commit for these changes.

NOTE: on Windows it is advisable to set the environment variable
PYTHONUTF8 to 1 before running the scripts to avoid encoding errors.