mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-03 02:21:05 +08:00
[l10n] Use generated en-US.json/en-XL.json
This CL switches out the in-tree versions of en-US.json/en-XL.json in favor of the versions generated at build time. They are identical. The implementation is straight-forward. On the minification step, we exclude the in-tree en-US.json/en-XL.json and instead add the outputs of the "collect_strings" action (aka the generated en-US.json/ en-XL.json). R=kimanh@chromium.org Bug: 1185727 Change-Id: I923fba50033305a7df6bedccf65c657ecc8e5235 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4043247 Reviewed-by: Kim-Anh Tran <kimanh@chromium.org> Commit-Queue: Simon Zünd <szuend@chromium.org>
This commit is contained in:
committed by
Devtools-frontend LUCI CQ
parent
9c328a94ca
commit
50dcea80fa
@@ -26,7 +26,6 @@ devtools_module("i18n") {
|
||||
]
|
||||
|
||||
public_deps = [
|
||||
"./locales:collect_strings",
|
||||
"./locales:i18n_bundled_locales",
|
||||
"./locales:i18n_locales",
|
||||
]
|
||||
|
||||
@@ -26,11 +26,22 @@ node_action("collect_strings") {
|
||||
}
|
||||
}
|
||||
|
||||
generated_locales = [ "en-US" ]
|
||||
if (include_en_xl) {
|
||||
generated_locales += [ "en-XL" ]
|
||||
}
|
||||
|
||||
minify_json("i18n_locales") {
|
||||
sources = []
|
||||
foreach(locale, remote_devtools_locales + bundled_devtools_locales) {
|
||||
foreach(
|
||||
locale,
|
||||
remote_devtools_locales + bundled_devtools_locales - generated_locales) {
|
||||
sources += [ "$locale.json" ]
|
||||
}
|
||||
|
||||
sources += get_target_outputs(":collect_strings")
|
||||
|
||||
deps = [ ":collect_strings" ]
|
||||
}
|
||||
|
||||
group("i18n_bundled_locales") {
|
||||
|
||||
@@ -7,7 +7,11 @@ import("./vars.gni")
|
||||
|
||||
template("minify_json") {
|
||||
node_action(target_name) {
|
||||
forward_variables_from(invoker, [ "sources" ])
|
||||
forward_variables_from(invoker,
|
||||
[
|
||||
"deps",
|
||||
"sources",
|
||||
])
|
||||
|
||||
script = "scripts/build/ninja/minify-json-files.js"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user