6.5.3 clean

This commit is contained in:
kleuter
2023-11-01 18:02:52 +01:00
parent bbe896803b
commit 7018d9e6c8
2170 changed files with 57471 additions and 43550 deletions

View File

@ -4666,7 +4666,7 @@ def create_top_level_cmake_conf():
conf_file_name = ".cmake.conf"
try:
with open(conf_file_name, "x") as file:
file.write('set(QT_REPO_MODULE_VERSION "6.5.1")\n')
file.write('set(QT_REPO_MODULE_VERSION "6.5.3")\n')
except FileExistsError:
pass

View File

@ -356,7 +356,6 @@ class CldrAccess (object):
def __checkEnum(given, proper, scraps,
remap = { 'å': 'a', 'ã': 'a', 'ç': 'c', 'é': 'e', 'í': 'i', 'ü': 'u'},
prefix = { 'St.': 'Saint', 'U.S.': 'United States' },
suffixes = ( 'Han', ),
skip = '\u02bc'):
# Each is a { code: full name } mapping
for code, name in given.items():
@ -376,8 +375,6 @@ class CldrAccess (object):
try: f, t = ok.index('('), ok.index(')')
except ValueError: break
ok = ok[:f].rstrip() + ' ' + ok[t:].lstrip()
if any(name == ok + ' ' + s for s in suffixes):
continue
if ''.join(ch for ch in name.lower() if not ch.isspace()) in ''.join(
remap.get(ch, ch) for ch in ok.lower() if ch.isalpha() and ch not in skip):
continue
@ -448,7 +445,7 @@ enumdata.py (keeping the old name as an alias):
wid, code = attrs['other'], attrs['territory']
data = dict(windowsId = wid,
territoryCode = code,
ianaList = attrs['type'])
ianaList = ' '.join(attrs['type'].split()))
try:
key = lookup[wid]
@ -699,7 +696,13 @@ enumdata.py (keeping the old name as an alias):
except (KeyError, ValueError, TypeError):
pass
else:
if key not in seen or 'alt' not in elt.attributes:
# Prefer stand-alone forms of names when present, ignore other
# alt="..." entries. For example, Traditional and Simplified
# Han omit "Han" in the plain form, but include it for
# stand-alone. As the stand-alone version appears later, it
# over-writes the plain one.
if (key not in seen or 'alt' not in elt.attributes
or elt.attributes['alt'].nodeValue == 'stand-alone'):
yield key, value
seen.add(key)
@ -708,7 +711,8 @@ enumdata.py (keeping the old name as an alias):
def __parentLocale(self, cache = {}):
# see http://www.unicode.org/reports/tr35/#Parent_Locales
if not cache:
for tag, attrs in self.__supplementalData.find('parentLocales'):
for tag, attrs in self.__supplementalData.find('parentLocales',
('component',)):
parent = attrs.get('parent', '')
for child in attrs['locales'].split():
cache[child] = parent

View File

@ -361,13 +361,21 @@ language_map = {
329: ("Nheengatu", "yrl"),
# added in CLDR v42
330: ("Haryanvi", "bgc"),
331: ("Moksha", "mdf"),
332: ("Northern Frisian", "frr"),
333: ("Obolo", "ann"),
334: ("Pijin", "pis"),
335: ("Rajasthani", "raj"),
336: ("Toki Pona", "tok"),
331: ("Northern Frisian", "frr"),
332: ("Rajasthani", "raj"),
333: ("Moksha", "mdf"),
334: ("Toki Pona", "tok"),
335: ("Pijin", "pis"),
336: ("Obolo", "ann"),
# added in CLDR v43
337: ("Baluchi", "bal"),
338: ("Ligurian", "lij"),
339: ("Rohingya", "rhg"),
340: ("Torwali", "trw"),
}
# 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.
language_aliases = {
# Renamings prior to Qt 6.0 (CLDR v37):
@ -837,6 +845,8 @@ script_map = {
139: ("Vai", "Vaii"),
140: ("Varang Kshiti", "Wara"),
141: ("Yi", "Yiii"),
# Added at CLDR v43
142: ("Hanifi", "Rohg"), # Used for Rohingya
}
script_aliases = {

View File

@ -166,10 +166,23 @@ class XmlScanner (object):
return elts
class Supplement (XmlScanner):
def find(self, xpath):
def find(self, xpath, exclude=()):
"""Finds nodes by matching a specified xpath.
If exclude is passed, it should be a sequence of attribute names (its
default is empty). Any matches to the given xpath that also have any
attribute in this sequence will be excluded.
For each childless node matching the xpath, or child of a node matching
the xpath, this yields a twople (name, attrs) where name is the
nodeName and attrs is a dict mapping the node's attribute's names to
their values. For attribute values that are not simple strings, the
nodeValue of the attribute node is used."""
elts = self.findNodes(xpath)
for elt in _iterateEach(e.dom.childNodes if e.dom.childNodes else (e.dom,)
for e in elts):
for elt in _iterateEach(e.dom.childNodes or (e.dom,)
for e in elts
if not any(a in e.dom.attributes
for a in exclude)):
if elt.attributes:
yield (elt.nodeName,
dict((k, v if isinstance(v, str) else v.nodeValue)
@ -257,7 +270,13 @@ class LocaleScanner (object):
stem = f'numbers/symbols[numberSystem={system}]/'
decimal = self.find(f'{stem}decimal')
group = self.find(f'{stem}group')
assert decimal != group, (self.name, system, decimal)
if decimal == group:
# mn_Mong_MN @v43 :-(
clean = Node.draftScore('approved')
decimal = self.find(f'{stem}decimal', draft=clean)
group = self.find(f'{stem}group', draft=clean)
assert decimal != group, (self.name, system, decimal)
yield 'decimal', decimal
yield 'group', group
yield 'percent', self.find(f'{stem}percentSign')

View File

@ -324,9 +324,9 @@ class QLocaleXmlWriter (object):
self.__languages = set(p[1] for p in language_map.values()
if not p[1].isspace())
self.__scripts = set(p[1] for p in script_map.values()
if p[1] != 'ZZ')
if p[1] != 'Zzzz')
self.__territories = set(p[1] for p in territory_map.values()
if p[1] != 'Zzzz')
if p[1] != 'ZZ')
def likelySubTags(self, entries):
self.__openTag('likelySubtags')
@ -360,7 +360,7 @@ class QLocaleXmlWriter (object):
self.__write('</localeDatabase>')
self.__rawOutput = self.__complain
if self.__languages or self.__scripts or self.territories:
if self.__languages or self.__scripts or self.__territories:
grumble('Some enum members are unused, corresponding to these tags:\n')
import textwrap
def kvetch(kind, seq, g = grumble, w = textwrap.wrap):