From 54413653d5fb12bb08b9cbf1554b732bc0b8d1fb Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 19 Feb 2020 14:08:22 +0100 Subject: Rename the endonym members of the Locale type All other members had camelCase names, but the endonyms had prefix_endonym names, requiring munging where they were emitted to XML. So just do that munging upstream in the attribute name of the Locale objects. Makes no change to the data output by the scripts, not even to the intermediate QLocaleXML file. Task-number: QTBUG-81344 Change-Id: I01c15a822216281dc669b3e7ebda096d18b04f9b Reviewed-by: Lars Knoll Reviewed-by: Cristian Maureira-Fredes --- util/locale_database/cldr2qlocalexml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util/locale_database/cldr2qlocalexml.py') diff --git a/util/locale_database/cldr2qlocalexml.py b/util/locale_database/cldr2qlocalexml.py index a1df872e01..6a0b6cbe1a 100755 --- a/util/locale_database/cldr2qlocalexml.py +++ b/util/locale_database/cldr2qlocalexml.py @@ -340,8 +340,8 @@ def _generateLocaleInfo(path, language_code, script_code, country_code, variant_ endonym = findEntryDef(path, "localeDisplayNames/languages/language[type=%s_%s]" % (language_code, country_code)) if not endonym: endonym = findEntryDef(path, "localeDisplayNames/languages/language[type=%s]" % (language_code)) - result['language_endonym'] = endonym - result['country_endonym'] = findEntryDef(path, "localeDisplayNames/territories/territory[type=%s]" % (country_code)) + result['languageEndonym'] = endonym + result['countryEndonym'] = findEntryDef(path, "localeDisplayNames/territories/territory[type=%s]" % (country_code)) currency_format = get_number_in_system(path, "numbers/currencyFormats/currencyFormatLength/currencyFormat/pattern", numbering_system) currency_format = parse_number_format(currency_format, result) -- cgit v1.2.3 From 84382bde5c90e68f7c0e9c70c747fce0867fc128 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 19 Feb 2020 14:13:27 +0100 Subject: Rename the localexml module to qlocalexml It implements interaction with the QLocaleXML file format type, so rename it to match. Task-number: QTBUG-81344 Change-Id: I46302d4ac1038cdfc5929e73b554b6d793814c56 Reviewed-by: Lars Knoll --- util/locale_database/cldr2qlocalexml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'util/locale_database/cldr2qlocalexml.py') diff --git a/util/locale_database/cldr2qlocalexml.py b/util/locale_database/cldr2qlocalexml.py index 6a0b6cbe1a..ee53381b22 100755 --- a/util/locale_database/cldr2qlocalexml.py +++ b/util/locale_database/cldr2qlocalexml.py @@ -61,7 +61,7 @@ import enumdata import xpathlite from xpathlite import DraftResolution, findAlias, findEntry, findTagsInFile from dateconverter import convert_date -from localexml import Locale +from qlocalexml import Locale # TODO: make calendars a command-line option calendars = ['gregorian', 'persian', 'islamic'] # 'hebrew' -- cgit v1.2.3