diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2021-05-04 12:12:00 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2021-05-26 18:00:01 +0200 |
commit | 21e0ef3ccf653fad76516ef89c62c2fb9fb4d9b5 (patch) | |
tree | 86677b8f32b4b713e71c13d596719ccaffb5985f /util/locale_database/cldr.py | |
parent | 181424d9b57512ffcc8b1589351683899bf7febe (diff) |
Rename util/locale_database/enumdata.py's various *_list to *_map
These variables provide mappings, not lists, so name them non-deceptively.
Change-Id: Idf15e78ad73790bc86dd8b9d4f248d1c4f73993c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'util/locale_database/cldr.py')
-rw-r--r-- | util/locale_database/cldr.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/util/locale_database/cldr.py b/util/locale_database/cldr.py index 9b08d8a652..40112537f0 100644 --- a/util/locale_database/cldr.py +++ b/util/locale_database/cldr.py @@ -1,7 +1,7 @@ # -*- coding: utf-8; -*- ############################################################################# ## -## Copyright (C) 2020 The Qt Company Ltd. +## Copyright (C) 2021 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite of the Qt Toolkit. @@ -410,10 +410,10 @@ class CldrAccess (object): for k in self.__parentLocale.keys(): for f in k.split('_'): scraps.add(f) - from enumdata import language_list, country_list, script_list - language = dict((v, k) for k, v in language_list.values() if not v.isspace()) - country = dict((v, k) for k, v in country_list.values() if v != 'ZZ') - script = dict((v, k) for k, v in script_list.values() if v != 'Zzzz') + from enumdata import language_map, country_map, script_map + language = dict((v, k) for k, v in language_map.values() if not v.isspace()) + country = dict((v, k) for k, v in country_map.values() if v != 'ZZ') + script = dict((v, k) for k, v in script_map.values() if v != 'Zzzz') lang = dict(self.__checkEnum(language, self.__codeMap('language'), scraps)) land = dict(self.__checkEnum(country, self.__codeMap('country'), scraps)) text = dict(self.__checkEnum(script, self.__codeMap('script'), scraps)) @@ -673,10 +673,10 @@ enumdata.py (keeping the old name as an alias): # They're not actually lists: mappings from numeric value # to pairs of full name and short code. What we want, in # each case, is a mapping from code to the other two. - from enumdata import language_list, script_list, country_list - for form, book, empty in (('language', language_list, 'AnyLanguage'), - ('script', script_list, 'AnyScript'), - ('country', country_list, 'AnyTerritory')): + from enumdata import language_map, script_map, country_map + for form, book, empty in (('language', language_map, 'AnyLanguage'), + ('script', script_map, 'AnyScript'), + ('country', country_map, 'AnyTerritory')): cache[form] = dict((pair[1], (num, pair[0])) for num, pair in book.items() if pair[0] != 'C') # (Have to filter out the C locale, as we give it the |