mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
update tables data to CLDR v43
hacks included Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
2a205b8a05
commit
5e7e30d810
5 changed files with 2602 additions and 194 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/python3
|
||||
#-*- coding: UTF-8 -*-
|
||||
|
||||
# Data is from https://unicode.org/Public/cldr/42/core.zip
|
||||
# Data is from https://unicode.org/Public/cldr/43/core.zip
|
||||
|
||||
import os, sys, glob, re
|
||||
import xml.etree.ElementTree as ET
|
||||
|
@ -341,6 +341,12 @@ def printlocaledata(frommap, key):
|
|||
# and also shrinks the table
|
||||
if value['country'] == 'QLocale::Country::AnyCountry' and not key == 'C':
|
||||
return
|
||||
# HACK: skip table entries the language of which is unknown
|
||||
if key == 'apc_SY':
|
||||
return
|
||||
# HACK: skip table entries with and with and without specifiec script
|
||||
if key == 'ha_Arab_NG':
|
||||
return
|
||||
print(''' {
|
||||
%s, %s, %s,
|
||||
%s, %s, %s,
|
||||
|
@ -661,6 +667,9 @@ def readlocale(fromxml, tomap, isparent):
|
|||
if country is not None:
|
||||
for parent in localeparentmap.keys():
|
||||
if locale in localeparentmap[parent]:
|
||||
if not parent in localeparentvaluesmap.keys():
|
||||
# reference to locale without data
|
||||
continue
|
||||
mapcopy(localeparentvaluesmap[parent], tomap[locale])
|
||||
# then from main locale (non-territory) filling the blanks that even parent locales do not fill
|
||||
if not isparent:
|
||||
|
|
|
@ -264,7 +264,7 @@ public:
|
|||
Herero = 211,
|
||||
Hiligaynon = 212,
|
||||
Hindi = 213,
|
||||
Hinglish = 214,
|
||||
HindiLatin = 214,
|
||||
HiriMotu = 215,
|
||||
Hittite = 216,
|
||||
Hmong = 217,
|
||||
|
@ -716,6 +716,7 @@ public:
|
|||
Azeri = Azerbaijani,
|
||||
ChineseCantonese = Cantonese,
|
||||
ChineseMandarin = Chinese,
|
||||
Hinglish = HindiLatin,
|
||||
KurdishCentral = CentralKurdish,
|
||||
KurdishSorani = CentralKurdish,
|
||||
Kyrgyz = Kirghiz,
|
||||
|
@ -959,80 +960,81 @@ public:
|
|||
Samoa = 218,
|
||||
SanMarino = 219,
|
||||
SaoTomeAndPrincipe = 220,
|
||||
SaudiArabia = 221,
|
||||
Senegal = 222,
|
||||
Serbia = 223,
|
||||
Seychelles = 224,
|
||||
SierraLeone = 225,
|
||||
Singapore = 226,
|
||||
SintMaarten = 227,
|
||||
Slovakia = 228,
|
||||
Slovenia = 229,
|
||||
SolomonIslands = 230,
|
||||
Somalia = 231,
|
||||
SouthAfrica = 232,
|
||||
SouthAmerica = 233,
|
||||
SouthGeorgiaAndSouthSandwichIslands = 234,
|
||||
SouthKorea = 235,
|
||||
SouthSudan = 236,
|
||||
SoutheastAsia = 237,
|
||||
SouthernAfrica = 238,
|
||||
SouthernAsia = 239,
|
||||
SouthernEurope = 240,
|
||||
Spain = 241,
|
||||
SriLanka = 242,
|
||||
StBarthelemy = 243,
|
||||
StHelena = 244,
|
||||
StKittsAndNevis = 245,
|
||||
StLucia = 246,
|
||||
StMartin = 247,
|
||||
StPierreAndMiquelon = 248,
|
||||
StVincentAndGrenadines = 249,
|
||||
SubSaharanAfrica = 250,
|
||||
Sudan = 251,
|
||||
Suriname = 252,
|
||||
SvalbardAndJanMayen = 253,
|
||||
Sweden = 254,
|
||||
Switzerland = 255,
|
||||
Syria = 256,
|
||||
Taiwan = 257,
|
||||
Tajikistan = 258,
|
||||
Tanzania = 259,
|
||||
Thailand = 260,
|
||||
Togo = 261,
|
||||
Tokelau = 262,
|
||||
Tonga = 263,
|
||||
TrinidadAndTobago = 264,
|
||||
TristandaCunha = 265,
|
||||
Tunisia = 266,
|
||||
Turkey = 267,
|
||||
Turkmenistan = 268,
|
||||
TurksAndCaicosIslands = 269,
|
||||
Tuvalu = 270,
|
||||
UK = 271,
|
||||
UN = 272,
|
||||
US = 273,
|
||||
Uganda = 274,
|
||||
Ukraine = 275,
|
||||
UnitedArabEmirates = 276,
|
||||
UnitedStatesOutlyingIslands = 277,
|
||||
UnitedStatesVirginIslands = 278,
|
||||
UnknownRegion = 279,
|
||||
Uruguay = 280,
|
||||
Uzbekistan = 281,
|
||||
Vanuatu = 282,
|
||||
VaticanCity = 283,
|
||||
Venezuela = 284,
|
||||
Vietnam = 285,
|
||||
WallisAndFutuna = 286,
|
||||
WesternAfrica = 287,
|
||||
WesternAsia = 288,
|
||||
WesternEurope = 289,
|
||||
WesternSahara = 290,
|
||||
Yemen = 291,
|
||||
Zambia = 292,
|
||||
Zimbabwe = 293,
|
||||
world = 294,
|
||||
Sark = 221,
|
||||
SaudiArabia = 222,
|
||||
Senegal = 223,
|
||||
Serbia = 224,
|
||||
Seychelles = 225,
|
||||
SierraLeone = 226,
|
||||
Singapore = 227,
|
||||
SintMaarten = 228,
|
||||
Slovakia = 229,
|
||||
Slovenia = 230,
|
||||
SolomonIslands = 231,
|
||||
Somalia = 232,
|
||||
SouthAfrica = 233,
|
||||
SouthAmerica = 234,
|
||||
SouthGeorgiaAndSouthSandwichIslands = 235,
|
||||
SouthKorea = 236,
|
||||
SouthSudan = 237,
|
||||
SoutheastAsia = 238,
|
||||
SouthernAfrica = 239,
|
||||
SouthernAsia = 240,
|
||||
SouthernEurope = 241,
|
||||
Spain = 242,
|
||||
SriLanka = 243,
|
||||
StBarthelemy = 244,
|
||||
StHelena = 245,
|
||||
StKittsAndNevis = 246,
|
||||
StLucia = 247,
|
||||
StMartin = 248,
|
||||
StPierreAndMiquelon = 249,
|
||||
StVincentAndGrenadines = 250,
|
||||
SubSaharanAfrica = 251,
|
||||
Sudan = 252,
|
||||
Suriname = 253,
|
||||
SvalbardAndJanMayen = 254,
|
||||
Sweden = 255,
|
||||
Switzerland = 256,
|
||||
Syria = 257,
|
||||
Taiwan = 258,
|
||||
Tajikistan = 259,
|
||||
Tanzania = 260,
|
||||
Thailand = 261,
|
||||
Togo = 262,
|
||||
Tokelau = 263,
|
||||
Tonga = 264,
|
||||
TrinidadAndTobago = 265,
|
||||
TristandaCunha = 266,
|
||||
Tunisia = 267,
|
||||
Turkey = 268,
|
||||
Turkmenistan = 269,
|
||||
TurksAndCaicosIslands = 270,
|
||||
Tuvalu = 271,
|
||||
UK = 272,
|
||||
UN = 273,
|
||||
US = 274,
|
||||
Uganda = 275,
|
||||
Ukraine = 276,
|
||||
UnitedArabEmirates = 277,
|
||||
UnitedStatesOutlyingIslands = 278,
|
||||
UnitedStatesVirginIslands = 279,
|
||||
UnknownRegion = 280,
|
||||
Uruguay = 281,
|
||||
Uzbekistan = 282,
|
||||
Vanuatu = 283,
|
||||
VaticanCity = 284,
|
||||
Venezuela = 285,
|
||||
Vietnam = 286,
|
||||
WallisAndFutuna = 287,
|
||||
WesternAfrica = 288,
|
||||
WesternAsia = 289,
|
||||
WesternEurope = 290,
|
||||
WesternSahara = 291,
|
||||
Yemen = 292,
|
||||
Zambia = 293,
|
||||
Zimbabwe = 294,
|
||||
world = 295,
|
||||
|
||||
BosniaAndHerzegovina = Bosnia,
|
||||
CapeVerde = CaboVerde,
|
||||
|
|
|
@ -83,7 +83,7 @@
|
|||
\note For the current keyboard input locale take a look at
|
||||
QApplication::keyboardInputLocale().
|
||||
|
||||
QLocale's data is based on Common Locale Data Repository v42.
|
||||
QLocale's data is based on Common Locale Data Repository v43.
|
||||
|
||||
The double-to-string and string-to-double conversion functions are
|
||||
covered by the following licenses:
|
||||
|
@ -336,6 +336,7 @@
|
|||
\value Herero
|
||||
\value Hiligaynon
|
||||
\value Hindi
|
||||
\value HindiLatin
|
||||
\value Hinglish
|
||||
\value HiriMotu
|
||||
\value Hittite
|
||||
|
@ -1044,6 +1045,7 @@
|
|||
\value Samoa
|
||||
\value SanMarino
|
||||
\value SaoTomeAndPrincipe
|
||||
\value Sark
|
||||
\value SaudiArabia
|
||||
\value Senegal
|
||||
\value Serbia
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -26,7 +26,6 @@
|
|||
#include <qlocale.h>
|
||||
#include <qnumeric.h>
|
||||
#include <qprocess.h>
|
||||
#include <qlocale_p.h>
|
||||
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
@ -957,7 +956,7 @@ void tst_QLocale::formatDateTime_data()
|
|||
QTest::newRow("5nn_NO") << "nn_NO" << QDateTime(QDate(1974, 1, 1), QTime(15, 14, 13))
|
||||
<< "dd/MM/yyy z" << "01/01/74y 0";
|
||||
QTest::newRow("6nn_NO") << "nn_NO" << QDateTime(QDate(1974, 12, 2), QTime(15, 14, 13))
|
||||
<< "ddd/MMM/yy AP" << QString::fromUtf8("må./des./74 PM");
|
||||
<< "ddd/MMM/yy AP" << QString::fromUtf8("må./Dec/74 PM");
|
||||
QTest::newRow("7nn_NO") << "nn_NO" << QDateTime(QDate(1974, 12, 2), QTime(15, 14, 13))
|
||||
<< "dddd/MMMM/y apa" << QString::fromUtf8("måndag/M12/y pmpm");
|
||||
QTest::newRow("8nn_NO") << "nn_NO" << QDateTime(QDate(1974, 12, 2), QTime(15, 14, 13))
|
||||
|
@ -967,7 +966,7 @@ void tst_QLocale::formatDateTime_data()
|
|||
QTest::newRow("10nn_NO") << "nn_NO" << QDateTime(QDate(1974, 12, 1), QTime(15, 4, 13))
|
||||
<< "d'dd'd/MMMM/yyy m'm'mm" << "1dd1/M12/74y 4m04";
|
||||
QTest::newRow("11nn_NO") << "nn_NO" << QDateTime(QDate(1974, 12, 1), QTime(15, 14, 3))
|
||||
<< "d'dd'd/MMM'M'/yysss" << "1dd1/des.M/74033";
|
||||
<< "d'dd'd/MMM'M'/yysss" << "1dd1/DecM/74033";
|
||||
QTest::newRow("12nn_NO") << "nn_NO" << QDateTime(QDate(1974, 12, 1), QTime(15, 14, 13))
|
||||
<< "d'd'dd/M/yyh" << "1d01/12/7415";
|
||||
|
||||
|
@ -1044,7 +1043,7 @@ void tst_QLocale::toDateTime_data()
|
|||
QTest::newRow("10nn_NO") << "nn_NO" << QDateTime(QDate(1974, 12, 1), QTime(0, 4, 0))
|
||||
<< "d'dd'd/MMMM/yyy m'm'mm" << "1dd1/M12/74y 4m04";
|
||||
QTest::newRow("11nn_NO") << "nn_NO" << QDateTime(QDate(1974, 12, 1), QTime(0, 0, 3))
|
||||
<< "d'dd'd/MMM'M'/yysss" << "1dd1/des.M/74033";
|
||||
<< "d'dd'd/MMM'M'/yysss" << "1dd1/DecM/74033";
|
||||
QTest::newRow("12nn_NO") << "nn_NO" << QDateTime(QDate(1974, 12, 1), QTime(15, 0, 0))
|
||||
<< "d'd'dd/M/yyh" << "1d01/12/7415";
|
||||
|
||||
|
@ -1211,7 +1210,7 @@ void tst_QLocale::dayName_data()
|
|||
|
||||
QTest::newRow("ru_RU long") << QString("ru_RU") << QString::fromUtf8("воскресенье") << 7 << QLocale::LongFormat;
|
||||
QTest::newRow("ru_RU short") << QString("ru_RU") << QString::fromUtf8("вс") << 7 << QLocale::ShortFormat;
|
||||
QTest::newRow("ru_RU narrow") << QString("ru_RU") << QString::fromUtf8("7") << 7 << QLocale::NarrowFormat;
|
||||
QTest::newRow("ru_RU narrow") << QString("ru_RU") << QString::fromUtf8("В") << 7 << QLocale::NarrowFormat;
|
||||
}
|
||||
|
||||
void tst_QLocale::dayName()
|
||||
|
@ -1539,9 +1538,8 @@ void tst_QLocale::monthName()
|
|||
QCOMPARE(ru.monthName(1, QLocale::ShortFormat), QString::fromUtf8("янв."));
|
||||
QCOMPARE(ru.monthName(1, QLocale::NarrowFormat), QString::fromUtf8("Я"));
|
||||
|
||||
// check that our CLDR scripts handle surrogate pairs correctly
|
||||
QLocale dsrt("en-Dsrt-US");
|
||||
QCOMPARE(dsrt.monthName(1, QLocale::LongFormat), QString::fromUtf8("M01"));
|
||||
QCOMPARE(dsrt.monthName(1, QLocale::LongFormat), QString::fromUtf8("January"));
|
||||
|
||||
QLocale ir("ga_IE");
|
||||
QCOMPARE(ir.monthName(1, QLocale::ShortFormat), QLatin1String("Ean"));
|
||||
|
@ -1587,7 +1585,7 @@ void tst_QLocale::uiLanguages()
|
|||
|
||||
const QLocale en_US("en_US");
|
||||
QCOMPARE(en_US.uiLanguages().size(), 1);
|
||||
QCOMPARE(en_US.uiLanguages().at(0), QLatin1String("en-Latn-US"));
|
||||
QCOMPARE(en_US.uiLanguages().at(0), QLatin1String("en-Dsrt-US"));
|
||||
|
||||
const QLocale ru_RU("ru_RU");
|
||||
QCOMPARE(ru_RU.uiLanguages().size(), 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue