Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(629)

Unified Diff: build/config/locales.gni

Issue 2000603002: [iOS/GN] Update build/config/locales.gni for Chrome on iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/locales.gni
diff --git a/build/config/locales.gni b/build/config/locales.gni
index a628007506c2f17eeb6b1b8579a87d0c03083c29..76b7d213b3f23589a7d3361fb0f55d5ce1c9dad7 100644
--- a/build/config/locales.gni
+++ b/build/config/locales.gni
@@ -2,6 +2,32 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+# Chrome on iOS only ships with a subset of the locales supported by other
+# version of Chrome as the corresponding locales are not supported by the
+# operating system (but for simplicity, the corresponding .pak files are
+# still generated).
+if (is_ios) {
+ ios_unsupported_locales = [
+ "am",
+ "bg",
+ "bn",
+ "et",
+ "fa",
+ "fil",
+ "gu",
+ "kn",
+ "lt",
+ "lv",
+ "ml",
+ "mr",
+ "sl",
+ "sr",
+ "sw",
+ "ta",
+ "te",
+ ]
+}
+
# Note: keep in sync with below.
locales = [
"am",
@@ -15,7 +41,6 @@ locales = [
"el",
"en-GB",
"en-US",
- "es-419",
"es",
"et",
"fa",
@@ -40,7 +65,6 @@ locales = [
"nb",
"nl",
"pl",
- "pt-BR",
"pt-PT",
"ro",
"ru",
@@ -59,6 +83,22 @@ locales = [
"zh-TW",
]
+# Chrome on iOS uses different names for "es-419" and "pt-BR" (called
+# respectively "es-MX" and "pt" on iOS).
+if (!is_ios) {
+ locales += [
+ "es-419",
+ "pt-BR",
+ ]
+} else {
+ locales += [
+ "es-MX",
+ "pt",
+ ]
+
+ ios_packed_locales = locales - ios_unsupported_locales
+}
+
# Same as the locales list but in the format Mac expects for output files:
# it uses underscores instead of hyphens, and "en" instead of "en-US".
locales_as_mac_outputs = [
@@ -73,7 +113,6 @@ locales_as_mac_outputs = [
"el",
"en_GB",
"en",
- "es_419",
"es",
"et",
"fa",
@@ -98,7 +137,6 @@ locales_as_mac_outputs = [
"nb",
"nl",
"pl",
- "pt_BR",
"pt_PT",
"ro",
"ru",
@@ -116,3 +154,20 @@ locales_as_mac_outputs = [
"zh_CN",
"zh_TW",
]
+
+# Chrome on iOS uses different names for "es-419" and "pt-BR" (called
+# respectively "es-MX" and "pt" on iOS).
+if (!is_ios) {
+ locales_as_mac_outputs += [
+ "es_419",
+ "pt_BR",
+ ]
+} else {
+ locales_as_mac_outputs += [
+ "es_MX",
+ "pt",
+ ]
+
+ ios_packed_locales_as_mac_outputs =
+ locales_as_mac_outputs - ios_unsupported_locales
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698