OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//tools/grit/grit_rule.gni") | 5 import("//tools/grit/grit_rule.gni") |
6 | 6 |
7 # See also remoting_locales_with_underscores below. | 7 # See also remoting_locales_with_underscores below. |
8 remoting_locales = [ | 8 remoting_locales = [ |
9 "am", | 9 "am", |
10 "ar", | 10 "ar", |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 155 |
156 outputs = [ | 156 outputs = [ |
157 "remoting/base/string_resources.h", | 157 "remoting/base/string_resources.h", |
158 ] | 158 ] |
159 | 159 |
160 # The grd produces a *.pak file and a messages.json file (this one uses | 160 # The grd produces a *.pak file and a messages.json file (this one uses |
161 # underscores instead of hyphens) for each locale. | 161 # underscores instead of hyphens) for each locale. |
162 outputs += process_file_template( | 162 outputs += process_file_template( |
163 remoting_locales, | 163 remoting_locales, |
164 [ "remoting/resources/{{source_name_part}}.pak" ]) | 164 [ "remoting/resources/{{source_name_part}}.pak" ]) |
| 165 |
| 166 messages_locales = remoting_locales_with_underscores |
| 167 if (!is_chromeos) { |
| 168 # The messages output includes a separate one for en-US that the pak ones |
| 169 # don't have. We don't need to do this on ChromeOS since en_US is in the |
| 170 # locales list be default there. |
| 171 messages_locales += [ "en_US" ] |
| 172 } |
165 outputs += process_file_template( | 173 outputs += process_file_template( |
166 remoting_locales_with_underscores, | 174 messages_locales, |
167 [ "remoting/webapp/_locales/{{source_name_part}}/messages.json" ]) | 175 [ "remoting/webapp/_locales/{{source_name_part}}/messages.json" ]) |
168 } | 176 } |
169 | 177 |
170 action("copy_locales") { | 178 action("copy_locales") { |
171 script = "../tools/build/remoting_copy_locales.py" | 179 script = "../tools/build/remoting_copy_locales.py" |
172 | 180 |
173 # The gyp build calls out to Python, but the Python just computes a simple | 181 # The gyp build calls out to Python, but the Python just computes a simple |
174 # replacement over the locales. Here, we can do this in GN script by | 182 # replacement over the locales. Here, we can do this in GN script by |
175 # pretending the locale list is a list of files. The {{source_name_part}} | 183 # pretending the locale list is a list of files. The {{source_name_part}} |
176 # will just expand to the locale name. | 184 # will just expand to the locale name. |
(...skipping 15 matching lines...) Expand all Loading... |
192 } | 200 } |
193 | 201 |
194 args = [ | 202 args = [ |
195 "-p", os, | 203 "-p", os, |
196 "-g", rebase_path(root_gen_dir, root_build_dir), | 204 "-g", rebase_path(root_gen_dir, root_build_dir), |
197 "-x", rebase_path(root_out_dir, root_build_dir), | 205 "-x", rebase_path(root_out_dir, root_build_dir), |
198 ] + remoting_locales | 206 ] + remoting_locales |
199 | 207 |
200 deps = [ ":strings" ] | 208 deps = [ ":strings" ] |
201 } | 209 } |
OLD | NEW |