Avi Drissman | 4a6ec7e | 2022-09-08 20:26:46 | [diff] [blame] | 1 | # Copyright 2015 The Chromium Authors |
michaelbai | ef836d8 | 2015-10-30 05:04:19 | [diff] [blame] | 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
michaelbai | ef836d8 | 2015-10-30 05:04:19 | [diff] [blame] | 4 | |
michaelbai | ef836d8 | 2015-10-30 05:04:19 | [diff] [blame] | 5 | import("//tools/grit/repack.gni") |
michaelbai | 3be42fa | 2016-07-06 23:51:55 | [diff] [blame] | 6 | import("webview_repack_locales_list.gni") |
michaelbai | ef836d8 | 2015-10-30 05:04:19 | [diff] [blame] | 7 | |
sdefresne | 659ad253 | 2016-09-15 13:57:50 | [diff] [blame] | 8 | # Wraps repack_locales(), setting the source_patterns and deps required for |
| 9 | # Chrome. |
| 10 | template("webview_repack_locales") { |
| 11 | repack_locales(target_name) { |
| 12 | forward_variables_from(invoker, "*") |
agrieve | 425d550 | 2016-09-20 01:21:30 | [diff] [blame] | 13 | if (!defined(deps)) { |
| 14 | deps = [] |
| 15 | } |
michaelbai | ef836d8 | 2015-10-30 05:04:19 | [diff] [blame] | 16 | |
michaelbai | 3be42fa | 2016-07-06 23:51:55 | [diff] [blame] | 17 | # Adding webview specific pak file? You should add it to |
| 18 | # webview_repack_locales_source_patterns, so it is also included in |
| 19 | # Monochrome. |
| 20 | |
sdefresne | 659ad253 | 2016-09-15 13:57:50 | [diff] [blame] | 21 | source_patterns = [ |
| 22 | "${root_gen_dir}/android_webview/components_strings_", |
Gyuyoung Kim | 8c5d077 | 2019-09-18 15:41:39 | [diff] [blame] | 23 | "${root_gen_dir}/third_party/blink/public/strings/blink_strings_", |
sdefresne | 659ad253 | 2016-09-15 13:57:50 | [diff] [blame] | 24 | "${root_gen_dir}/ui/strings/app_locale_settings_", |
Alexander Surkov | 54ca1f5 | 2021-11-17 18:20:43 | [diff] [blame] | 25 | "${root_gen_dir}/ui/strings/ax_strings_", |
michaelbai | ef836d8 | 2015-10-30 05:04:19 | [diff] [blame] | 26 | ] |
agrieve | 425d550 | 2016-09-20 01:21:30 | [diff] [blame] | 27 | deps += [ |
michaelbai | ef836d8 | 2015-10-30 05:04:19 | [diff] [blame] | 28 | "//android_webview:generate_components_strings", |
Gyuyoung Kim | 8c5d077 | 2019-09-18 15:41:39 | [diff] [blame] | 29 | "//third_party/blink/public/strings", |
aberent | a7f273b | 2016-08-18 10:46:11 | [diff] [blame] | 30 | "//ui/strings:app_locale_settings", |
Alexander Surkov | 54ca1f5 | 2021-11-17 18:20:43 | [diff] [blame] | 31 | "//ui/strings:ax_strings", |
michaelbai | ef836d8 | 2015-10-30 05:04:19 | [diff] [blame] | 32 | ] |
sdefresne | 659ad253 | 2016-09-15 13:57:50 | [diff] [blame] | 33 | source_patterns += webview_repack_locales_source_patterns |
michaelbai | 3be42fa | 2016-07-06 23:51:55 | [diff] [blame] | 34 | deps += webview_repack_locales_deps |
sdefresne | 659ad253 | 2016-09-15 13:57:50 | [diff] [blame] | 35 | output_dir = "$root_out_dir/android_webview/locales" |
michaelbai | ef836d8 | 2015-10-30 05:04:19 | [diff] [blame] | 36 | } |
| 37 | } |