Update CLDR to v46

New languages added with v46
- Kara-Kalpak
- Swampy Cree

Several new Chinese-language locales have been added, including one
using Latin script, which invalidated some prior QLocale tests, which
have been adjusted to fit.

Some obsolete time-zone identifiers are now treated as deprecated
aliases. These have lost their AnyTerritory association, implying
changes to QTimeZone tests.

Many redundant likely sub-tag rules for unspecified language have been
dropped, in favor of simpler rules.

[ChangeLog][Third-Party Code] Updated CLDR data, used by QLocale, to
v46.

Task-number: QTBUG-130877
Pick-to: 6.8
Change-Id: I92cf210422c7759dd829a7ca2f845d20e263d25b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit e316276b76b9c3768ca4e19a04d03308ef21fe12)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Mate Barany 2024-11-22 15:12:13 +01:00 committed by Qt Cherry-pick Bot
parent 2101e91465
commit 9413c19cc1
13 changed files with 186261 additions and 173142 deletions

View File

@ -386,6 +386,8 @@ public:
Kangri = 342,
Venetian = 343,
Kuvi = 344,
KaraKalpak = 345,
SwampyCree = 346,
Afan = Oromo,
Bengali = Bangla,
@ -407,7 +409,7 @@ public:
Uigur = Uyghur,
Walamo = Wolaytta,
LastLanguage = Kuvi
LastLanguage = SwampyCree
};
enum Script : ushort {

View File

@ -53,7 +53,7 @@
\section1 Appropriateness of the formats
QLocale's data is based on Common Locale Data Repository v45.
QLocale's data is based on Common Locale Data Repository v46.
This data is published by The Unicode Consortium, who aim to follow
customary, common use by writers of each language, in each script, in each
@ -251,6 +251,7 @@
\value [since 6.7] Kangri
\value Kannada
\value Kanuri
\value [since 6.9] KaraKalpak
\value Kashmiri
\value Kazakh
\value [since 5.5] Kenyang
@ -408,6 +409,7 @@
\value [since 5.3] StandardMoroccanTamazight
\value Sundanese
\value Swahili
\value [since 6.9] SwampyCree
\value Swati
\value Swedish
\value SwissGerman

File diff suppressed because it is too large Load Diff

View File

@ -41,7 +41,7 @@
world's languages, with the largest and most extensive standard repository of locale data
available.",
"Homepage": "https://cldr.unicode.org/",
"Version": "v45",
"Version": "v46",
"License": "Unicode License v3",
"LicenseId": "Unicode-3.0",
"Copyright": "Copyright (C) 2004-2023 Unicode, Inc."

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -307,8 +307,8 @@ void tst_QLocale::ctor_data()
<< QLocale::lang << QLocale::text << QLocale::land \
<< QLocale::lang << QLocale::fixed << QLocale::land
FIXTEXT("zh_Latn_CN", Chinese, LatinScript, China, SimplifiedHanScript);
FIXTEXT("zh_Latn_TW", Chinese, LatinScript, Taiwan, TraditionalHanScript);
FIXTEXT("zh_Taml_CN", Chinese, TamilScript, China, SimplifiedHanScript);
FIXTEXT("zh_Taml_TW", Chinese, TamilScript, Taiwan, TraditionalHanScript);
#undef FIXTEXT
// No exact match, preserve language:
@ -318,7 +318,7 @@ void tst_QLocale::ctor_data()
<< QLocale::lang << QLocale::fixtext << QLocale::fixland
KEEPLANG("zh_US", Chinese, AnyScript, UnitedStates, SimplifiedHanScript, China);
KEEPLANG("zh_Latn_US", Chinese, LatinScript, UnitedStates, SimplifiedHanScript, China);
KEEPLANG("zh_Taml_US", Chinese, TamilScript, UnitedStates, SimplifiedHanScript, China);
#undef KEEPLANG
// Only territory - likely subtags imply language and script:

View File

@ -1074,7 +1074,6 @@ void tst_QTimeZone::windowsId()
USA "America/Chicago America/Indiana/Knox America/Indiana/Tell_City America/Menominee"
"America/North_Dakota/Beulah America/North_Dakota/Center"
"America/North_Dakota/New_Salem"
AnyTerritory "CST6CDT"
*/
QCOMPARE(QTimeZone::ianaIdToWindowsId("America/Chicago"),
QByteArray("Central Standard Time"));
@ -1094,7 +1093,7 @@ void tst_QTimeZone::windowsId()
QCOMPARE(QTimeZone::windowsIdToDefaultIanaId("Central Standard Time", QLocale::Canada),
QByteArray("America/Winnipeg"));
QCOMPARE(QTimeZone::windowsIdToDefaultIanaId("Central Standard Time", QLocale::AnyTerritory),
QByteArray("CST6CDT"));
QByteArray());
QCOMPARE(QTimeZone::windowsIdToDefaultIanaId(QByteArray()), QByteArray());
{
@ -1104,7 +1103,7 @@ void tst_QTimeZone::windowsId()
"America/Matamoros", "America/Menominee", "America/North_Dakota/Beulah",
"America/North_Dakota/Center", "America/North_Dakota/New_Salem",
"America/Ojinaga", "America/Rankin_Inlet", "America/Resolute",
"America/Winnipeg", "CST6CDT"
"America/Winnipeg"
};
QCOMPARE(QTimeZone::windowsIdToIanaIds("Central Standard Time"), list);
}
@ -1140,7 +1139,7 @@ void tst_QTimeZone::windowsId()
list);
}
{
const QList<QByteArray> list = { "CST6CDT" };
const QList<QByteArray> list;
QCOMPARE(QTimeZone::windowsIdToIanaIds("Central Standard Time", QLocale::AnyTerritory),
list);
}

