Commit 6a52c6f8 authored by Findit's avatar Findit

Revert "refactor android locales in locales.gni"

This reverts commit 15204aaf.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 720636 as the
culprit for failures in the build cycles as shown on:
https://analysis.chromium.org/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtLzE1MjA0YWFmMDdlYWZmNTkzZDdhM2Q2ZDdlYjdhNjljOGI5MGE1NWEM

Sample Failed Build: https://ci.chromium.org/b/8895149418482727520

Sample Failed Step: compile

Original change's description:
> refactor android locales in locales.gni
> 
> This CL refactors build/config/locales.gni but makes no actual
> changes to what locales are used.
> 
> The primary change is to remove android_chrome_omitted_locales
> and replace it with android_non_bundle_locales.
> This list should be used directly instead of subtracting omitted
> locales from locales.
> 
> Additionally the list all_chrome_locales was added as the superset
> of all supported locales.  Platform specific lists are made by
> subtracting from this list.
> 
> No changes were made to the iOS and Mac locale lists names.
> 
> Bug: 812837
> Change-Id: I26e9c1b2d40397a6ed02777db55c44be93060050
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1939962
> Commit-Queue: Trevor  Perrier <perrier@chromium.org>
> Reviewed-by: Andrew Grieve <agrieve@chromium.org>
> Reviewed-by: Ted Choc <tedchoc@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#720636}


