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>
This commit is contained in:
parent
bbd64f64b2
commit
13242673cf
@ -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/
|
||||
"""
|
||||
|
||||
|
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user