qt6-bb10/util/locale_database
Edward Welbourne 42e4e1816a Fix handling of am/pm indicators in mapping from CLDR to Qt formats
Both qlocale_mac.mm and dateconverter.py were mapping the CLDR am/pm
indicator, 'a', to the Qt format token 'AP', forcing the indicator to
uppercase. The LDML spec [0] says:

    May be upper or lowercase depending on the locale and other
    options.

[0] https://www.unicode.org/reports/tr35/tr35-68/tr35-dates.html#Date_Field_Symbol_Table
We don't support the "other options" mentioned, but we can at least
(since 6.3) preserve the the locale-appropriate case, instead of
forcing upper-case. As such, this change is a follow-up to
commit 4641ff0f6a

Changes locale data, as expected, to use "Ap" in place of "AP" in
various formats in the time_format_data[] array.

[ChangeLog][QtCore][QLocale] Where CLDR specifies an am/pm indicator,
the case of the CLDR-supplied indicator is used, where previously
QLocale forced it to upper-case.

Change-Id: Iee7d55e6f3c78372659668b9798c8e24a1fa8982
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-19 13:39:41 +02:00
..
testlocales Preparations to deprecate QItemDelegate 2023-10-05 21:08:45 +02:00
README
cldr.py Minor tidy-up of CldrAccess.__enumMap: revise comment, modernize code 2024-02-13 15:58:43 +01:00
cldr2qlocalexml.py Prepare to support taking CLDR data from its github upstream 2024-01-19 15:38:25 +01:00
cldr2qtimezone.py Move QTimeZone's CLDR-derived data into a namespace 2024-02-08 15:40:04 +01:00
dateconverter.py Fix handling of am/pm indicators in mapping from CLDR to Qt formats 2024-04-19 13:39:41 +02:00
enumdata.py Rework enumdata.py's comments 2024-03-18 14:59:26 +01:00
formattags.txt
iso639_3.py Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
ldml.py Move LocaleScanner's INHERIT check from find upstream to __find 2024-04-19 13:39:40 +02: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.