diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2024-01-09 16:03:55 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2024-02-02 08:26:03 +0100 |
commit | 063026cc503e0c02af781caf920f5abfa0416268 (patch) | |
tree | 3727aae11c612d59e569605f89a6f370b5357add /tests/auto/corelib/text/qlocale | |
parent | 2a8b27bf6c523de6f3f466f8062279c093940a60 (diff) |
Update QLocale and calendar data to CLDR v44.1
(This turns out to be identical to v44, for our purposes.)
The CLDR license has been revised at v44 to "UNICODE LICENSE V3",
which is now included (as LICENSES/UNICODE-3.0.txt) in addition to the
old license (still in use, presumably, by UCD - at least until its
next update). Some new QLocale::Language entries are needed. There is
no change to the time-zone data.
Some tests needed changes:
* Various Arabic locales now use U+0623 (Arabic letter aleph with
hamza above) in exponent separator, replacing plain U+0627 (Arabic
letter aleph); it is still followed by U+0633 (Arabic letter seen).
* Where likely sub-tags used to fill in world, 001, as territory for a
language, they now (e.g. for Prussian and Yiddish) give specific
countries.
* Tamil locales now have something of a mix of inherited and localized
forms for AM/PM, which looks a lot like a mistake in CLDR.
* New likely sub-tag rules fix ctor(und_US) and ctor(und_GB), which
previously failed.
[ChangeLog][Third-Party Code] Updated QLocale's data extracted from
the Unicode Common Locale Data Repository (CLDR) to v44.1. The license
changed to Unicode License V3.
Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-121485
Task-number: QTBUG-121325
Change-Id: Ide1a68016129526d7a5aa3fc67f1a674858696bc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/corelib/text/qlocale')
-rw-r--r-- | tests/auto/corelib/text/qlocale/tst_qlocale.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp index 71e7a3514e..1d693566c9 100644 --- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp @@ -315,8 +315,6 @@ void tst_QLocale::ctor() { const QLocale l(reqLang, reqText, reqLand); - QEXPECT_FAIL("und_US", "QTBUG-121485: und_* likely-subtag rules broken", Abort); - QEXPECT_FAIL("und_GB", "QTBUG-121485: und_* likely-subtag rules broken", Abort); QTEST(l.language(), "expLang"); QTEST(l.script(), "expText"); QTEST(l.territory(), "expLand"); @@ -522,7 +520,7 @@ void tst_QLocale::defaulted_ctor() TEST_CTOR("en-GB", English, UnitedKingdom) TEST_CTOR("en-GB@bla", English, UnitedKingdom) TEST_CTOR("eo", Esperanto, World) - TEST_CTOR("yi", Yiddish, World) + TEST_CTOR("yi", Yiddish, Ukraine) TEST_CTOR("no", NorwegianBokmal, Norway) TEST_CTOR("nb", NorwegianBokmal, Norway) @@ -966,13 +964,13 @@ void tst_QLocale::toReal_data() QTest::newRow("se_NO 4x-3") // Only first character of exponent << u"se_NO"_s << u"4\u00b7\u2212" "03"_s << false << 0.0; QTest::newRow("ar_EG 4e-3") // Arabic, Egypt - << u"ar_EG"_s << u"\u0664\u0627\u0633\u061c-\u0660\u0663"_s << true << 4e-3; + << u"ar_EG"_s << u"\u0664\u0623\u0633\u061c-\u0660\u0663"_s << true << 4e-3; QTest::newRow("ar_EG 4e!3") // Only first character of sign: - << u"ar_EG"_s << u"\u0664\u0627\u0633\u061c\u0660\u0663"_s << false << 0.0; + << u"ar_EG"_s << u"\u0664\u0623\u0633\u061c\u0660\u0663"_s << false << 0.0; QTest::newRow("ar_EG 4x-3") // Only first character of exponent - << u"ar_EG"_s << u"\u0664\u0627\u061c-\u0660\u0663"_s << false << 0.0; + << u"ar_EG"_s << u"\u0664\u0623\u061c-\u0660\u0663"_s << false << 0.0; QTest::newRow("ar_EG 4x!3") // Only first character of exponent and sign - << u"ar_EG"_s << u"\u0664\u0627\u061c\u0660\u0663"_s << false << 0.0; + << u"ar_EG"_s << u"\u0664\u0623\u061c\u0660\u0663"_s << false << 0.0; QTest::newRow("fa_IR 4e-3") // Farsi, Iran << u"fa_IR"_s << u"\u06f4\u00d7\u06f1\u06f0^\u200e\u2212\u06f0\u06f3"_s << true << 4e-3; QTest::newRow("fa_IR 4e!3") // Only first character of sign: @@ -1312,9 +1310,9 @@ void tst_QLocale::doubleToString_data() QTest::newRow("se 0.000003945 g 1") // Northern Sami << u"se"_s << u"4\u00b7" "10^\u2212" "06"_s << 0.000003945 << 'g' << 1; QTest::newRow("ar_EG 0.000003945 g 1") // Arabic, Egypt (among others) - << u"ar_EG"_s << u"\u0664\u0627\u0633\u061c-\u0660\u0666"_s << 0.000003945 << 'g' << 1; + << u"ar_EG"_s << u"\u0664\u0623\u0633\u061c-\u0660\u0666"_s << 0.000003945 << 'g' << 1; QTest::newRow("ar_EG 3945e3 g 1") - << u"ar_EG"_s << u"\u0664\u0627\u0633\u061c+\u0660\u0666"_s << 3945e3 << 'g' << 1; + << u"ar_EG"_s << u"\u0664\u0623\u0633\u061c+\u0660\u0666"_s << 3945e3 << 'g' << 1; QTest::newRow("fa_IR 0.000003945 g 1") // Farsi, Iran (same for Afghanistan) << u"fa_IR"_s << u"\u06f4\u00d7\u06f1\u06f0^\u200e\u2212\u06f0\u06f6"_s << 0.000003945 << 'g' << 1; @@ -2638,7 +2636,7 @@ void tst_QLocale::doubleRoundTrip_data() QTest::newRow("se_NO 4e-06 g") // Northern Sami, Norway << u"se_NO"_s << u"4\u00b7" "10^\u2212" "06"_s << 'g'; QTest::newRow("ar_EG 4e-06 g") // Arabic, Egypt - << u"ar_EG"_s << u"\u0664\u0627\u0633\u061c-\u0660\u0666"_s << 'g'; + << u"ar_EG"_s << u"\u0664\u0623\u0633\u061c-\u0660\u0666"_s << 'g'; QTest::newRow("fa_IR 4e-06 g") // Farsi, Iran << u"fa_IR"_s << u"\u06f4\u00d7\u06f1\u06f0^\u200e\u2212\u06f0\u06f6"_s << 'g'; } @@ -3270,7 +3268,8 @@ void tst_QLocale::ampm_data() QTest::newRow("tr_TR") << QString::fromUtf8("\303\226\303\226") << QString::fromUtf8("\303\226\123"); QTest::newRow("id_ID") << QStringLiteral("AM") << QStringLiteral("PM"); - QTest::newRow("ta_LK") << QString::fromUtf8("முற்பகல்") << QString::fromUtf8("பிற்பகல்"); + // CLDR v44 made Tamil's AM/PM inconsistent; AM was "முற்பகல்" before. + QTest::newRow("ta_LK") << QString::fromUtf8("AM") << QString::fromUtf8("பிற்பகல்"); } void tst_QLocale::ampm() |