Change-Id: I91d7824e9e0b292c3376556947cbe4aced6bd0be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 812837
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1947226
Cr-Commit-Position: refs/heads/master@{#720650}
parent 61d3e27b
...@@ -49,10 +49,10 @@ import("//build/config/locales.gni") ...@@ -49,10 +49,10 @@ import("//build/config/locales.gni")
# deps (optional) # deps (optional)
# visibility (optional) # visibility (optional)
# Some locales exist in |all_chrome_locales| but don't generally have an xtb file on disk # Some locales exist in |locales| but don't generally have an xtb file on disk
# and some translations don't exist in |all_chrome_locales| but do generally have an xtb # and some translations don't exist in |locales| but do generally have an xtb
# file on disk. # file on disk.
default_embedded_i18_locales = all_chrome_locales - [ default_embedded_i18_locales = locales - [
"en-US", "en-US",
"he", "he",
"nb", "nb",
...@@ -60,7 +60,7 @@ default_embedded_i18_locales = all_chrome_locales - [ ...@@ -60,7 +60,7 @@ default_embedded_i18_locales = all_chrome_locales - [
[ [
"iw", "iw",
"no", "no",
] ] + xtb_only_locales
template("generate_embedded_i18n") { template("generate_embedded_i18n") {
assert(defined(invoker.grd_files_info), assert(defined(invoker.grd_files_info),
......
...@@ -2,18 +2,6 @@ ...@@ -2,18 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be # Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file. # found in the LICENSE file.
# This file creates the |locales| which is the set of current
# locales based on the current platform. Locales in this list are formated
# based on what .pak files expect.
# The |locales_with_fake_bidi| variable is the same but with
# the fake bidirectional locale added.
# The following additional platform specific lists are created:
# - |android_non_bundle_locales| subset for Android based apk builds
# - |locales_as_mac_outputs| formated for mac output bundles
# - |ios_packed_locales| subset for iOS
# - |ios_packed_locales_as_mac_outputs| subset for iOS output
# Android doesn't ship all locales in order to save space (but webview does). # Android doesn't ship all locales in order to save space (but webview does).
# http://crbug.com/369218 # http://crbug.com/369218
android_chrome_omitted_locales = [ android_chrome_omitted_locales = [
...@@ -54,17 +42,11 @@ ios_unsupported_locales = [ ...@@ -54,17 +42,11 @@ ios_unsupported_locales = [
not_needed([ "android_chrome_omitted_locales" ]) not_needed([ "android_chrome_omitted_locales" ])
not_needed([ "ios_unsupported_locales" ]) not_needed([ "ios_unsupported_locales" ])
# Superset of all locales used in Chrome with platform specific changes noted. locales = [
all_chrome_locales = [
"af",
"am", "am",
"ar", "ar",
"as",
"az",
"be",
"bg", "bg",
"bn", "bn",
"bs",
"ca", "ca",
"cs", "cs",
"da", "da",
...@@ -73,54 +55,34 @@ all_chrome_locales = [ ...@@ -73,54 +55,34 @@ all_chrome_locales = [
"en-GB", "en-GB",
"en-US", "en-US",
"es", "es",
"es-419", # "es-MX" in iOS (Mexico vs Latin America)
"et", "et",
"eu",
"fa", "fa",
"fi", "fi",
"fil", "fil",
"fr", "fr",
"fr-CA",
"gl",
"gu", "gu",
"he", # "iw" in .xml and TC but "he" in .pak "he",
"hi", "hi",
"hr", "hr",
"hu", "hu",
"hy", "id",
"id", # "in" in .xml but "id" in TC and .pak
"is",
"it", "it",
"ja", "ja",
"ka",
"kk",
"km",
"kn", "kn",
"ko", "ko",
"ky",
"lo",
"lt", "lt",
"lv", "lv",
"mk",
"ml", "ml",
"mn",
"mr", "mr",
"ms", "ms",
"my", "nb",
"nb", # "no" in TC but "nb" in .xml and .pak
"ne",
"nl", "nl",
"or",
"pa",
"pl", "pl",
"pt-BR", # just "pt" in iOS
"pt-PT", "pt-PT",
"ro", "ro",
"ru", "ru",
"si",
"sk", "sk",
"sl", "sl",
"sq",
"sr", "sr",
"sv", "sv",
"sw", "sw",
...@@ -129,18 +91,13 @@ all_chrome_locales = [ ...@@ -129,18 +91,13 @@ all_chrome_locales = [
"th", "th",
"tr", "tr",
"uk", "uk",
"ur",
"uz",
"vi", "vi",
"zh-CN", "zh-CN",
"zh-HK",
"zh-TW", "zh-TW",
"zu",
] ]
# New locales added to Chrome on Android. # New locales with .xtb files only. Eventually all of these will merge into the main locales.
# Delete if most platforms support the new locales. xtb_only_locales = [
android_only_chrome_locales = [
"af", "af",
"as", "as",
"az", "az",
...@@ -170,27 +127,14 @@ android_only_chrome_locales = [ ...@@ -170,27 +127,14 @@ android_only_chrome_locales = [
"zu", "zu",
] ]
if (is_android) {
# Once bundles support all languages will just be locales
locales = all_chrome_locales - android_only_chrome_locales
# Android doesn't ship all locales on KitKat in order to save space
# (but webview does). http://crbug.com/369218
android_non_bundle_locales =
all_chrome_locales - android_only_chrome_locales -
android_chrome_omitted_locales
} else {
# Change if other platforms support more locales
locales = all_chrome_locales - android_only_chrome_locales
}
# Chrome on iOS uses different names for "es-419" and "pt-BR" (called # Chrome on iOS uses different names for "es-419" and "pt-BR" (called
# respectively "es-MX" and "pt" on iOS). # respectively "es-MX" and "pt" on iOS).
if (is_ios) { if (!is_ios) {
locales -= [ locales += [
"es-419", "es-419",
"pt-BR", "pt-BR",
] ]
} else {
locales += [ locales += [
"es-MX", "es-MX",
"pt", "pt",
......
...@@ -1370,7 +1370,7 @@ if (current_toolchain == default_toolchain) { ...@@ -1370,7 +1370,7 @@ if (current_toolchain == default_toolchain) {
disable_compression = _is_bundle_module disable_compression = _is_bundle_module
renaming_sources = [] renaming_sources = []
renaming_destinations = [] renaming_destinations = []
foreach(_locale, android_non_bundle_locales) { foreach(_locale, locales - android_chrome_omitted_locales) {
renaming_sources += renaming_sources +=
[ "$target_gen_dir/${_variant}_paks/locales/$_locale.pak" ] [ "$target_gen_dir/${_variant}_paks/locales/$_locale.pak" ]
renaming_destinations += [ "locales/$_locale.pak" ] renaming_destinations += [ "locales/$_locale.pak" ]
......
...@@ -183,7 +183,7 @@ template("chrome_public_common_apk_or_module_tmpl") { ...@@ -183,7 +183,7 @@ template("chrome_public_common_apk_or_module_tmpl") {
if (target_type == "android_apk") { if (target_type == "android_apk") {
# For APKs, do not include the resource strings files from our # For APKs, do not include the resource strings files from our
# omitted locale list in order to save size. # omitted locale list in order to save size.
aapt_locale_whitelist = android_non_bundle_locales aapt_locale_whitelist = locales - android_chrome_omitted_locales
} else { } else {
# For bundles, only include resource strings files from our full # For bundles, only include resource strings files from our full
# locale list, but nothing more. # locale list, but nothing more.
......
...@@ -88,7 +88,7 @@ template("chrome_bundle") { ...@@ -88,7 +88,7 @@ template("chrome_bundle") {
proguard_enabled = !is_java_debug proguard_enabled = !is_java_debug
enable_language_splits = true enable_language_splits = true
extra_modules = _extra_modules extra_modules = _extra_modules
system_image_locale_whitelist = android_non_bundle_locales system_image_locale_whitelist = locales - android_chrome_omitted_locales
is_multi_abi = _is_multi_abi is_multi_abi = _is_multi_abi
# NOTE: Only sign bundle for official builds since this is very slow. # NOTE: Only sign bundle for official builds since this is very slow.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment