naiveproxy/components/strings/BUILD.gn

194 lines
7.2 KiB
Plaintext
Raw Normal View History

2018-08-11 08:35:24 +03:00
# Copyright 2014 The Chromium Authors. All rights reserved.
# 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("//ppapi/buildflags/buildflags.gni")
import("//printing/buildflags/buildflags.gni")
import("//tools/grit/grit_rule.gni")
if (is_android) {
import("//build/config/android/rules.gni")
android_components_strings_java_resources = [
"java/res/values-am/components_strings.xml",
"java/res/values-ar/components_strings.xml",
"java/res/values-bg/components_strings.xml",
"java/res/values-ca/components_strings.xml",
"java/res/values-cs/components_strings.xml",
"java/res/values-da/components_strings.xml",
"java/res/values-de/components_strings.xml",
"java/res/values-el/components_strings.xml",
"java/res/values-en-rGB/components_strings.xml",
"java/res/values-es-rUS/components_strings.xml",
"java/res/values-es/components_strings.xml",
"java/res/values-fa/components_strings.xml",
"java/res/values-fi/components_strings.xml",
"java/res/values-fr/components_strings.xml",
"java/res/values-hi/components_strings.xml",
"java/res/values-hr/components_strings.xml",
"java/res/values-hu/components_strings.xml",
"java/res/values-in/components_strings.xml",
"java/res/values-it/components_strings.xml",
"java/res/values-iw/components_strings.xml",
"java/res/values-ja/components_strings.xml",
"java/res/values-ko/components_strings.xml",
"java/res/values-lt/components_strings.xml",
"java/res/values-lv/components_strings.xml",
"java/res/values-nb/components_strings.xml",
"java/res/values-nl/components_strings.xml",
"java/res/values-pl/components_strings.xml",
"java/res/values-pt-rBR/components_strings.xml",
"java/res/values-pt-rPT/components_strings.xml",
"java/res/values-ro/components_strings.xml",
"java/res/values-ru/components_strings.xml",
"java/res/values-sk/components_strings.xml",
"java/res/values-sl/components_strings.xml",
"java/res/values-sr/components_strings.xml",
"java/res/values-sv/components_strings.xml",
"java/res/values-sw/components_strings.xml",
"java/res/values-th/components_strings.xml",
"java/res/values-tl/components_strings.xml",
"java/res/values-tr/components_strings.xml",
"java/res/values-uk/components_strings.xml",
"java/res/values-vi/components_strings.xml",
"java/res/values-zh-rCN/components_strings.xml",
"java/res/values-zh-rTW/components_strings.xml",
"java/res/values/components_strings.xml",
]
}
group("strings") {
public_deps = [
":components_chromium_strings",
":components_google_chrome_strings",
":components_locale_settings",
":components_strings",
]
}
grit("components_strings") {
source = "../components_strings.grd"
defines = [
"enable_plugins=$enable_plugins",
"enable_print_preview=$enable_print_preview",
]
outputs = [
"grit/components_strings.h",
]
foreach(locale, locales_with_fake_bidi) {
outputs += [ "components_strings_$locale.pak" ]
}
if (is_android) {
outputs += android_components_strings_java_resources
}
}
if (is_android) {
java_strings_grd_prebuilt("components_strings_grd") {
grit_output_dir = "$root_gen_dir/components/strings/java/res"
generated_files =
rebase_path(android_components_strings_java_resources, "java/res", ".")
deps = [
":components_strings",
]
}
}
grit("components_chromium_strings") {
source = "../components_chromium_strings.grd"
outputs = [
"grit/components_chromium_strings.h",
]
foreach(locale, locales_with_fake_bidi) {
outputs += [ "components_chromium_strings_$locale.pak" ]
}
}
grit("components_google_chrome_strings") {
source = "../components_google_chrome_strings.grd"
outputs = [
"grit/components_google_chrome_strings.h",
]
foreach(locale, locales_with_fake_bidi) {
outputs += [ "components_google_chrome_strings_$locale.pak" ]
}
}
if (is_android) {
android_components_locale_settings_java_resources = [
"java/res/values-am/components_locale_settings.xml",
"java/res/values-ar/components_locale_settings.xml",
"java/res/values-bg/components_locale_settings.xml",
"java/res/values-ca/components_locale_settings.xml",
"java/res/values-cs/components_locale_settings.xml",
"java/res/values-da/components_locale_settings.xml",
"java/res/values-de/components_locale_settings.xml",
"java/res/values-el/components_locale_settings.xml",
"java/res/values-en-rGB/components_locale_settings.xml",
"java/res/values-es-rUS/components_locale_settings.xml",
"java/res/values-es/components_locale_settings.xml",
"java/res/values-fa/components_locale_settings.xml",
"java/res/values-fi/components_locale_settings.xml",
"java/res/values-fr/components_locale_settings.xml",
"java/res/values-hi/components_locale_settings.xml",
"java/res/values-hr/components_locale_settings.xml",
"java/res/values-hu/components_locale_settings.xml",
"java/res/values-in/components_locale_settings.xml",
"java/res/values-it/components_locale_settings.xml",
"java/res/values-iw/components_locale_settings.xml",
"java/res/values-ja/components_locale_settings.xml",
"java/res/values-ko/components_locale_settings.xml",
"java/res/values-lt/components_locale_settings.xml",
"java/res/values-lv/components_locale_settings.xml",
"java/res/values-nb/components_locale_settings.xml",
"java/res/values-nl/components_locale_settings.xml",
"java/res/values-pl/components_locale_settings.xml",
"java/res/values-pt-rBR/components_locale_settings.xml",
"java/res/values-pt-rPT/components_locale_settings.xml",
"java/res/values-ro/components_locale_settings.xml",
"java/res/values-ru/components_locale_settings.xml",
"java/res/values-sk/components_locale_settings.xml",
"java/res/values-sl/components_locale_settings.xml",
"java/res/values-sr/components_locale_settings.xml",
"java/res/values-sv/components_locale_settings.xml",
"java/res/values-sw/components_locale_settings.xml",
"java/res/values-th/components_locale_settings.xml",
"java/res/values-tl/components_locale_settings.xml",
"java/res/values-tr/components_locale_settings.xml",
"java/res/values-uk/components_locale_settings.xml",
"java/res/values-vi/components_locale_settings.xml",
"java/res/values-zh-rCN/components_locale_settings.xml",
"java/res/values-zh-rTW/components_locale_settings.xml",
"java/res/values/components_locale_settings.xml",
]
}
grit("components_locale_settings") {
source = "../components_locale_settings.grd"
outputs = [
"grit/components_locale_settings.h",
]
foreach(locale, locales_with_fake_bidi) {
outputs += [ "components_locale_settings_$locale.pak" ]
}
if (is_android) {
outputs += android_components_locale_settings_java_resources
}
}
if (is_android) {
java_strings_grd_prebuilt("components_locale_settings_grd") {
grit_output_dir = "$root_gen_dir/components/strings/java/res"
generated_files =
rebase_path(android_components_locale_settings_java_resources,
"java/res",
".")
deps = [
":components_locale_settings",
]
}
}