blob: 054c880459d7165d574b70f38258c79572a6fef1 [file] [log] [blame]
Yilin Yang8e1b24c2020-02-03 15:02:25 +08001#!/usr/bin/env python3
Hung-Te Lin34f3d382015-04-10 18:18:23 +08002# -*- coding: utf-8 -*-
Hung-Te Lin76c55b22015-03-31 14:47:14 +08003# Copyright 2015 The Chromium OS Authors. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7"""Authoritative source for Chromium OS region/locale configuration.
8
9Run this module to display all known regions (use --help to see options).
10"""
11
12from __future__ import print_function
13
14import argparse
Clark Chung39230202020-05-26 13:24:33 +080015import collections.abc
Hung-Te Lin76c55b22015-03-31 14:47:14 +080016import json
17import re
18import sys
19
Bao-Duy Trane43d5de2020-05-29 18:02:36 +100020import yaml # pylint: disable=import-error
Hung-Te Lin76c55b22015-03-31 14:47:14 +080021
22
23# The regular expression to check values in Region.keyboards and Region.locales.
24# Keyboards should come with xkb: protocol, or the input methods (ime:, m17n:).
Hung-Te Lincf2f02b2017-03-20 14:58:20 +080025# Examples: xkb:us:intl:eng, ime:ime:zh-t:cangjie, xkb:us:altgr-intl:eng
26KEYBOARD_PATTERN = re.compile(r'^xkb:\w+:[\w-]*:\w+$|'
Hung-Te Lin76c55b22015-03-31 14:47:14 +080027 r'^(ime|m17n|t13n):[\w:-]+$')
28# Locale should be a combination of language and location.
29# Examples: en-US, ja.
30LOCALE_PATTERN = re.compile(r'^(\w+)(-[A-Z0-9]+)?$')
31
32
33class Enum(frozenset):
34 """An enumeration type.
35
Bao-Duy Trane43d5de2020-05-29 18:02:36 +100036 Examples:
Hung-Te Lin76c55b22015-03-31 14:47:14 +080037 To create a enum object:
38 dummy_enum = Enum(['A', 'B', 'C'])
39
40 To access a enum object, use:
41 dummy_enum.A
42 dummy_enum.B
43 """
44
45 def __getattr__(self, name):
46 if name in self:
47 return name
48 raise AttributeError
49
50
51class RegionException(Exception):
52 """Exception in Region handling."""
Hung-Te Lin76c55b22015-03-31 14:47:14 +080053
54
55def MakeList(value):
56 """Converts the given value to a list.
57
58 Returns:
59 A list of elements from "value" if it is iterable (except string);
60 otherwise, a list contains only one element.
61 """
Clark Chung39230202020-05-26 13:24:33 +080062 if (isinstance(value, collections.abc.Iterable) and
Yilin Yang74cf2102020-02-03 15:04:19 +080063 not isinstance(value, str)):
Hung-Te Lin76c55b22015-03-31 14:47:14 +080064 return list(value)
65 return [value]
66
67
68class Region(object):
69 """Comprehensive, standard locale configuration per country/region.
70
71 See :ref:`regions-values` for detailed information on how to set these values.
72 """
73 # pylint gets confused by some of the docstrings.
Hung-Te Lin76c55b22015-03-31 14:47:14 +080074
75 # ANSI = US-like
76 # ISO = UK-like
77 # JIS = Japanese
Hung-Te Lin4eb4f922016-03-04 11:51:04 +080078 # KS = Korean (see http://crosbug.com/p/50753 for why this is not used yet)
Hung-Te Lin76c55b22015-03-31 14:47:14 +080079 # ABNT2 = Brazilian (like ISO but with an extra key to the left of the
80 # right shift key)
81 KeyboardMechanicalLayout = Enum(['ANSI', 'ISO', 'JIS', 'KS', 'ABNT2'])
82
83 region_code = None
84 """A unique identifier for the region. This may be a lower-case
85 `ISO 3166-1 alpha-2 code
86 <http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>`_ (e.g., ``us``),
87 a variant within an alpha-2 entity (e.g., ``ca.fr``), or an
88 identifier for a collection of countries or entities (e.g.,
89 ``latam-es-419`` or ``nordic``). See :ref:`region-codes`.
90
91 Note that ``uk`` is not a valid identifier; ``gb`` is used as it is
92 the real alpha-2 code for the UK."""
93
94 keyboards = None
95 """A list of keyboard layout identifiers (e.g., ``xkb:us:intl:eng``
96 or ``m17n:ar``). This field was designed to be the physical keyboard layout
97 in the beginning, and then becomes a list of OOBE keyboard selection, which
98 then includes non-physical layout elements like input methods (``ime:``).
99 To avoid confusion, physical layout is now defined by
100 :py:attr:`keyboard_mechanical_layout`, and this is reserved for logical
101 layouts.
102
103 This is identical to the legacy VPD ``keyboard_layout`` value."""
104
105 time_zones = None
106 """A list of default `tz database time zone
107 <http://en.wikipedia.org/wiki/List_of_tz_database_time_zones>`_
108 identifiers (e.g., ``America/Los_Angeles``). See
109 `timezone_settings.cc <http://goo.gl/WSVUeE>`_ for supported time
110 zones.
111
112 This is identical to the legacy VPD ``initial_timezone`` value."""
113
114 locales = None
115 """A list of default locale codes (e.g., ``en-US``); see
116 `l10n_util.cc <http://goo.gl/kVkht>`_ for supported locales.
117
118 This is identital to the legacy VPD ``initial_locale`` field."""
119
120 keyboard_mechanical_layout = None
121 """The keyboard's mechanical layout (``ANSI`` [US-like], ``ISO``
122 [UK-like], ``JIS`` [Japanese], ``ABNT2`` [Brazilian] or ``KS`` [Korean])."""
123
124 description = None
125 """A human-readable description of the region.
126 This defaults to :py:attr:`region_code` if not set."""
127
128 notes = None
129 """Implementation notes about the region. This may be None."""
130
Hung-Te Lin436b6cc2015-04-03 12:15:47 +0800131 regulatory_domain = None
132 """An ISO 3166-1 alpha 2 upper-cased two-letter region code for setting
133 Wireless regulatory. See crosbug.com/p/38745 for more details.
134
135 When omitted, this will derive from region_code."""
136
Hung-Te Lin1a14cc42015-04-14 01:23:34 +0800137 confirmed = None
138 """An optional boolean flag to indicate if the region data is confirmed."""
139
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800140 FIELDS = ['region_code', 'description', 'keyboards',
Hung-Te Lin1a14cc42015-04-14 01:23:34 +0800141 'time_zones', 'locales', 'keyboard_mechanical_layout',
142 'regulatory_domain']
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800143 """Names of fields that define the region."""
144
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800145 def __init__(self, region_code, keyboards, time_zones, locales,
146 keyboard_mechanical_layout, description=None, notes=None,
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800147 regdomain=None):
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800148 """Constructor.
149
150 Args:
151 region_code: See :py:attr:`region_code`.
152 keyboards: See :py:attr:`keyboards`. A single string is accepted for
153 backward compatibility.
154 time_zones: See :py:attr:`time_zones`.
155 locales: See :py:attr:`locales`. A single string is accepted
156 for backward compatibility.
157 keyboard_mechanical_layout: See :py:attr:`keyboard_mechanical_layout`.
158 description: See :py:attr:`description`.
159 notes: See :py:attr:`notes`.
Hung-Te Lin436b6cc2015-04-03 12:15:47 +0800160 regdomain: See :py:attr:`regulatory_domain`.
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800161 """
Hung-Te Lin436b6cc2015-04-03 12:15:47 +0800162
163 def regdomain_from_region(region):
164 if region.find('.') >= 0:
165 region = region[:region.index('.')]
166 if len(region) == 2:
167 return region.upper()
168 return None
169
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800170 # Quick check: should be 'gb', not 'uk'
171 if region_code == 'uk':
172 raise RegionException("'uk' is not a valid region code (use 'gb')")
173
174 self.region_code = region_code
175 self.keyboards = MakeList(keyboards)
176 self.time_zones = MakeList(time_zones)
177 self.locales = MakeList(locales)
178 self.keyboard_mechanical_layout = keyboard_mechanical_layout
179 self.description = description or region_code
180 self.notes = notes
Hung-Te Lin436b6cc2015-04-03 12:15:47 +0800181 self.regulatory_domain = (regdomain or regdomain_from_region(region_code))
Hung-Te Lin1a14cc42015-04-14 01:23:34 +0800182 self.confirmed = None
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800183
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800184 for f in (self.keyboards, self.locales):
185 assert all(isinstance(x, str) for x in f), (
186 'Expected a list of strings, not %r' % f)
187 for f in self.keyboards:
188 assert KEYBOARD_PATTERN.match(f), (
189 'Keyboard pattern %r does not match %r' % (
190 f, KEYBOARD_PATTERN.pattern))
191 for f in self.locales:
192 assert LOCALE_PATTERN.match(f), (
193 'Locale %r does not match %r' % (
194 f, LOCALE_PATTERN.pattern))
Hung-Te Lin436b6cc2015-04-03 12:15:47 +0800195 assert (self.regulatory_domain and
196 len(self.regulatory_domain) == 2 and
197 self.regulatory_domain.upper() == self.regulatory_domain), (
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800198 'Regulatory domain settings error for region %s' % region_code)
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800199
200 def __repr__(self):
201 return 'Region(%s)' % (', '.join([getattr(self, x) for x in self.FIELDS]))
202
203 def GetFieldsDict(self):
204 """Returns a dict of all substantive fields.
205
206 notes and description are excluded.
207 """
208 return dict((k, getattr(self, k)) for k in self.FIELDS)
209
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800210KML = Region.KeyboardMechanicalLayout
Matt Stark1987c532021-04-19 10:12:35 +1000211PSEUDOLOCALE_REGIONS_LIST = [
212 Region(
213 'ar.xb', 'xkb:us::eng', 'America/Los_Angeles', 'ar-XB', KML.ANSI,
214 'Pseudolocale (RTL)'),
215 Region(
216 'en.xa', 'xkb:us::eng', 'America/Los_Angeles', 'en-XA', KML.ANSI,
217 'Pseudolocale (long strings)'),
218]
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800219REGIONS_LIST = [
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800220 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800221 'au', 'xkb:us::eng', 'Australia/Sydney', 'en-AU', KML.ANSI,
222 'Australia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800223 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800224 'be', 'xkb:be::nld', 'Europe/Brussels', 'en-GB', KML.ISO,
225 'Belgium', (
226 'Flemish (Belgian Dutch) keyboard; British English language for '
227 'neutrality')),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800228 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800229 'br', 'xkb:br::por', 'America/Sao_Paulo', 'pt-BR', KML.ABNT2,
230 'Brazil (ABNT2)', (
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800231 'ABNT2 = ABNT NBR 10346 variant 2. This is the preferred layout '
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800232 'for Brazil. ABNT2 is mostly an ISO layout, but it 12 keys between '
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800233 'the shift keys; see http://goo.gl/twA5tq')),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800234 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800235 'br.abnt', 'xkb:br::por', 'America/Sao_Paulo', 'pt-BR', KML.ISO,
236 'Brazil (ABNT)', (
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800237 'Like ABNT2, but lacking the extra key to the left of the right '
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800238 'shift key found in that layout. ABNT2 (the "br" region) is '
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800239 'preferred to this layout')),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800240 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800241 'br.usintl', 'xkb:us:intl:eng', 'America/Sao_Paulo', 'pt-BR', KML.ANSI,
242 'Brazil (US Intl)', (
243 'Brazil with US International keyboard layout. ABNT2 ("br") and '
244 'ABNT1 ("br.abnt1 ") are both preferred to this.')),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800245 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800246 'ca.ansi', 'xkb:us::eng', 'America/Toronto', 'en-CA', KML.ANSI,
247 'Canada (US keyboard)', (
248 'Canada with US (ANSI) keyboard. Only allowed if there are '
249 'separate US English, Canadian English, and French SKUs. '
250 'Not for en/fr hybrid ANSI keyboards; for that you would want '
251 'ca.hybridansi. See http://goto/cros-canada')),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800252 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800253 'ca.fr', 'xkb:ca::fra', 'America/Toronto', 'fr-CA', KML.ISO,
254 'Canada (French keyboard)', (
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800255 'Canadian French (ISO) keyboard. The most common configuration for '
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800256 'Canadian French SKUs. See http://goto/cros-canada')),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800257 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800258 'ca.hybrid', 'xkb:ca:eng:eng', 'America/Toronto', 'en-CA', KML.ISO,
259 'Canada (hybrid ISO)', (
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800260 'Canada with hybrid (ISO) xkb:ca:eng:eng + xkb:ca::fra keyboard, '
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800261 'defaulting to English language and keyboard. Used only if there '
262 'needs to be a single SKU for all of Canada. See '
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800263 'http://goto/cros-canada')),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800264 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800265 'ca.hybridansi', 'xkb:ca:eng:eng', 'America/Toronto', 'en-CA', KML.ANSI,
266 'Canada (hybrid ANSI)', (
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800267 'Canada with hybrid (ANSI) xkb:ca:eng:eng + xkb:ca::fra keyboard, '
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800268 'defaulting to English language and keyboard. Used only if there '
269 'needs to be a single SKU for all of Canada. See '
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800270 'http://goto/cros-canada')),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800271 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800272 'ca.multix', 'xkb:ca:multix:fra', 'America/Toronto', 'fr-CA', KML.ISO,
273 'Canada (multilingual)', (
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800274 "Canadian Multilingual keyboard; you probably don't want this. See "
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800275 'http://goto/cros-canada')),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800276 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800277 'ch', 'xkb:ch::ger', 'Europe/Zurich', 'de-CH', KML.ISO,
278 'Switzerland', (
279 'German keyboard')),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800280 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800281 'de', 'xkb:de::ger', 'Europe/Berlin', 'de', KML.ISO,
282 'Germany'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800283 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800284 'es', 'xkb:es::spa', 'Europe/Madrid', 'es', KML.ISO,
285 'Spain'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800286 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800287 'fi', 'xkb:fi::fin', 'Europe/Helsinki', 'fi', KML.ISO,
288 'Finland'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800289 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800290 'fr', 'xkb:fr::fra', 'Europe/Paris', 'fr', KML.ISO,
291 'France'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800292 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800293 'gb', 'xkb:gb:extd:eng', 'Europe/London', 'en-GB', KML.ISO,
294 'UK'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800295 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800296 'ie', 'xkb:gb:extd:eng', 'Europe/Dublin', 'en-GB', KML.ISO,
297 'Ireland'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800298 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800299 'in', 'xkb:us::eng', 'Asia/Calcutta', 'en-US', KML.ANSI,
300 'India'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800301 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800302 'it', 'xkb:it::ita', 'Europe/Rome', 'it', KML.ISO,
303 'Italy'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800304 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800305 'latam-es-419', 'xkb:es::spa', 'America/Mexico_City', 'es-419', KML.ISO,
306 'Hispanophone Latin America', (
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800307 'Spanish-speaking countries in Latin America, using the Iberian '
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800308 '(Spain) Spanish keyboard, which is increasingly dominant in '
309 'Latin America. Known to be correct for '
310 'Chile, Colombia, Mexico, Peru; '
311 'still unconfirmed for other es-419 countries. The old Latin '
312 'American layout (xkb:latam::spa) has not been approved; before '
313 'using that you must seek review through http://goto/vpdsettings. '
314 'See also http://goo.gl/Iffuqh. Note that 419 is the UN M.49 '
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800315 'region code for Latin America'), 'MX'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800316 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800317 'my', 'xkb:us::eng', 'Asia/Kuala_Lumpur', 'ms', KML.ANSI,
318 'Malaysia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800319 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800320 'nl', 'xkb:us:intl:eng', 'Europe/Amsterdam', 'nl', KML.ANSI,
321 'Netherlands'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800322 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800323 'nordic', 'xkb:se::swe', 'Europe/Stockholm', 'en-US', KML.ISO,
324 'Nordics', (
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800325 'Unified SKU for Sweden, Norway, and Denmark. This defaults '
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800326 'to Swedish keyboard layout, but starts with US English language '
327 'for neutrality. Use if there is a single combined SKU for Nordic '
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800328 'countries.'), 'SE'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800329 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800330 'nz', 'xkb:us::eng', 'Pacific/Auckland', 'en-NZ', KML.ANSI,
331 'New Zealand'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800332 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800333 'ph', 'xkb:us::eng', 'Asia/Manila', 'en-US', KML.ANSI,
334 'Philippines'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800335 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800336 'ru', ['xkb:us::eng', 'xkb:ru::rus'], 'Europe/Moscow', 'ru', KML.ANSI,
337 'Russia', (
338 'For R31+ only; R30 and earlier must use US keyboard for login')),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800339 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800340 'se', 'xkb:se::swe', 'Europe/Stockholm', 'sv', KML.ISO,
341 'Sweden', (
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800342 'Use this if there separate SKUs for Nordic countries (Sweden, '
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800343 'Norway, and Denmark), or the device is only shipping to Sweden. '
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800344 "If there is a single unified SKU, use 'nordic' instead.")),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800345 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800346 'sg', 'xkb:us::eng', 'Asia/Singapore', 'en-GB', KML.ANSI,
347 'Singapore'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800348 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800349 'us', 'xkb:us::eng', 'America/Los_Angeles', 'en-US', KML.ANSI,
350 'United States'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800351 Region(
Bao-Duy Tranf79b8f92019-07-04 17:12:01 +1000352 'jp', ['xkb:jp::jpn', 'ime:jp:mozc_jp'], 'Asia/Tokyo', 'ja', KML.JIS,
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800353 'Japan'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800354 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800355 'za', 'xkb:gb:extd:eng', 'Africa/Johannesburg', 'en-ZA', KML.ISO,
356 'South Africa'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800357 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800358 'ng', 'xkb:us:intl:eng', 'Africa/Lagos', 'en-GB', KML.ANSI,
359 'Nigeria'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800360 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800361 'hk', ['xkb:us::eng', 'ime:zh-t:cangjie', 'ime:zh-t:quick',
362 'ime:zh-t:array', 'ime:zh-t:dayi', 'ime:zh-t:zhuyin',
363 'ime:zh-t:pinyin'], 'Asia/Hong_Kong', ['zh-TW', 'en-GB',
364 'zh-CN'], KML.ANSI,
365 'Hong Kong'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800366 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800367 'gcc', ['xkb:us::eng', 'm17n:ar', 't13n:ar'], 'Asia/Riyadh', [
368 'ar', 'en-GB'],
369 KML.ANSI,
370 'Gulf Cooperation Council (GCC)', (
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800371 'GCC is a regional intergovernmental political and economic '
372 'union consisting of all Arab states of the Persian Gulf except '
373 'for Iraq. Its member states are the Islamic monarchies of '
374 'Bahrain, Kuwait, Oman, Qatar, Saudi Arabia, and the United Arab '
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800375 'Emirates.'), 'SA'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800376 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800377 'cz', ['xkb:cz::cze', 'xkb:cz:qwerty:cze'], 'Europe/Prague', [
378 'cs', 'en-GB'], KML.ISO,
379 'Czech Republic'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800380 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800381 'th', ['xkb:us::eng', 'm17n:th', 'm17n:th_pattajoti',
382 'm17n:th_tis'], 'Asia/Bangkok', ['th', 'en-GB'], KML.ANSI,
383 'Thailand'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800384 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800385 'id', 'xkb:us::ind', 'Asia/Jakarta', ['id', 'en-GB'], KML.ANSI,
386 'Indonesia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800387 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800388 'tw', ['xkb:us::eng', 'ime:zh-t:zhuyin', 'ime:zh-t:array',
389 'ime:zh-t:dayi', 'ime:zh-t:cangjie', 'ime:zh-t:quick',
390 'ime:zh-t:pinyin'], 'Asia/Taipei', ['zh-TW', 'en-US'], KML.ANSI,
391 'Taiwan'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800392 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800393 'pl', 'xkb:pl::pol', 'Europe/Warsaw', ['pl', 'en-GB'], KML.ANSI,
394 'Poland'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800395 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800396 'gr', ['xkb:us::eng', 'xkb:gr::gre', 't13n:el'], 'Europe/Athens', [
397 'el', 'en-GB'], KML.ANSI,
398 'Greece'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800399 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800400 'il', ['xkb:us::eng', 'xkb:il::heb', 't13n:he'], 'Asia/Jerusalem', [
401 'he', 'en-US', 'ar'], KML.ANSI,
402 'Israel'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800403 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800404 'pt', 'xkb:pt::por', 'Europe/Lisbon', ['pt-PT', 'en-GB'], KML.ISO,
405 'Portugal'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800406 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800407 'ro', ['xkb:us::eng', 'xkb:ro::rum'], 'Europe/Bucharest', [
408 'ro', 'hu', 'de', 'en-GB'], KML.ISO,
409 'Romania'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800410 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800411 'kr', ['xkb:us::eng', 'ime:ko:hangul'], 'Asia/Seoul', [
412 'ko', 'en-US'], KML.ANSI,
413 'South Korea'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800414 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800415 'ae', 'xkb:us::eng', 'Asia/Dubai', 'ar', KML.ANSI,
416 'UAE'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800417 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800418 'za.us', 'xkb:us::eng', 'Africa/Johannesburg', 'en-ZA', KML.ANSI,
419 'South Africa'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800420 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800421 'vn', ['xkb:us::eng', 'm17n:vi_telex', 'm17n:vi_vni', 'm17n:vi_viqr',
422 'm17n:vi_tcvn'], 'Asia/Ho_Chi_Minh', ['vi', 'en-GB', 'en-US',
423 'fr', 'zh-TW'], KML.ANSI,
424 'Vietnam'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800425 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800426 'at', ['xkb:de::ger', 'xkb:de:neo:ger'], 'Europe/Vienna', [
427 'de', 'en-GB'], KML.ISO,
428 'Austria'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800429 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800430 'sk', ['xkb:us::eng', 'xkb:sk::slo'], 'Europe/Bratislava', [
431 'sk', 'hu', 'cs', 'en-GB'], KML.ISO,
432 'Slovakia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800433 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800434 'ch.usintl', 'xkb:us:intl:eng', 'Europe/Zurich', 'en-US', KML.ANSI,
435 'Switzerland (US Intl)', (
436 'Switzerland with US International keyboard layout.')),
Hung-Te Lindf179fd2016-05-12 19:22:13 +0800437 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800438 'pe', 'xkb:latam::spa', 'America/Lima', 'es-419', KML.ANSI,
439 'Peru'),
Hung-Te Lindf179fd2016-05-12 19:22:13 +0800440 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800441 'sa', 'xkb:us::eng', 'Asia/Riyadh', ['ar', 'en'], KML.ANSI,
442 'Saudi Arabia'),
Hung-Te Lindf179fd2016-05-12 19:22:13 +0800443 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800444 'mx', 'xkb:latam::spa', 'America/Mexico_City', 'es-MX', KML.ANSI,
445 'Mexico'),
Hung-Te Lindf179fd2016-05-12 19:22:13 +0800446 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800447 'cl', 'xkb:latam::spa', 'America/Santiago', 'es-419', KML.ANSI,
448 'Chile'),
Hung-Te Lindf179fd2016-05-12 19:22:13 +0800449 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800450 'kw', ['xkb:us::eng', 'm17n:ar', 't13n:ar'], 'Asia/Kuwait', [
451 'ar', 'en'], KML.ANSI,
452 'Kuwait'),
Hung-Te Lindf179fd2016-05-12 19:22:13 +0800453 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800454 'uy', 'xkb:latam::spa', 'America/Montevideo', 'es-419', KML.ANSI,
455 'Uruguay'),
Hung-Te Lin37fbbbf2016-06-28 17:19:38 +0800456 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800457 'tr', ['xkb:tr::tur', 'xkb:tr:f:tur'], 'Europe/Istanbul', [
458 'tr', 'en-GB'], KML.ISO,
459 'Turkey'),
Hung-Te Lin639a05b2016-12-02 12:39:19 +0800460 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800461 'ar', 'xkb:latam::spa', 'America/Argentina/Buenos_Aires', [
paris_yeh8652e752017-06-06 14:38:23 +0800462 'es-AR', ], KML.ISO,
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800463 'Argentina'),
Hung-Te Lincf2f02b2017-03-20 14:58:20 +0800464 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800465 'gb.usext', 'xkb:us:altgr-intl:eng', 'Europe/London', 'en-GB', KML.ISO,
466 'UK (US extended keyboard)', (
467 'GB with US extended keyboard')),
Hung-Te Linfe0165d2018-05-02 19:15:03 +0800468 Region(
469 'bg', ['xkb:bg::bul', 'xkb:bg:phonetic:bul'], 'Europe/Sofia', [
470 'bg', 'tr', 'en-US'], KML.ANSI,
471 'Bulgaria'),
Wei-Han Chen763e6722018-11-16 12:23:19 +0800472 Region(
Bao-Duy Tranf79b8f92019-07-04 17:12:01 +1000473 'jp.us', ['xkb:us::eng', 'ime:jp:mozc_us'], 'Asia/Tokyo', 'ja',
474 KML.ANSI, 'Japan with US keyboard'),
Marco Chen233ea672018-09-19 21:46:49 +0800475 Region(
476 'is', 'xkb:is::ice', 'Atlantic/Reykjavik', ['is', 'en-GB'], KML.ISO,
477 'Iceland'),
Marco Chen2b3a91c2019-05-13 23:22:59 +0800478 Region(
479 'us.intl', 'xkb:us:intl:eng', 'America/Los_Angeles', 'en-US', KML.ANSI,
480 'US (English Intl)'),
Marco Chen773fe7f2019-05-13 23:08:18 +0800481 Region(
482 'co', 'xkb:latam::spa', 'America/Bogota', 'es-CO', KML.ANSI,
483 'Colombia'),
Stimim Chen053650c2020-04-30 11:49:10 +0800484 Region(
485 'hr', 'xkb:hr::scr', 'Europe/Zagreb', ['hr', 'en-GB'], KML.ISO,
486 'Croatia'),
Bao-Duy Trana828da62020-05-29 19:03:04 +1000487 Region(
Alexander Alekseev0725bd92021-04-10 00:03:31 -0700488 'kz', ['xkb:us::eng', 'xkb:kz::kaz', 'xkb:ru::rus'],
Bao-Duy Trana828da62020-05-29 19:03:04 +1000489 ['Asia/Almaty', 'Asia/Aqtobe'], ['kk', 'ru'], KML.ANSI, 'Kazakhstan'),
Stimim Chen67b5f822021-02-01 16:23:42 +0800490 Region(
491 'ee', 'xkb:ee::est', 'Europe/Tallinn', ['et', 'ru', 'en-GB'], KML.ISO,
492 'Estonia'),
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800493 ]
Hung-Te Lin37fbbbf2016-06-28 17:19:38 +0800494
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800495"""A list of :py:class:`regions.Region` objects for
496all **confirmed** regions. A confirmed region is a region whose
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800497properties are known to be correct and valid: all contents (locale / timezone /
Bao-Duy Tranfd69c2f2020-06-16 17:28:07 +1000498keyboards) are supported by Chrome.
499
500NOTE: This list is NOT alpha-sorted. New entries MUST be appended to the end of
501the list to retain relative order of existing entries. For backward
502compatibility, legacy entries need to stay in the same order because they used
503to have numeric mappings.
504"""
Hung-Te Lin76c55b22015-03-31 14:47:14 +0800505
506
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800507UNCONFIRMED_REGIONS_LIST = [
508 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800509 'bd', 'xkb:bd::ben', 'Asia/Dhaka', ['bn-BD', 'en'], KML.ANSI,
510 'Bangladesh'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800511 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800512 'bf', 'xkb:bf::fra', 'Africa/Ouagadougou', 'fr-BF', KML.ANSI,
513 'Burkina Faso'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800514 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800515 'ba', 'xkb:ba::bos', 'Europe/Sarajevo', 'bs', KML.ANSI,
516 'Bosnia and Herzegovina'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800517 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800518 'bb', 'xkb:bb::eng', 'America/Barbados', 'en-BB', KML.ANSI,
519 'Barbados'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800520 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800521 'wf', 'xkb:us::eng', 'Pacific/Wallis', ['wls', 'fud'], KML.ANSI,
522 'Wallis and Futuna'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800523 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800524 'bl', 'xkb:bl::fra', 'America/St_Barthelemy', 'fr', KML.ANSI,
525 'Saint Barthelemy'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800526 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800527 'bm', 'xkb:bm::eng', 'Atlantic/Bermuda', ['en-BM', 'pt'], KML.ANSI,
528 'Bermuda'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800529 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800530 'bn', 'xkb:bn::msa', 'Asia/Brunei', ['ms-BN', 'en-BN'], KML.ANSI,
531 'Brunei'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800532 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800533 'bo', 'xkb:latam::spa', 'America/La_Paz', ['es-419', 'qu'], KML.ANSI,
534 'Bolivia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800535 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800536 'bh', 'xkb:bh::ara', 'Asia/Bahrain', ['ar', 'en', 'fa', 'ru'], KML.ANSI,
537 'Bahrain'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800538 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800539 'bi', 'xkb:bi::fra', 'Africa/Bujumbura', ['fr-BI', 'rn'], KML.ANSI,
540 'Burundi'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800541 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800542 'bj', 'xkb:bj::fra', 'Africa/Porto-Novo', 'fr-BJ', KML.ANSI,
543 'Benin'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800544 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800545 'bt', 'xkb:bt::dzo', 'Asia/Thimphu', 'dz', KML.ANSI,
546 'Bhutan'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800547 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800548 'jm', 'xkb:jm::eng', 'America/Jamaica', 'en-JM', KML.ANSI,
549 'Jamaica'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800550 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800551 'bw', 'xkb:bw::eng', 'Africa/Gaborone', ['en-BW', 'tn-BW'], KML.ANSI,
552 'Botswana'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800553 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800554 'ws', 'xkb:ws::smo', 'Pacific/Apia', ['sm', 'en-WS'], KML.ANSI,
555 'Samoa'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800556 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800557 'bq', 'xkb:bq::nld', 'America/Kralendijk', ['nl', 'en'], KML.ANSI,
558 'Bonaire, Saint Eustatius and Saba '),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800559 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800560 'bs', 'xkb:bs::eng', 'America/Nassau', 'en-BS', KML.ANSI,
561 'Bahamas'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800562 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800563 'je', 'xkb:je::eng', 'Europe/Jersey', ['en', 'pt'], KML.ANSI,
564 'Jersey'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800565 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800566 'by', 'xkb:by::bel', 'Europe/Minsk', ['be', 'ru'], KML.ANSI,
567 'Belarus'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800568 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800569 'bz', 'xkb:bz::eng', 'America/Belize', ['en-BZ', 'es'], KML.ANSI,
570 'Belize'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800571 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800572 'rw', 'xkb:rw::kin', 'Africa/Kigali', ['rw', 'en-RW'], KML.ANSI,
573 'Rwanda'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800574 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800575 'rs', 'xkb:rs::srp', 'Europe/Belgrade', ['sr', 'hu', 'bs'], KML.ANSI,
576 'Serbia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800577 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800578 'tl', 'xkb:us::eng', 'Asia/Dili', ['tet', 'pt-TL', 'en'], KML.ANSI,
579 'East Timor'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800580 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800581 're', 'xkb:re::fra', 'Indian/Reunion', 'fr-RE', KML.ANSI,
582 'Reunion'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800583 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800584 'tm', 'xkb:tm::tuk', 'Asia/Ashgabat', ['tk', 'ru', 'uz'], KML.ANSI,
585 'Turkmenistan'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800586 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800587 'tj', 'xkb:tj::tgk', 'Asia/Dushanbe', ['tg', 'ru'], KML.ANSI,
588 'Tajikistan'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800589 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800590 'tk', 'xkb:us::eng', 'Pacific/Fakaofo', ['tkl', 'en-TK'], KML.ANSI,
591 'Tokelau'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800592 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800593 'gw', 'xkb:gw::por', 'Africa/Bissau', ['pt-GW', 'pov'], KML.ANSI,
594 'Guinea-Bissau'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800595 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800596 'gu', 'xkb:gu::eng', 'Pacific/Guam', ['en-GU', 'ch-GU'], KML.ANSI,
597 'Guam'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800598 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800599 'gt', 'xkb:latam::spa', 'America/Guatemala', 'es-419', KML.ANSI,
600 'Guatemala'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800601 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800602 'gs', 'xkb:gs::eng', 'Atlantic/South_Georgia', 'en', KML.ANSI,
603 'South Georgia and the South Sandwich Islands'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800604 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800605 'gq', 'xkb:gq::spa', 'Africa/Malabo', ['es-419', 'fr'], KML.ANSI,
606 'Equatorial Guinea'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800607 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800608 'gp', 'xkb:gp::fra', 'America/Guadeloupe', 'fr-GP', KML.ANSI,
609 'Guadeloupe'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800610 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800611 'gy', 'xkb:gy::eng', 'America/Guyana', 'en-GY', KML.ANSI,
612 'Guyana'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800613 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800614 'gg', 'xkb:gg::eng', 'Europe/Guernsey', ['en', 'fr'], KML.ANSI,
615 'Guernsey'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800616 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800617 'gf', 'xkb:gf::fra', 'America/Cayenne', 'fr-GF', KML.ANSI,
618 'French Guiana'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800619 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800620 'ge', 'xkb:ge::geo', 'Asia/Tbilisi', 'ka', KML.ANSI,
621 'Georgia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800622 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800623 'gd', 'xkb:gd::eng', 'America/Grenada', 'en-GD', KML.ANSI,
624 'Grenada'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800625 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800626 'ga', 'xkb:ga::fra', 'Africa/Libreville', 'fr-GA', KML.ANSI,
627 'Gabon'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800628 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800629 'sv', 'xkb:latam::spa', 'America/El_Salvador', 'es-419', KML.ANSI,
630 'El Salvador'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800631 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800632 'gn', 'xkb:gn::fra', 'Africa/Conakry', 'fr-GN', KML.ANSI,
633 'Guinea'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800634 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800635 'gm', 'xkb:gm::eng', 'Africa/Banjul', ['en-GM', 'mnk', 'wof'], KML.ANSI,
636 'Gambia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800637 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800638 'gl', 'xkb:gl::kal', ['America/Godthab', 'America/Danmarkshavn',
639 'America/Scoresbysund', 'America/Thule'], [
640 'kl', 'da-GL', 'en'], KML.ANSI,
641 'Greenland'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800642 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800643 'gi', 'xkb:gi::eng', 'Europe/Gibraltar', ['en-GI', 'es'], KML.ANSI,
644 'Gibraltar'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800645 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800646 'gh', 'xkb:gh::eng', 'Africa/Accra', ['en-GH', 'ak', 'ee'], KML.ANSI,
647 'Ghana'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800648 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800649 'om', 'xkb:om::ara', 'Asia/Muscat', ['ar', 'en', 'bal'], KML.ANSI,
650 'Oman'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800651 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800652 'tn', 'xkb:tn::ara', 'Africa/Tunis', ['ar', 'fr'], KML.ANSI,
653 'Tunisia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800654 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800655 'jo', 'xkb:jo::ara', 'Asia/Amman', ['ar', 'en'], KML.ANSI,
656 'Jordan'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800657 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800658 'hn', 'xkb:latam::spa', 'America/Tegucigalpa', 'es-HN', KML.ANSI,
659 'Honduras'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800660 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800661 'ht', 'xkb:ht::hat', 'America/Port-au-Prince', ['ht'], KML.ANSI,
662 'Haiti'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800663 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800664 'hu', ['xkb:us::eng', 'xkb:hu::hun'], 'Europe/Budapest', [
665 'hu', 'en-GB'], KML.ISO,
666 'Hungary'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800667 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800668 've', 'xkb:latam::spa', 'America/Caracas', 'es-419', KML.ANSI,
669 'Venezuela'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800670 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800671 'pr', 'xkb:pr::eng', 'America/Puerto_Rico', ['en-PR'], KML.ANSI,
672 'Puerto Rico'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800673 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800674 'ps', 'xkb:ps::ara', ['Asia/Gaza', 'Asia/Hebron'], 'ar', KML.ANSI,
675 'Palestinian Territory'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800676 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800677 'pw', 'xkb:us::eng', 'Pacific/Palau', ['pau', 'sov', 'en-PW', 'tox',
678 'ja', 'fil', 'zh'], KML.ANSI,
679 'Palau'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800680 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800681 'sj', 'xkb:sj::nor', 'Arctic/Longyearbyen', ['no', 'ru'], KML.ANSI,
682 'Svalbard and Jan Mayen'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800683 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800684 'py', 'xkb:latam::spa', 'America/Asuncion', ['es-419', 'gn'], KML.ANSI,
685 'Paraguay'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800686 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800687 'iq', 'xkb:iq::ara', 'Asia/Baghdad', ['ar', 'ku', 'hy'], KML.ANSI,
688 'Iraq'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800689 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800690 'pa', 'xkb:latam::spa', 'America/Panama', ['es-419', 'en'], KML.ANSI,
691 'Panama'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800692 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800693 'pf', 'xkb:pf::fra', ['Pacific/Tahiti', 'Pacific/Marquesas',
694 'Pacific/Gambier'], ['fr-PF', 'ty'], KML.ANSI,
695 'French Polynesia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800696 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800697 'pg', 'xkb:pg::eng', ['Pacific/Port_Moresby',
698 'Pacific/Bougainville'], ['en-PG', 'ho', 'meu',
699 'tpi'], KML.ANSI,
700 'Papua New Guinea'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800701 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800702 'pk', 'xkb:pk::urd', 'Asia/Karachi', ['ur-PK', 'en-PK', 'pa', 'sd',
703 'ps', 'brh'], KML.ANSI,
704 'Pakistan'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800705 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800706 'pn', 'xkb:pn::eng', 'Pacific/Pitcairn', 'en-PN', KML.ANSI,
707 'Pitcairn'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800708 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800709 'pm', 'xkb:pm::fra', 'America/Miquelon', 'fr-PM', KML.ANSI,
710 'Saint Pierre and Miquelon'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800711 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800712 'zm', 'xkb:zm::eng', 'Africa/Lusaka', ['en-ZM', 'bem', 'loz', 'lun',
713 'lue', 'ny', 'toi'], KML.ANSI,
714 'Zambia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800715 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800716 'eh', 'xkb:eh::ara', 'Africa/El_Aaiun', ['ar', 'mey'], KML.ANSI,
717 'Western Sahara'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800718 Region(
Hung-Te Lin47da9092017-03-20 15:01:56 +0800719 'eg', 'xkb:eg::ara', 'Africa/Cairo', ['ar', 'en', 'fr'],
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800720 KML.ANSI, 'Egypt'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800721 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800722 'ec', 'xkb:latam::spa', ['America/Guayaquil'], 'es-419', KML.ANSI,
723 'Ecuador'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800724 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800725 'sb', 'xkb:sb::eng', 'Pacific/Guadalcanal', ['en-SB', 'tpi'], KML.ANSI,
726 'Solomon Islands'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800727 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800728 'et', 'xkb:et::amh', 'Africa/Addis_Ababa', ['am', 'en-ET', 'om-ET',
729 'ti-ET'], KML.ANSI,
730 'Ethiopia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800731 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800732 'so', 'xkb:so::som', 'Africa/Mogadishu', ['so-SO', 'ar'], KML.ANSI,
733 'Somalia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800734 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800735 'zw', 'xkb:zw::eng', 'Africa/Harare', ['en-ZW', 'sn', 'nr'], KML.ANSI,
736 'Zimbabwe'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800737 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800738 'er', 'xkb:er::aar', 'Africa/Asmara', ['aa-ER', 'ar', 'tig', 'kun',
739 'ti-ER'], KML.ANSI,
740 'Eritrea'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800741 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800742 'me', 'xkb:me::srp', 'Europe/Podgorica', ['sr', 'hu', 'bs', 'sq', 'hr',
743 'rom'], KML.ANSI,
744 'Montenegro'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800745 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800746 'md', 'xkb:md::ron', 'Europe/Chisinau', ['ro', 'ru', 'gag'], KML.ANSI,
747 'Moldova'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800748 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800749 'mg', 'xkb:mg::fra', 'Indian/Antananarivo', ['fr-MG', 'mg'], KML.ANSI,
750 'Madagascar'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800751 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800752 'mf', 'xkb:mf::fra', 'America/Marigot', 'fr', KML.ANSI, 'Saint Martin'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800753 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800754 'ma', 'xkb:ma::ara', 'Africa/Casablanca', ['ar', 'fr'], KML.ANSI,
755 'Morocco'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800756 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800757 'mc', 'xkb:mc::fra', 'Europe/Monaco', ['fr-MC', 'en', 'it'], KML.ANSI,
758 'Monaco'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800759 Region(
760 'uz', 'xkb:uz::uzb', ['Asia/Samarkand', 'Asia/Tashkent'],
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800761 ['uz', 'ru', 'tg'], KML.ANSI, 'Uzbekistan'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800762 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800763 'mm', 'xkb:mm::mya', 'Asia/Rangoon', 'my', KML.ANSI, 'Myanmar',
764 None),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800765 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800766 'ml', 'xkb:ml::fra', 'Africa/Bamako', ['fr-ML', 'bm'], KML.ANSI,
767 'Mali'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800768 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800769 'mo', 'xkb:mo::zho', 'Asia/Macau', ['zh', 'zh-MO', 'pt'], KML.ANSI,
770 'Macao'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800771 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800772 'mn', 'xkb:mn::mon', ['Asia/Ulaanbaatar', 'Asia/Hovd',
773 'Asia/Choibalsan'], ['mn', 'ru'], KML.ANSI,
774 'Mongolia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800775 Region(
Clark Chung0005a702020-05-26 16:34:52 +0800776 'mh', 'xkb:mh::mah', ['Pacific/Majuro'], ['mh', 'en-MH'], KML.ANSI,
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800777 'Marshall Islands'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800778 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800779 'mk', 'xkb:mk::mkd', 'Europe/Skopje', ['mk', 'sq', 'tr'], KML.ANSI,
780 'Macedonia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800781 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800782 'mu', 'xkb:mu::eng', 'Indian/Mauritius', ['en-MU', 'bho'], KML.ANSI,
783 'Mauritius'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800784 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800785 'mt', ['xkb:us::eng'], 'Europe/Malta', ['mt', 'en-GB'], KML.ISO,
786 'Malta'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800787 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800788 'mw', 'xkb:mw::nya', 'Africa/Blantyre', ['ny', 'yao', 'tum'], KML.ANSI,
789 'Malawi'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800790 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800791 'mv', 'xkb:mv::div', 'Indian/Maldives', ['dv', 'en'], KML.ANSI,
792 'Maldives'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800793 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800794 'mq', 'xkb:mq::fra', 'America/Martinique', 'fr-MQ', KML.ANSI,
795 'Martinique'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800796 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800797 'mp', 'xkb:us::eng', 'Pacific/Saipan', ['fil', 'tl', 'zh', 'ch-MP',
798 'en-MP'], KML.ANSI,
799 'Northern Mariana Islands'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800800 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800801 'ms', 'xkb:ms::eng', 'America/Montserrat', 'en-MS', KML.ANSI,
802 'Montserrat'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800803 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800804 'mr', 'xkb:mr::ara', 'Africa/Nouakchott', ['ar', 'fuc', 'snk', 'fr',
805 'mey', 'wo'], KML.ANSI,
806 'Mauritania'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800807 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800808 'im', 'xkb:im::eng', 'Europe/Isle_of_Man', ['en', 'gv'], KML.ANSI,
809 'Isle of Man'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800810 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800811 'ug', 'xkb:ug::eng', 'Africa/Kampala', ['en-UG', 'lg', 'ar'], KML.ANSI,
812 'Uganda'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800813 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800814 'tz', 'xkb:tz::swa', 'Africa/Dar_es_Salaam', ['sw-TZ', 'en'], KML.ANSI,
815 'Tanzania'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800816 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800817 'io', 'xkb:io::eng', 'Indian/Chagos', 'en-IO', KML.ANSI,
818 'British Indian Ocean Territory'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800819 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800820 'sh', 'xkb:sh::eng', 'Atlantic/St_Helena', 'en-SH', KML.ANSI,
821 'Saint Helena'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800822 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800823 'fj', 'xkb:fj::eng', 'Pacific/Fiji', ['en-FJ', 'fj'], KML.ANSI,
824 'Fiji'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800825 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800826 'fk', 'xkb:fk::eng', 'Atlantic/Stanley', 'en-FK', KML.ANSI,
827 'Falkland Islands'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800828 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800829 'fm', 'xkb:fm::eng', [
830 'Pacific/Chuuk', 'Pacific/Pohnpei', 'Pacific/Kosrae'], [
831 'en-FM', 'chk', 'pon', 'yap', 'kos', 'uli', 'woe', 'nkr',
832 'kpg'], KML.ANSI,
833 'Micronesia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800834 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800835 'fo', 'xkb:fo::fao', 'Atlantic/Faroe', ['fo', 'da-FO'], KML.ANSI,
836 'Faroe Islands'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800837 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800838 'ni', 'xkb:latam::spa', 'America/Managua', ['es-419', 'en'], KML.ANSI,
839 'Nicaragua'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800840 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800841 'no', 'xkb:no::nor', 'Europe/Oslo', ['no', 'nb', 'nn', 'se'], KML.ISO,
842 'Norway'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800843 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800844 'na', 'xkb:na::eng', 'Africa/Windhoek', ['en-NA', 'af', 'de', 'hz',
845 'naq'], KML.ANSI,
846 'Namibia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800847 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800848 'vu', 'xkb:vu::bis', 'Pacific/Efate', ['bi', 'en-VU'], KML.ANSI,
849 'Vanuatu'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800850 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800851 'nc', 'xkb:nc::fra', 'Pacific/Noumea', 'fr-NC', KML.ANSI,
852 'New Caledonia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800853 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800854 'ne', 'xkb:ne::fra', 'Africa/Niamey', ['fr-NE', 'ha', 'kr'], KML.ANSI,
855 'Niger'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800856 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800857 'nf', 'xkb:nf::eng', 'Pacific/Norfolk', 'en-NF', KML.ANSI,
858 'Norfolk Island'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800859 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800860 'np', 'xkb:np::nep', 'Asia/Kathmandu', ['ne', 'en'], KML.ANSI,
861 'Nepal'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800862 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800863 'nr', 'xkb:nr::nau', 'Pacific/Nauru', ['na', 'en-NR'], KML.ANSI,
864 'Nauru'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800865 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800866 'nu', 'xkb:us::eng', 'Pacific/Niue', ['niu', 'en-NU'], KML.ANSI,
867 'Niue'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800868 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800869 'ck', 'xkb:ck::eng', 'Pacific/Rarotonga', ['en-CK', 'mi'], KML.ANSI,
870 'Cook Islands'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800871 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800872 'ci', 'xkb:ci::fra', 'Africa/Abidjan', 'fr-CI', KML.ANSI,
873 'Ivory Coast'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800874 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800875 'cn', 'xkb:us::eng', 'Asia/Shanghai', 'zh-CN', KML.ANSI,
876 'China'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800877 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800878 'cm', 'xkb:cm::eng', 'Africa/Douala', ['en-CM', 'fr-CM'], KML.ANSI,
879 'Cameroon'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800880 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800881 'cc', 'xkb:cc::msa', 'Indian/Cocos', ['ms-CC', 'en'], KML.ANSI,
882 'Cocos Islands'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800883 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800884 'cg', 'xkb:cg::fra', 'Africa/Brazzaville', ['fr-CG', 'kg'], KML.ANSI,
885 'Republic of the Congo'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800886 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800887 'cf', 'xkb:cf::fra', 'Africa/Bangui', ['fr-CF', 'sg', 'ln'], KML.ANSI,
888 'Central African Republic'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800889 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800890 'cd', 'xkb:cd::fra', ['Africa/Kinshasa', 'Africa/Lubumbashi'], [
891 'fr-CD', 'ln', 'kg'], KML.ANSI,
892 'Democratic Republic of the Congo'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800893 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800894 'cy', 'xkb:cy::ell', 'Asia/Nicosia', ['el-CY', 'tr-CY'], KML.ANSI,
895 'Cyprus'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800896 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800897 'cx', 'xkb:cx::eng', 'Indian/Christmas', ['en', 'zh'], KML.ANSI,
898 'Christmas Island'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800899 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800900 'cr', 'xkb:latam::spa', 'America/Costa_Rica', ['es-419'], KML.ANSI,
901 'Costa Rica'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800902 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800903 'cw', 'xkb:cw::nld', 'America/Curacao', ['nl'], KML.ANSI, 'Curacao'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800904 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800905 'cv', 'xkb:cv::por', 'Atlantic/Cape_Verde', 'pt-CV', KML.ANSI,
906 'Cape Verde'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800907 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800908 'cu', 'xkb:latam::spa', 'America/Havana', 'es-419', KML.ANSI,
909 'Cuba'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800910 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800911 'sz', 'xkb:sz::eng', 'Africa/Mbabane', ['en-SZ', 'ss-SZ'], KML.ANSI,
912 'Swaziland'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800913 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800914 'sy', 'xkb:sy::ara', 'Asia/Damascus', ['ar', 'ku', 'hy', 'arc', 'fr',
915 'en'], KML.ANSI,
916 'Syria'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800917 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800918 'sx', 'xkb:sx::nld', 'America/Lower_Princes', ['nl', 'en'], KML.ANSI,
919 'Sint Maarten'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800920 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800921 'kg', 'xkb:kg::kir', 'Asia/Bishkek', ['ky', 'uz', 'ru'], KML.ANSI,
922 'Kyrgyzstan'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800923 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800924 'ke', 'xkb:ke::eng', 'Africa/Nairobi', ['en-KE', 'sw-KE'], KML.ANSI,
925 'Kenya'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800926 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800927 'ss', 'xkb:ss::eng', 'Africa/Juba', 'en', KML.ANSI,
928 'South Sudan'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800929 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800930 'sr', 'xkb:sr::nld', 'America/Paramaribo', ['nl-SR', 'en', 'srn', 'hns',
931 'jv'], KML.ANSI,
932 'Suriname'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800933 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800934 'ki', 'xkb:ki::eng', ['Pacific/Tarawa', 'Pacific/Enderbury',
935 'Pacific/Kiritimati'], ['en-KI', 'gil'], KML.ANSI,
936 'Kiribati'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800937 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800938 'kh', 'xkb:kh::khm', 'Asia/Phnom_Penh', ['km', 'fr', 'en'], KML.ANSI,
939 'Cambodia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800940 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800941 'kn', 'xkb:kn::eng', 'America/St_Kitts', 'en-KN', KML.ANSI,
942 'Saint Kitts and Nevis'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800943 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800944 'km', 'xkb:km::ara', 'Indian/Comoro', ['ar', 'fr-KM'], KML.ANSI,
945 'Comoros'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800946 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800947 'st', 'xkb:st::por', 'Africa/Sao_Tome', 'pt-ST', KML.ANSI,
948 'Sao Tome and Principe'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800949 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800950 'si', 'xkb:si::slv', 'Europe/Ljubljana', ['sl', 'hu', 'it', 'sr', 'de',
951 'hr', 'en-GB'], KML.ISO,
952 'Slovenia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800953 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800954 'kp', 'xkb:kp::kor', 'Asia/Pyongyang', 'ko-KP', KML.ANSI,
955 'North Korea'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800956 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800957 'sn', 'xkb:sn::fra', 'Africa/Dakar', ['fr-SN', 'wo', 'fuc'], KML.ANSI,
958 'Senegal'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800959 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800960 'sm', 'xkb:sm::ita', 'Europe/San_Marino', 'it-SM', KML.ANSI,
961 'San Marino'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800962 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800963 'sl', 'xkb:sl::eng', 'Africa/Freetown', ['en-SL', 'men'], KML.ANSI,
964 'Sierra Leone'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800965 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800966 'sc', 'xkb:sc::eng', 'Indian/Mahe', ['en-SC', 'fr-SC'], KML.ANSI,
967 'Seychelles'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800968 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800969 'ky', 'xkb:ky::eng', 'America/Cayman', 'en-KY', KML.ANSI,
970 'Cayman Islands'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800971 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800972 'sd', 'xkb:sd::ara', 'Africa/Khartoum', ['ar', 'en', 'fia'], KML.ANSI,
973 'Sudan'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800974 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800975 'do', 'xkb:latam::spa', 'America/Santo_Domingo', 'es-419', KML.ANSI,
976 'Dominican Republic'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800977 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800978 'dm', 'xkb:dm::eng', 'America/Dominica', 'en-DM', KML.ANSI,
979 'Dominica'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800980 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800981 'dj', 'xkb:dj::fra', 'Africa/Djibouti', ['fr-DJ', 'ar'], KML.ANSI,
982 'Djibouti'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800983 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800984 'dk', 'xkb:dk::dan', 'Europe/Copenhagen', ['da-DK', 'en', 'fo',
985 'de-DK'], KML.ISO,
986 'Denmark'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800987 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800988 'vg', 'xkb:vg::eng', 'America/Tortola', 'en-VG', KML.ANSI,
989 'British Virgin Islands'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800990 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800991 'ye', 'xkb:ye::ara', 'Asia/Aden', 'ar', KML.ANSI,
992 'Yemen'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800993 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800994 'dz', 'xkb:dz::ara', 'Africa/Algiers', 'ar', KML.ANSI,
995 'Algeria'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800996 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +0800997 'yt', 'xkb:yt::fra', 'Indian/Mayotte', 'fr-YT', KML.ANSI,
998 'Mayotte'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +0800999 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001000 'um', 'xkb:um::eng', ['Pacific/Johnston', 'Pacific/Midway',
1001 'Pacific/Wake'], 'en-UM', KML.ANSI,
1002 'United States Minor Outlying Islands'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001003 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001004 'lb', 'xkb:lb::ara', 'Asia/Beirut', ['ar', 'fr-LB', 'en'], KML.ANSI,
1005 'Lebanon'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001006 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001007 'lc', 'xkb:lc::eng', 'America/St_Lucia', 'en-LC', KML.ANSI,
1008 'Saint Lucia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001009 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001010 'la', 'xkb:la::lao', 'Asia/Vientiane', ['lo', 'fr', 'en'], KML.ANSI,
1011 'Laos'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001012 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001013 'tv', 'xkb:us::eng', 'Pacific/Funafuti', ['tvl', 'en', 'sm'], KML.ANSI,
1014 'Tuvalu'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001015 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001016 'tt', 'xkb:tt::eng', 'America/Port_of_Spain', ['en-TT', 'hns', 'fr',
1017 'es', 'zh'], KML.ANSI,
1018 'Trinidad and Tobago'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001019 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001020 'lk', 'xkb:lk::sin', 'Asia/Colombo', ['si', 'ta', 'en'], KML.ANSI,
1021 'Sri Lanka'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001022 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001023 'li', 'xkb:ch::ger', 'Europe/Vaduz', ['de', 'en-GB'], KML.ISO,
1024 'Liechtenstein'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001025 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001026 'lv', 'xkb:lv:apostrophe:lav', 'Europe/Riga', ['lv', 'lt', 'ru',
1027 'en-GB'], KML.ISO,
1028 'Latvia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001029 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001030 'to', 'xkb:to::ton', 'Pacific/Tongatapu', ['to', 'en-TO'], KML.ANSI,
1031 'Tonga'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001032 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001033 'lt', 'xkb:lt::lit', 'Europe/Vilnius', ['lt', 'ru', 'pl'], KML.ISO,
1034 'Lithuania'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001035 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001036 'lu', 'xkb:lu::ltz', 'Europe/Luxembourg', ['lb', 'de-LU'], KML.ANSI,
1037 'Luxembourg'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001038 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001039 'lr', 'xkb:lr::eng', 'Africa/Monrovia', 'en-LR', KML.ANSI,
1040 'Liberia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001041 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001042 'ls', 'xkb:ls::eng', 'Africa/Maseru', ['en-LS', 'st', 'zu'], KML.ANSI,
1043 'Lesotho'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001044 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001045 'tf', 'xkb:tf::fra', 'Indian/Kerguelen', 'fr', KML.ANSI,
1046 'French Southern Territories'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001047 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001048 'tg', 'xkb:tg::fra', 'Africa/Lome', ['fr-TG', 'ee', 'hna'], KML.ANSI,
1049 'Togo'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001050 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001051 'td', 'xkb:td::fra', 'Africa/Ndjamena', ['fr-TD', 'ar'], KML.ANSI,
1052 'Chad'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001053 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001054 'tc', 'xkb:tc::eng', 'America/Grand_Turk', 'en-TC', KML.ANSI,
1055 'Turks and Caicos Islands'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001056 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001057 'ly', 'xkb:ly::ara', 'Africa/Tripoli', ['ar', 'it', 'en'], KML.ANSI,
1058 'Libya'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001059 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001060 'va', 'xkb:va::lat', 'Europe/Vatican', ['la', 'it', 'fr'], KML.ANSI,
1061 'Vatican'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001062 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001063 'vc', 'xkb:vc::eng', 'America/St_Vincent', ['en-VC', 'fr'], KML.ANSI,
1064 'Saint Vincent and the Grenadines'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001065 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001066 'ad', 'xkb:ad::cat', 'Europe/Andorra', 'ca', KML.ANSI,
1067 'Andorra'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001068 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001069 'ag', 'xkb:ag::eng', 'America/Antigua', 'en-AG', KML.ANSI,
1070 'Antigua and Barbuda'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001071 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001072 'af', 'xkb:af::fas', 'Asia/Kabul', ['fa-AF', 'ps'], KML.ANSI,
1073 'Afghanistan'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001074 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001075 'ai', 'xkb:ai::eng', 'America/Anguilla', 'en-AI', KML.ANSI,
1076 'Anguilla'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001077 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001078 'vi', 'xkb:vi::eng', 'America/St_Thomas', 'en-VI', KML.ANSI,
1079 'U.S. Virgin Islands'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001080 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001081 'ir', 'xkb:ir::fas', 'Asia/Tehran', ['fa-IR', 'ku'], KML.ANSI,
1082 'Iran'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001083 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001084 'am', 'xkb:am::hye', 'Asia/Yerevan', 'hy', KML.ANSI,
1085 'Armenia'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001086 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001087 'al', 'xkb:al::sqi', 'Europe/Tirane', ['sq', 'el'], KML.ANSI,
1088 'Albania'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001089 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001090 'ao', 'xkb:ao::por', 'Africa/Luanda', 'pt-AO', KML.ANSI,
1091 'Angola'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001092 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001093 'as', 'xkb:as::eng', 'Pacific/Pago_Pago', ['en-AS', 'sm'], KML.ANSI,
1094 'American Samoa'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001095 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001096 'aw', 'xkb:aw::nld', 'America/Aruba', ['nl-AW', 'es', 'en'], KML.ANSI,
1097 'Aruba'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001098 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001099 'ax', 'xkb:ax::swe', 'Europe/Mariehamn', 'sv-AX', KML.ANSI,
1100 'Aland Islands'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001101 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001102 'az', 'xkb:az::aze', 'Asia/Baku', ['az', 'ru', 'hy'], KML.ANSI,
1103 'Azerbaijan'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001104 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001105 'ua', 'xkb:ua::ukr', [
1106 'Europe/Kiev', 'Europe/Uzhgorod', 'Europe/Zaporozhye'], [
1107 'uk', 'ru-UA', 'rom', 'pl', 'hu'], KML.ANSI,
1108 'Ukraine'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001109 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001110 'qa', 'xkb:qa::ara', 'Asia/Bahrain', ['ar', 'en'], KML.ANSI,
1111 'Qatar'),
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001112 Region(
Hung-Te Lin98501ae2017-06-02 15:53:33 +08001113 'mz', 'xkb:mz::por', 'Africa/Maputo', ['pt-MZ', 'vmw'], KML.ANSI,
1114 'Mozambique'),
1115 ]
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001116"""A list of :py:class:`regions.Region` objects for
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001117**unconfirmed** regions. These may contain incorrect information (or not
1118supported by Chrome browser yet), and all fields must be reviewed before launch.
1119See http://goto/vpdsettings.
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001120
1121Currently, non-Latin keyboards must use an underlying Latin keyboard
1122for VPD. (This assumption should be revisited when moving items to
1123:py:data:`regions.Region.REGIONS_LIST`.) This is
1124currently being discussed on <http://crbug.com/325389>.
1125
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001126Some timezones or locales may be missing from ``timezone_settings.cc`` (see
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001127http://crosbug.com/p/23902). This must be rectified before moving
1128items to :py:data:`regions.Region.REGIONS_LIST`.
1129"""
1130
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001131
1132def ConsolidateRegions(regions):
1133 """Consolidates a list of regions into a dict.
1134
1135 Args:
1136 regions: A list of Region objects. All objects for any given
1137 region code must be identical or we will throw an exception.
1138 (We allow duplicates in case identical region objects are
1139 defined in both regions.py and the overlay, e.g., when moving
1140 items to the public overlay.)
1141
1142 Returns:
1143 A dict from region code to Region.
1144
1145 Raises:
1146 RegionException: If there are multiple regions defined for a given
1147 region, and the values for those regions differ.
1148 """
1149 # Build a dict from region_code to the first Region with that code.
1150 region_dict = {}
1151 for r in regions:
1152 existing_region = region_dict.get(r.region_code)
1153 if existing_region:
1154 if existing_region.GetFieldsDict() != r.GetFieldsDict():
1155 raise RegionException(
1156 'Conflicting definitions for region %r: %r, %r' %
1157 (r.region_code, existing_region.GetFieldsDict(),
1158 r.GetFieldsDict()))
1159 else:
1160 region_dict[r.region_code] = r
1161
1162 return region_dict
1163
1164
Matt Stark1987c532021-04-19 10:12:35 +10001165def BuildRegionsDict(include_all=False, include_pseudolocales=False):
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001166 """Builds a dictionary mapping from code to :py:class:`regions.Region` object.
1167
Matt Stark1987c532021-04-19 10:12:35 +10001168 ``include_pseudolocales`` should never be true for production builds.
1169
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001170 The regions include:
1171
1172 * :py:data:`regions.REGIONS_LIST`
1173 * :py:data:`regions_overlay.REGIONS_LIST`
1174 * Only if ``include_all`` is true:
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001175 * :py:data:`regions.UNCONFIRMED_REGIONS_LIST`
1176 * :py:data:`regions.INCOMPLETE_REGIONS_LIST`
Matt Stark1987c532021-04-19 10:12:35 +10001177 * Only if ``include_pseudolocales`` is true:
1178 * :py:data:`regions.PSEUDOLOCALE_REGIONS_LIST`
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001179
1180 A region may only appear in one of the above lists, or this function
1181 will (deliberately) fail.
1182 """
1183 regions = list(REGIONS_LIST)
1184 if include_all:
Hung-Te Lin8f8e0c42015-04-13 11:42:42 +08001185 known_codes = [r.region_code for r in regions]
1186 regions += [r for r in UNCONFIRMED_REGIONS_LIST if r.region_code not in
1187 known_codes]
Matt Stark1987c532021-04-19 10:12:35 +10001188 if include_pseudolocales:
1189 regions += PSEUDOLOCALE_REGIONS_LIST
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001190
1191 # Build dictionary of region code to list of regions with that
1192 # region code. Check manually for duplicates, since the region may
1193 # be present both in the overlay and the public repo.
1194 return ConsolidateRegions(regions)
1195
1196
1197REGIONS = BuildRegionsDict()
1198
1199
Bao-Duy Trane43d5de2020-05-29 18:02:36 +10001200def main(args=None, out=None):
1201 if args is None:
1202 args = sys.argv[1:]
1203
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001204 parser = argparse.ArgumentParser(description=(
1205 'Display all known regions and their parameters. '))
1206 parser.add_argument('--format',
1207 choices=('human-readable', 'csv', 'json', 'yaml'),
1208 default='human-readable',
1209 help='Output format (default=%(default)s)')
1210 parser.add_argument('--all', action='store_true',
1211 help='Include unconfirmed and incomplete regions')
Hung-Te Linfe67ea42017-07-21 18:59:55 +08001212 parser.add_argument('--notes', action='store_true',
1213 help='Include notes in output')
Matt Stark1987c532021-04-19 10:12:35 +10001214 parser.add_argument('--include_pseudolocales', action='store_true',
1215 help='Include pseudolocales in output')
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001216 parser.add_argument('--output', default=None,
1217 help='Specify output file')
Hung-Te Lin34f3d382015-04-10 18:18:23 +08001218 parser.add_argument('--overlay', default=None,
1219 help='Specify a Python file to overlay extra data')
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001220 args = parser.parse_args(args)
1221
Hung-Te Lin34f3d382015-04-10 18:18:23 +08001222 if args.overlay is not None:
Yilin Yang350aca02020-02-03 15:08:23 +08001223 with open(args.overlay) as f:
Bao-Duy Trane43d5de2020-05-29 18:02:36 +10001224 exec(f.read()) # pylint: disable=exec-used
Hung-Te Lin34f3d382015-04-10 18:18:23 +08001225
Hung-Te Lin1a14cc42015-04-14 01:23:34 +08001226 if args.all:
1227 # Add an additional 'confirmed' property to help identifying region status,
1228 # for autotests, unit tests and factory module.
1229 Region.FIELDS.insert(1, 'confirmed')
1230 for r in REGIONS_LIST:
1231 r.confirmed = True
1232 for r in UNCONFIRMED_REGIONS_LIST:
1233 r.confirmed = False
1234
Matt Stark1987c532021-04-19 10:12:35 +10001235 regions_dict = BuildRegionsDict(args.all, args.include_pseudolocales)
Hung-Te Lin34f3d382015-04-10 18:18:23 +08001236
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001237 if out is None:
1238 if args.output is None:
1239 out = sys.stdout
1240 else:
1241 out = open(args.output, 'w')
1242
Hung-Te Linfe67ea42017-07-21 18:59:55 +08001243 if args.notes or args.format == 'csv':
1244 Region.FIELDS += ['notes']
1245
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001246 # Handle YAML and JSON output.
1247 if args.format == 'yaml' or args.format == 'json':
1248 data = {}
1249 for region in regions_dict.values():
1250 item = {}
1251 for field in Region.FIELDS:
1252 item[field] = getattr(region, field)
1253 data[region.region_code] = item
1254 if args.format == 'yaml':
1255 yaml.dump(data, out)
1256 else:
1257 json.dump(data, out)
1258 return
1259
1260 # Handle CSV or plain-text output: build a list of lines to print.
1261 lines = [Region.FIELDS]
1262
1263 def CoerceToString(value):
1264 """Returns the arguments in simple string type.
1265
1266 If value is a list, concatenate its values with commas. Otherwise, just
1267 return value.
1268 """
1269 if isinstance(value, list):
1270 return ','.join(value)
1271 else:
1272 return str(value)
Hung-Te Lin1a14cc42015-04-14 01:23:34 +08001273
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001274 for region in sorted(regions_dict.values(), key=lambda v: v.region_code):
1275 lines.append([CoerceToString(getattr(region, field))
1276 for field in Region.FIELDS])
1277
1278 if args.format == 'csv':
Hung-Te Lin1a14cc42015-04-14 01:23:34 +08001279 # Just print the lines in CSV format. Note the values may include ',' so the
1280 # separator must be tab.
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001281 for l in lines:
Hung-Te Lin1a14cc42015-04-14 01:23:34 +08001282 print('\t'.join(l))
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001283 elif args.format == 'human-readable':
1284 num_columns = len(lines[0])
1285
1286 # Calculate maximum length of each column.
1287 max_lengths = []
Yilin Yang1550f3c2020-02-03 15:09:31 +08001288 for column_no in range(num_columns):
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001289 max_lengths.append(max(len(line[column_no]) for line in lines))
1290
1291 # Print each line, padding as necessary to the max column length.
1292 for line in lines:
Yilin Yang1550f3c2020-02-03 15:09:31 +08001293 for column_no in range(num_columns):
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001294 out.write(line[column_no].ljust(max_lengths[column_no] + 2))
1295 out.write('\n')
1296 else:
Wei-Han Chen763e6722018-11-16 12:23:19 +08001297 sys.exit('Sorry, unknown format specified: %s' % args.format)
Hung-Te Lin76c55b22015-03-31 14:47:14 +08001298
1299
1300if __name__ == '__main__':
1301 main()