Update C Locale constructor to match others on ids and codes
It was setting *_code='0' for the Any* forms of language, script and territory; this is wrong, the codes for these are all empty or other special tokens (like 'und', 'Zzzz', 'ZZ'). The IDs for them are zero, as an int not a string, but were omitted. Also add the variant details, for all that they're currently unused, for consistency. This makes no difference to the generated data. Task-number: QTBUG-115158 Change-Id: I339d1b201e50e2bbc510758ffbbaae0fa02277d4 Reviewed-by: Mate Barany <mate.barany@qt.io>
This commit is contained in:
parent
0c809fc3b5
commit
69aefa4edf
@ -601,9 +601,12 @@ class Locale (object):
|
|||||||
base[k] = ';'.join(x[:3] for x in base[k].split(';'))
|
base[k] = ';'.join(x[:3] for x in base[k].split(';'))
|
||||||
|
|
||||||
return cls(base,
|
return cls(base,
|
||||||
language='C', language_code='0', languageEndonym='',
|
language='C', language_code='',
|
||||||
script='AnyScript', script_code='0',
|
language_id=0, languageEndonym='',
|
||||||
territory='AnyTerritory', territory_code='0', territoryEndonym='',
|
script='AnyScript', script_code='', script_id=0,
|
||||||
|
territory='AnyTerritory', territory_code='',
|
||||||
|
territory_id=0, territoryEndonym='',
|
||||||
|
variant='', variant_code='', variant_id=0,
|
||||||
# CLDR has non-ASCII versions of these:
|
# CLDR has non-ASCII versions of these:
|
||||||
quotationStart='"', quotationEnd='"',
|
quotationStart='"', quotationEnd='"',
|
||||||
alternateQuotationStart="'", alternateQuotationEnd="'",
|
alternateQuotationStart="'", alternateQuotationEnd="'",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user