Commit 3c2131cd authored by Stephen Lanham's avatar Stephen Lanham Committed by Commit Bot

[Chromecast] Remove support for fake-bidi.

Recently, fake-bidi was introduced into the list of supported locales:
  https://codereview.chromium.org/2773453003

This introduced a bug where fake-bidi appeared on our list of supported
locales, yet could not be selected as a locale. Since we are missing
dedeicated resources for fake-bidi, and not of our tests explicitly
support it, remove support everywhere for consistency. Also unify the
locale list into a single place that can be referenced from anywhere in
GN.

BUG= internal b/37215118
Test: All .pak files generate properly, setup test works.

Change-Id: I8bc7e7335716d14288654d9912479d31f6438555
Reviewed-on: https://chromium-review.googlesource.com/488166Reviewed-by: default avatarLuke Halliwell <halliwell@chromium.org>
Commit-Queue: Stephen Lanham <slan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#468011}
parent cb5b9c01
......@@ -4,7 +4,6 @@
import("//build/buildflag_header.gni")
import("//build/config/features.gni")
import("//build/config/locales.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/ui.gni")
import("//chromecast/build/tests/cast_test.gni")
......@@ -420,11 +419,11 @@ repack("cast_shell_pak") {
}
# Intermediate targets that repack grit resources by locale. For each locale
# in |locales_with_fake_bidi| (see //build/config/locales.gni), all resources
# in |cast_locales| (see //chromecast/chromecast.gni), all resources
# are packed into a single .pak file in an output directory. These targets
# should not be depended on directly; depend on ":chromecast_locales_pak"
# instead.
foreach(locale, locales_with_fake_bidi) {
foreach(locale, cast_locales) {
repack("_cast_repack_${locale}") {
visibility = [ ":chromecast_locales_pak" ]
output = "$root_out_dir/chromecast_locales/${locale}.pak"
......@@ -450,7 +449,7 @@ foreach(locale, locales_with_fake_bidi) {
# A meta-target which repacks resources by locale.
group("chromecast_locales_pak") {
deps = []
foreach(locale, locales_with_fake_bidi) {
foreach(locale, cast_locales) {
deps += [ ":_cast_repack_${locale}" ]
}
}
......
......@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/locales.gni")
import("//chromecast/chromecast.gni")
import("//testing/test.gni")
import("//tools/grit/grit_rule.gni")
......@@ -109,7 +109,7 @@ grit("chromecast_settings") {
outputs = [
"grit/chromecast_settings.h",
]
foreach(locale, locales_with_fake_bidi) {
foreach(locale, cast_locales) {
outputs += [ "chromecast_settings_${locale}.pak" ]
}
......@@ -121,8 +121,8 @@ grit("chromecast_settings") {
# This target ensures that Chromecast developers are notified when locales
# change. If this target is breaking the build, the CAST_LOCALES list in
# //chromecast/app/verify_cast_locales.py must be updated to match
# |locales_with_fake_bidi|. Please see that file for more details. This action
# will be run on fresh builds, and whenever |locales_with_fake_bidi| is updated.
# |cast_locales|. Please see that file for more details. This action will be
# run on fresh builds, and whenever |cast_locales| is updated.
action("verify_cast_locales") {
script = "//chromecast/app/verify_cast_locales.py"
......@@ -133,7 +133,7 @@ action("verify_cast_locales") {
rebase_path(stamp_file, "$root_out_dir"),
]
args += locales_with_fake_bidi
args += cast_locales
outputs = [
stamp_file,
......
......@@ -25,7 +25,6 @@ This file contains the strings for Chromecast settings.
<output filename="chromecast_settings_es-419.pak" type="data_package" lang="es-419" />
<output filename="chromecast_settings_et.pak" type="data_package" lang="et" />
<output filename="chromecast_settings_fa.pak" type="data_package" lang="fa" />
<output filename="chromecast_settings_fake-bidi.pak" type="data_package" lang="fake-bidi" />
<output filename="chromecast_settings_fi.pak" type="data_package" lang="fi" />
<output filename="chromecast_settings_fil.pak" type="data_package" lang="fil" />
<output filename="chromecast_settings_fr.pak" type="data_package" lang="fr" />
......
......@@ -10,10 +10,10 @@ import sys
CAST_LOCALES = [
'am', 'ar', 'bg', 'bn', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'en-US',
'es-419', 'es', 'et', 'fa', 'fake-bidi', 'fi', 'fil', 'fr', 'gu', 'he',
'hi', 'hr', 'hu', 'id', 'it', 'ja', 'kn', 'ko', 'lt', 'lv', 'ml', 'mr',
'ms', 'nb', 'nl', 'pl', 'pt-BR', 'pt-PT', 'ro', 'ru', 'sk', 'sl', 'sr',
'sv', 'sw', 'ta', 'te', 'th', 'tr', 'uk', 'vi', 'zh-CN', 'zh-TW'
'es-419', '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-BR', 'pt-PT', 'ro', 'ru', 'sk', 'sl', 'sr', 'sv', 'sw', 'ta',
'te', 'th', 'tr', 'uk', 'vi', 'zh-CN', 'zh-TW'
]
SUCCESS_RETURN_CODE = 0
......
......@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/chromecast_build.gni")
import("//build/config/locales.gni")
# This args block should contain arguments used within the //chromecast
# directory. Arguments which are used in other Chrome components should
......@@ -46,3 +47,8 @@ if (chromecast_branding == "public") {
cast_build_release =
read_file("//chromecast/internal/build/cast_build_release", "trim string")
}
# All locales supported by Cast builds. This provides a single point of
# reference for all GN files referencing a locales list. |locales| is declared
# in //build/config/locales.gni.
cast_locales = locales
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