1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
remoting / remoting_locales.gni [blame]
# Copyright 2015 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/locales.gni")
resources_locale_dir = "$root_gen_dir/remoting/resources/_locales"
# See also remoting_locales_with_underscores below.
remoting_locales_without_pseudolocales = [
"am",
"ar",
"bg",
"bn",
"ca",
"cs",
"da",
"de",
"el",
"en",
"en-GB",
"es",
"et",
"fa",
"fi",
"fil",
"fr",
"gu",
"he",
"hi",
"hr",
"hu",
"id",
"it",
"ja",
"kn",
"ko",
"lt",
"lv",
"ml",
"mr",
"ms",
"nb",
"nl",
"pl",
"pt-PT",
"ro",
"ru",
"sk",
"sl",
"sr",
"sv",
"sw",
"ta",
"te",
"th",
"tr",
"uk",
"vi",
"zh-CN",
"zh-TW",
]
# An additional locale "en-US" is generated for ChromeOS and Chrome on iOS.
# TODO(yuweih): Our build script doesn't seem to work with en-US and Chrome
# on iOS doesn't seem to have en-US.lproj. Add is_ios back if we do need to
# work with en-US.
if (is_chromeos) {
# Support Icelandic in ChromeOS
remoting_locales_without_pseudolocales += [
"af",
"cy",
"en-US",
"eu",
"gl",
"is",
"zu",
]
}
# Locales "pt-BR" and "es-419" are named "pt" and "es-MX" respectively on iOS.
if (!is_ios) {
remoting_locales_without_pseudolocales += [
"pt-BR",
"es-419",
]
} else {
remoting_locales_without_pseudolocales += [
"pt",
"es-MX",
]
}
remoting_locales_with_underscores_without_pseudolocales = []
foreach(locale, remoting_locales_without_pseudolocales) {
remoting_locales_with_underscores_without_pseudolocales +=
[ string_replace(locale, "-", "_") ]
}
pseudolocales_with_underscores = []
foreach(locale, pseudolocales) {
pseudolocales_with_underscores += [ string_replace(locale, "-", "_") ]
}
remoting_locales_with_pseudolocales =
remoting_locales_without_pseudolocales + pseudolocales
remoting_locales_with_underscores_with_pseudolocales =
remoting_locales_with_underscores_without_pseudolocales +
pseudolocales_with_underscores
if (enable_pseudolocales) {
remoting_locales = remoting_locales_with_pseudolocales
remoting_locales_with_underscores =
remoting_locales_with_underscores_with_pseudolocales
} else {
remoting_locales = remoting_locales_without_pseudolocales
remoting_locales_with_underscores =
remoting_locales_with_underscores_without_pseudolocales
}
remoting_android_locales = [
"am",
"ar",
"bg",
"ca",
"cs",
"da",
"de",
"el",
"en-rGB",
"es",
"es-rUS",
"fa",
"fi",
"fr",
"hi",
"hr",
"hu",
"in",
"it",
"iw",
"ja",
"ko",
"lt",
"lv",
"nb",
"nl",
"pl",
"pt-rBR",
"pt-rPT",
"ro",
"ru",
"sk",
"sl",
"sr",
"sv",
"sw",
"th",
"tl",
"tr",
"uk",
"vi",
"zh-rCN",
"zh-rTW",
]
# The list of .json files generated by remoting_strings.grd.
remoting_resources_locale_files =
process_file_template(
remoting_locales_with_underscores_with_pseudolocales,
[ "remoting/resources/_locales/{{source_name_part}}/messages.json" ])