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")
# deps (optional)
# visibility (optional)
# Some locales exist in |all_chrome_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
# Some locales exist in |locales| but don't generally have an xtb file on disk
# and some translations don't exist in |locales| but do generally have an xtb
# file on disk.
default_embedded_i18_locales = all_chrome_locales - [
default_embedded_i18_locales = locales - [
"en-US",
"he",
"nb",
......@@ -60,7 +60,7 @@ default_embedded_i18_locales = all_chrome_locales - [
[
"iw",
"no",
]
] + xtb_only_locales
template("generate_embedded_i18n") {
assert(defined(invoker.grd_files_info),
......
......@@ -2,18 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# 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).
# http://crbug.com/369218
android_chrome_omitted_locales = [
......@@ -54,17 +42,11 @@ ios_unsupported_locales = [
not_needed([ "android_chrome_omitted_locales" ])
not_needed([ "ios_unsupported_locales" ])
# Superset of all locales used in Chrome with platform specific changes noted.
all_chrome_locales = [
"af",
locales = [
"am",
"ar",
"as",
"az",
"be",
"bg",
"bn",
"bs",
"ca",
"cs",
"da",
......@@ -73,54 +55,34 @@ all_chrome_locales = [
"en-GB",
"en-US",
"es",
"es-419", # "es-MX" in iOS (Mexico vs Latin America)
"et",
"eu",
"fa",
"fi",
"fil",
"fr",
"fr-CA",
"gl",
"gu",
"he", # "iw" in .xml and TC but "he" in .pak
"he",
"hi",
"hr",
"hu",
"hy",
"id", # "in" in .xml but "id" in TC and .pak
"is",
"id",
"it",
"ja",
"ka",
"kk",
"km",
"kn",
"ko",
"ky",
"lo",
"lt",
"lv",
"mk",
"ml",
"mn",
"mr",
"ms",
"my",
"nb", # "no" in TC but "nb" in .xml and .pak
"ne",
"nb",
"nl",
"or",
"pa",
"pl",
"pt-BR", # just "pt" in iOS
"pt-PT",
"ro",
"ru",
"si",
"sk",
"sl",
"sq",
"sr",
"sv",
"sw",
......@@ -129,18 +91,13 @@ all_chrome_locales = [
"th",
"tr",
"uk",
"ur",
"uz",
"vi",
"zh-CN",
"zh-HK",
"zh-TW",
"zu",
]
# New locales added to Chrome on Android.
# Delete if most platforms support the new locales.
android_only_chrome_locales = [
# New locales with .xtb files only. Eventually all of these will merge into the main locales.
xtb_only_locales = [
"af",
"as",
"az",
......@@ -170,27 +127,14 @@ android_only_chrome_locales = [
"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
# respectively "es-MX" and "pt" on iOS).
if (is_ios) {
locales -= [
if (!is_ios) {
locales += [
"es-419",
"pt-BR",
]
} else {
locales += [
"es-MX",
"pt",
......
......@@ -1370,7 +1370,7 @@ if (current_toolchain == default_toolchain) {
disable_compression = _is_bundle_module
renaming_sources = []
renaming_destinations = []
foreach(_locale, android_non_bundle_locales) {
foreach(_locale, locales - android_chrome_omitted_locales) {
renaming_sources +=
[ "$target_gen_dir/${_variant}_paks/locales/$_locale.pak" ]
renaming_destinations += [ "locales/$_locale.pak" ]
......
......@@ -183,7 +183,7 @@ template("chrome_public_common_apk_or_module_tmpl") {
if (target_type == "android_apk") {
# For APKs, do not include the resource strings files from our
# omitted locale list in order to save size.
aapt_locale_whitelist = android_non_bundle_locales
aapt_locale_whitelist = locales - android_chrome_omitted_locales
} else {
# For bundles, only include resource strings files from our full
# locale list, but nothing more.
......
......@@ -88,7 +88,7 @@ template("chrome_bundle") {
proguard_enabled = !is_java_debug
enable_language_splits = true
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
# 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