diff options
author | Konstantin Ritt <ritt.ks@gmail.com> | 2014-01-12 11:45:56 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-01-13 19:02:10 +0100 |
commit | 4f8f0f16d0221b1ac401200f53e3287700133a42 (patch) | |
tree | 6ee2b230ebcefe5235d4e5b958f2fbd4793d916b /util/local_database | |
parent | 9752cf7d130a0ab1a7ece6e3fe698379d8835039 (diff) |
Update the internal CLDR tables up to v.24
Change-Id: I9c0b110e36dd80c6a0b7275aa13bc548419aca9c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Mehdi Fekari <mfekari@blackberry.com>
Diffstat (limited to 'util/local_database')
-rwxr-xr-x | util/local_database/cldr2qlocalexml.py | 18 | ||||
-rw-r--r-- | util/local_database/enumdata.py | 5 |
2 files changed, 18 insertions, 5 deletions
diff --git a/util/local_database/cldr2qlocalexml.py b/util/local_database/cldr2qlocalexml.py index be2a9c5ace..7975a82d1c 100755 --- a/util/local_database/cldr2qlocalexml.py +++ b/util/local_database/cldr2qlocalexml.py @@ -46,6 +46,7 @@ import enumdata import xpathlite from xpathlite import DraftResolution from dateconverter import convert_date +from xml.sax.saxutils import escape, unescape import re findAlias = xpathlite.findAlias @@ -94,11 +95,20 @@ def parse_list_pattern_part_format(pattern): def ordStr(c): if len(c) == 1: return str(ord(c)) + raise xpathlite.Error("Unable to handle value \"%s\"" % addEscapes(c)) return "##########" # the following functions are supposed to fix the problem with QLocale # returning a character instead of strings for QLocale::exponential() # and others. So we fallback to default values in these cases. +def fixOrdStrMinus(c): + if len(c) == 1: + return str(ord(c)) + return str(ord('-')) +def fixOrdStrPlus(c): + if len(c) == 1: + return str(ord(c)) + return str(ord('+')) def fixOrdStrExp(c): if len(c) == 1: return str(ord(c)) @@ -745,10 +755,10 @@ for key in locale_keys: print " <locale>" print " <language>" + l['language'] + "</language>" - print " <languageEndonym>" + l['language_endonym'].encode('utf-8') + "</languageEndonym>" + print " <languageEndonym>" + escape(l['language_endonym']).encode('utf-8') + "</languageEndonym>" print " <script>" + l['script'] + "</script>" print " <country>" + l['country'] + "</country>" - print " <countryEndonym>" + l['country_endonym'].encode('utf-8') + "</countryEndonym>" + print " <countryEndonym>" + escape(l['country_endonym']).encode('utf-8') + "</countryEndonym>" print " <languagecode>" + l['language_code'] + "</languagecode>" print " <scriptcode>" + l['script_code'] + "</scriptcode>" print " <countrycode>" + l['country_code'] + "</countrycode>" @@ -757,8 +767,8 @@ for key in locale_keys: print " <list>" + fixOrdStrList(l['list']) + "</list>" print " <percent>" + fixOrdStrPercent(l['percent']) + "</percent>" print " <zero>" + ordStr(l['zero']) + "</zero>" - print " <minus>" + ordStr(l['minus']) + "</minus>" - print " <plus>" + ordStr(l['plus']) + "</plus>" + print " <minus>" + fixOrdStrMinus(l['minus']) + "</minus>" + print " <plus>" + fixOrdStrPlus(l['plus']) + "</plus>" print " <exp>" + fixOrdStrExp(l['exp']) + "</exp>" print " <quotationStart>" + l['quotationStart'].encode('utf-8') + "</quotationStart>" print " <quotationEnd>" + l['quotationEnd'].encode('utf-8') + "</quotationEnd>" diff --git a/util/local_database/enumdata.py b/util/local_database/enumdata.py index 256866e177..f9c4c1daee 100644 --- a/util/local_database/enumdata.py +++ b/util/local_database/enumdata.py @@ -356,7 +356,10 @@ language_list = { 308 : [ "Tagbanwa", "tbw" ], 309 : [ "TaiDam", "blt" ], 310 : [ "TaiNua", "tdd" ], - 311 : [ "Ugaritic", "uga" ] + 311 : [ "Ugaritic", "uga" ], + 312 : [ "Akoose", "bss" ], + 313 : [ "Lakota", "lkt" ], + 314 : [ "Standard Moroccan Tamazight", "zgh" ] } country_list = { |