diff --git a/util/locale_database/cldr2qlocalexml.py b/util/locale_database/cldr2qlocalexml.py index 20dda77965..9d910c2b8d 100755 --- a/util/locale_database/cldr2qlocalexml.py +++ b/util/locale_database/cldr2qlocalexml.py @@ -2,7 +2,7 @@ # coding=utf8 ############################################################################# ## -## 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. @@ -59,7 +59,6 @@ import sys from cldr import CldrReader from qlocalexml import QLocaleXmlWriter -from enumdata import language_list, script_list, country_list def usage(name, err, message = ''): err.write("""Usage: {} path/to/cldr/common/main [out-file.xml] @@ -110,7 +109,7 @@ def main(args, out, err): writer = QLocaleXmlWriter(emit.write) writer.version(reader.root.cldrVersion) - writer.enumData(language_list, script_list, country_list) + writer.enumData() writer.likelySubTags(reader.likelySubTags()) writer.locales(reader.readLocales(calendars), calendars) diff --git a/util/locale_database/qlocalexml.py b/util/locale_database/qlocalexml.py index 4fcfe32a43..a80d777907 100644 --- a/util/locale_database/qlocalexml.py +++ b/util/locale_database/qlocalexml.py @@ -1,7 +1,7 @@ # coding=utf8 ############################################################################# ## -## 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. @@ -333,10 +333,11 @@ class QLocaleXmlWriter (object): self.__write('') # Output of various sections, in their usual order: - def enumData(self, languages, scripts, countries): - self.__enumTable('language', languages) - self.__enumTable('script', scripts) - self.__enumTable('country', countries) + def enumData(self): + from enumdata import language_list, script_list, country_list + self.__enumTable('language', language_list) + self.__enumTable('script', script_list) + self.__enumTable('country', country_list) def likelySubTags(self, entries): self.__openTag('likelySubtags')