Skip to content

Commit

Permalink
Add assorted notes and suggestions in util/locale_database/
Browse files Browse the repository at this point in the history
Change-Id: I22534943f2c9710d501235672811a861a5fd3aea
Reviewed-by: Øystein Heskestad <[email protected]>
Reviewed-by: Mårten Nordheim <[email protected]>
  • Loading branch information
ediosyncratic committed Jun 2, 2024
1 parent b48b4f4 commit 4e23dbb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/corelib/time/qtimezoneprivate_data_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ struct AliasData
constexpr QByteArrayView ianaId() const;
};

// FIXME: rename ianaIdData[] to ianaListData[], aliasIdData[] to ianaIdData[]
struct ZoneData
{
// Keys (table is sorted in Windows ID, then on territory enum value):
Expand All @@ -76,6 +77,7 @@ struct WindowsData
// Values for this Windows zone:
quint16 ianaIdIndex; // Index in ianaIdData of space-joined IANA IDs
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 ianaId() const; // Space-joined list of IANA IDs
};
Expand Down
2 changes: 2 additions & 0 deletions util/locale_database/cldr.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,8 @@ def __currencyData(self, cache = {}):
source = self.__supplementalData
for elt in source.findNodes('currencyData/region'):
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:
territory = elt.dom.attributes['iso3166'].nodeValue
except KeyError:
Expand Down
1 change: 1 addition & 0 deletions util/locale_database/ldml.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,7 @@ def textPatternData(self):

def endonyms(self, language, script, territory, variant):
# TODO: take variant into account ?
# TODO: QTBUG-47892, support query for all combinations
for seq in ((language, script, territory),
(language, script), (language, territory), (language,)):
if not all(seq):
Expand Down
2 changes: 2 additions & 0 deletions util/locale_database/qlocalexml.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ def __eltWords(elt):
child = elt.firstChild
while child:
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
child = child.nextSibling

Expand Down

0 comments on commit 4e23dbb

Please sign in to comment.