Add assorted notes and suggestions in util/locale_database/
Change-Id: I22534943f2c9710d501235672811a861a5fd3aea Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
b48b4f4d3b
commit
4e23dbb742
@ -57,6 +57,7 @@ struct AliasData
|
|||||||
constexpr QByteArrayView ianaId() const;
|
constexpr QByteArrayView ianaId() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// FIXME: rename ianaIdData[] to ianaListData[], aliasIdData[] to ianaIdData[]
|
||||||
struct ZoneData
|
struct ZoneData
|
||||||
{
|
{
|
||||||
// Keys (table is sorted in Windows ID, then on territory enum value):
|
// Keys (table is sorted in Windows ID, then on territory enum value):
|
||||||
@ -76,6 +77,7 @@ struct WindowsData
|
|||||||
// Values for this Windows zone:
|
// Values for this Windows zone:
|
||||||
quint16 ianaIdIndex; // Index in ianaIdData of space-joined IANA IDs
|
quint16 ianaIdIndex; // Index in ianaIdData of space-joined IANA IDs
|
||||||
qint32 offsetFromUtc; // Standard Time Offset from UTC, used for quick look-ups
|
qint32 offsetFromUtc; // Standard Time Offset from UTC, used for quick look-ups
|
||||||
|
// FIXME: ianaIdIndex is actually always a single IANA ID, so re-route to alias table
|
||||||
constexpr QByteArrayView windowsId() const;
|
constexpr QByteArrayView windowsId() const;
|
||||||
constexpr QByteArrayView ianaId() const; // Space-joined list of IANA IDs
|
constexpr QByteArrayView ianaId() const; // Space-joined list of IANA IDs
|
||||||
};
|
};
|
||||||
|
@ -620,6 +620,8 @@ enumdata.py (keeping the old name as an alias):
|
|||||||
source = self.__supplementalData
|
source = self.__supplementalData
|
||||||
for elt in source.findNodes('currencyData/region'):
|
for elt in source.findNodes('currencyData/region'):
|
||||||
iso, digits, rounding = '', 2, 1
|
iso, digits, rounding = '', 2, 1
|
||||||
|
# TODO: fractions/info[iso4217=DEFAULT] has rounding=0 - why do we differ ?
|
||||||
|
# Also: some fractions/info have cashDigits and cashRounding - should we use them ?
|
||||||
try:
|
try:
|
||||||
territory = elt.dom.attributes['iso3166'].nodeValue
|
territory = elt.dom.attributes['iso3166'].nodeValue
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
@ -358,6 +358,7 @@ class LocaleScanner (object):
|
|||||||
|
|
||||||
def endonyms(self, language, script, territory, variant):
|
def endonyms(self, language, script, territory, variant):
|
||||||
# TODO: take variant into account ?
|
# TODO: take variant into account ?
|
||||||
|
# TODO: QTBUG-47892, support query for all combinations
|
||||||
for seq in ((language, script, territory),
|
for seq in ((language, script, territory),
|
||||||
(language, script), (language, territory), (language,)):
|
(language, script), (language, territory), (language,)):
|
||||||
if not all(seq):
|
if not all(seq):
|
||||||
|
@ -195,6 +195,8 @@ class QLocaleXmlReader (object):
|
|||||||
child = elt.firstChild
|
child = elt.firstChild
|
||||||
while child:
|
while child:
|
||||||
if child.nodeType == elt.TEXT_NODE:
|
if child.nodeType == elt.TEXT_NODE:
|
||||||
|
# Note: do not strip(), as some group separators are
|
||||||
|
# non-breaking spaces, that strip() will discard.
|
||||||
yield child.nodeValue
|
yield child.nodeValue
|
||||||
child = child.nextSibling
|
child = child.nextSibling
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user