summaryrefslogtreecommitdiffstats
path: root/util/local_database/qlocalexml2cpp.py
diff options
context:
space:
mode:
Diffstat (limited to 'util/local_database/qlocalexml2cpp.py')
-rwxr-xr-xutil/local_database/qlocalexml2cpp.py40
1 files changed, 22 insertions, 18 deletions
diff --git a/util/local_database/qlocalexml2cpp.py b/util/local_database/qlocalexml2cpp.py
index 1164075778..9fd88c46fe 100755
--- a/util/local_database/qlocalexml2cpp.py
+++ b/util/local_database/qlocalexml2cpp.py
@@ -1,32 +1,27 @@
#!/usr/bin/env python
#############################################################################
##
-## Copyright (C) 2015 The Qt Company Ltd.
-## Contact: http://www.qt.io/licensing/
+## Copyright (C) 2016 The Qt Company Ltd.
+## Contact: https://www.qt.io/licensing/
##
## This file is part of the test suite of the Qt Toolkit.
##
-## $QT_BEGIN_LICENSE:LGPL21$
+## $QT_BEGIN_LICENSE:GPL-EXCEPT$
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance with the commercial license agreement provided with the
## Software or, alternatively, in accordance with the terms contained in
## a written agreement between you and The Qt Company. For licensing terms
-## and conditions see http://www.qt.io/terms-conditions. For further
-## information use the contact form at http://www.qt.io/contact-us.
+## and conditions see https://www.qt.io/terms-conditions. For further
+## information use the contact form at https://www.qt.io/contact-us.
##
-## GNU Lesser General Public License Usage
-## Alternatively, this file may be used under the terms of the GNU Lesser
-## General Public License version 2.1 or version 3 as published by the Free
-## Software Foundation and appearing in the file LICENSE.LGPLv21 and
-## LICENSE.LGPLv3 included in the packaging of this file. Please review the
-## following information to ensure the GNU Lesser General Public License
-## requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-## http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-##
-## As a special exception, The Qt Company gives you certain additional
-## rights. These rights are described in The Qt Company LGPL Exception
-## version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+## GNU General Public License Usage
+## Alternatively, this file may be used under the terms of the GNU
+## General Public License version 3 as published by the Free Software
+## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+## included in the packaging of this file. Please review the following
+## information to ensure the GNU General Public License requirements will
+## be met: https://www.gnu.org/licenses/gpl-3.0.html.
##
## $QT_END_LICENSE$
##
@@ -557,7 +552,7 @@ def main():
cmnt_to = cmnt_to + country_map[to_country][1]
data_temp_file.write(" ")
- data_temp_file.write("{ %3d, %2d, %3d }, { %3d, %2d, %3d }" % (from_language, from_script, from_country, to_language, to_script, to_country))
+ data_temp_file.write("{ %3d, %3d, %3d }, { %3d, %3d, %3d }" % (from_language, from_script, from_country, to_language, to_script, to_country))
index += 1
if index != len(likely_subtags_map):
data_temp_file.write(",")
@@ -877,6 +872,7 @@ def main():
language = fixedLanguageName(language_map[key][0], dupes)
qlocaleh_temp_file.write(" " + language + " = " + str(key) + ",\n")
# legacy. should disappear at some point
+ qlocaleh_temp_file.write("\n")
qlocaleh_temp_file.write(" Norwegian = NorwegianBokmal,\n")
qlocaleh_temp_file.write(" Moldavian = Romanian,\n")
qlocaleh_temp_file.write(" SerboCroatian = Serbian,\n")
@@ -892,6 +888,7 @@ def main():
qlocaleh_temp_file.write(" Chewa = Nyanja,\n")
qlocaleh_temp_file.write(" Frisian = WesternFrisian,\n")
qlocaleh_temp_file.write(" Uigur = Uighur,\n")
+ qlocaleh_temp_file.write("\n")
qlocaleh_temp_file.write(" LastLanguage = " + language + "\n")
qlocaleh_temp_file.write(" };\n")
@@ -904,8 +901,10 @@ def main():
script = fixedScriptName(script_map[key][0], dupes)
qlocaleh_temp_file.write(" " + script + " = " + str(key) + ",\n")
# renamings
+ qlocaleh_temp_file.write("\n")
qlocaleh_temp_file.write(" SimplifiedChineseScript = SimplifiedHanScript,\n")
qlocaleh_temp_file.write(" TraditionalChineseScript = TraditionalHanScript,\n")
+ qlocaleh_temp_file.write("\n")
qlocaleh_temp_file.write(" LastScript = " + script + "\n")
qlocaleh_temp_file.write(" };\n")
@@ -915,6 +914,10 @@ def main():
for key in country_map.keys():
country = fixedCountryName(country_map[key][0], dupes)
qlocaleh_temp_file.write(" " + country + " = " + str(key) + ",\n")
+ # deprecated
+ qlocaleh_temp_file.write("\n")
+ qlocaleh_temp_file.write(" Tokelau = TokelauCountry,\n")
+ qlocaleh_temp_file.write(" Tuvalu = TuvaluCountry,\n")
# renamings
qlocaleh_temp_file.write(" DemocraticRepublicOfCongo = CongoKinshasa,\n")
qlocaleh_temp_file.write(" PeoplesRepublicOfCongo = CongoBrazzaville,\n")
@@ -922,6 +925,7 @@ def main():
qlocaleh_temp_file.write(" RepublicOfKorea = SouthKorea,\n")
qlocaleh_temp_file.write(" RussianFederation = Russia,\n")
qlocaleh_temp_file.write(" SyrianArabRepublic = Syria,\n")
+ qlocaleh_temp_file.write("\n")
qlocaleh_temp_file.write(" LastCountry = " + country + "\n")
qlocaleh_temp_file.write(" };\n")