summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorEdward Welbourne <edward.welbourne@qt.io>2019-05-28 18:19:38 +0200
committerEdward Welbourne <edward.welbourne@qt.io>2019-07-01 17:48:32 +0200
commit13242673cf4fdeed6f69d1209bb70b94a9e5d758 (patch)
tree76bc99d6f4bee5b4775a8bb3c405303e2a3634c5 /util
parentbbd64f64b235d04058ba5bd83886d76fa4ee7a0c (diff)
Tidy up in cldr2qtimezone.py and document the need to run it
It wasn't mentioned in cldr2qlocalexml.py's instructions, so I didn't know to run it. The data it used in an illustration was out of date. Two tests could be combined with no loss. Change-Id: I26e619e6210ea5b1258326fc4bc2b6aee9d6a999 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'util')
-rwxr-xr-xutil/locale_database/cldr2qlocalexml.py3
-rwxr-xr-xutil/locale_database/cldr2qtimezone.py20
2 files changed, 11 insertions, 12 deletions
diff --git a/util/locale_database/cldr2qlocalexml.py b/util/locale_database/cldr2qlocalexml.py
index d75ef282f9..5560d8b43f 100755
--- a/util/locale_database/cldr2qlocalexml.py
+++ b/util/locale_database/cldr2qlocalexml.py
@@ -45,6 +45,9 @@ append new entries to enumdata.py's lists and update documentation in
src/corelib/tools/qlocale.qdoc, adding the new entries in alphabetic
order.
+While updating the locale data, check also for updates to MS-Win's
+time zone names; see cldr2qtimezone.py for details.
+
.. _CLDR: ftp://unicode.org/Public/cldr/
"""
diff --git a/util/locale_database/cldr2qtimezone.py b/util/locale_database/cldr2qtimezone.py
index 809a35912b..ca202f1e2e 100755
--- a/util/locale_database/cldr2qtimezone.py
+++ b/util/locale_database/cldr2qtimezone.py
@@ -38,17 +38,16 @@ use.
The XML structure is as follows:
<supplementalData>
- <version number="$Revision: 7825 $"/>
- <generation date="$Date: 2012-10-10 14:45:31 -0700 (Wed, 10 Oct 2012) $"/>
+ <version number="$Revision:...$"/>
+ <generation date="$Date:...$"/>
<windowsZones>
- <mapTimezones otherVersion="7dc0101" typeVersion="2012f">
+ <mapTimezones otherVersion="..." typeVersion="...">
<!-- (UTC-08:00) Pacific Time (US & Canada) -->
<mapZone other="Pacific Standard Time" territory="001" type="America/Los_Angeles"/>
- <mapZone other="Pacific Standard Time" territory="CA" type="America/Vancouver America/Dawson America/Whitehorse"/>
- <mapZone other="Pacific Standard Time" territory="MX" type="America/Tijuana"/>
- <mapZone other="Pacific Standard Time" territory="US" type="America/Los_Angeles"/>
- <mapZone other="Pacific Standard Time" territory="ZZ" type="PST8PDT"/>
- </mapTimezones>
+ <mapZone other="Pacific Standard Time" territory="CA" type="America/Vancouver America/Dawson America/Whitehorse"/>
+ <mapZone other="Pacific Standard Time" territory="US" type="America/Los_Angeles America/Metlakatla"/>
+ <mapZone other="Pacific Standard Time" territory="ZZ" type="PST8PDT"/>
+ </mapTimezones>
</windowsZones>
</supplementalData>
"""
@@ -272,10 +271,7 @@ windowsZonesPath = cldrPath + "/supplemental/windowsZones.xml"
tempFileDir = qtPath
dataFilePath = qtPath + "/src/corelib/time/qtimezoneprivate_data_p.h"
-if not os.path.isfile(windowsZonesPath):
- usage()
-
-if not os.path.isfile(dataFilePath):
+if not (os.path.isfile(windowsZonesPath) and os.path.isfile(dataFilePath)):
usage()
cldr_version = 'unknown'