View File

@ -408,10 +408,13 @@ language_map = {
343: ("Venetian", "vec"),
# added in CLDR v45
344: ("Kuvi", "kxv"),
# added in CLDR v46
345: ("Kara-Kalpak", "kaa"),
346: ("Swampy Cree", "csw"),
}
# Don't add languages just because they exist; check CLDR does provide
# substantial data for locales using it; and check, once added, they
# don't show up in cldr2qlocalexmo.py's unused listing. Do also check
# don't show up in cldr2qlocalexml.py's unused listing. Do also check
# the data's draft status; if it's (nearly) all unconfirmed, leave it.
language_aliases = {

View File

@ -19,8 +19,8 @@ struct LocaleListItem
// GENERATED PART STARTS HERE
/*
This part of the file was generated on 2024-05-31 from the
Common Locale Data Repository v45
This part of the file was generated on 2024-12-05 from the
Common Locale Data Repository v46
http://www.unicode.org/cldr/
@ -118,6 +118,7 @@ const LocaleListItem g_locale_list[] = {
{ 58, 50 }, // Chinese/China
{ 58, 107 }, // Chinese/Hong Kong
{ 58, 139 }, // Chinese/Macao
{ 58, 143 }, // Chinese/Malaysia
{ 58, 210 }, // Chinese/Singapore
{ 58, 228 }, // Chinese/Taiwan
{ 59, 193 }, // Church/Russia
@ -372,6 +373,7 @@ const LocaleListItem g_locale_list[] = {
{ 130, 110 }, // Kannada/India
{ 132, 110 }, // Kashmiri/India
{ 133, 123 }, // Kazakh/Kazakhstan
{ 133, 50 }, // Kazakh/China
{ 134, 40 }, // Kenyang/Cameroon
{ 135, 39 }, // Khmer/Cambodia
{ 136, 99 }, // Kiche/Guatemala
@ -664,6 +666,8 @@ const LocaleListItem g_locale_list[] = {
{ 342, 110 }, // Kangri/India
{ 343, 117 }, // Venetian/Italy
{ 344, 110 }, // Kuvi/India
{ 345, 251 }, // Kara-Kalpak/Uzbekistan
{ 346, 41 }, // Swampy Cree/Canada
};
// GENERATED PART ENDS HERE