1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
chrome / chrome_repack_locales.gni [blame]
# Copyright 2014 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/chrome_build.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/features.gni")
import("//build/config/ui.gni")
import("//extensions/buildflags/buildflags.gni")
import("//tools/grit/repack.gni")
assert(!is_ios, "Chromium/iOS shouldn't use anything in //chrome")
# Wraps repack_locales(), setting the source_patterns and deps required for
# Chrome.
#
# Extra Parameters:
#
# additional_source_patterns [optional]
# Extra source_patterns for repack_locales().
template("chrome_repack_locales") {
repack_locales(target_name) {
forward_variables_from(invoker, "*", [ "additional_source_patterns" ])
# Each input pak file should also have a deps line.
source_patterns = [
"${root_gen_dir}/chrome/generated_resources_",
"${root_gen_dir}/chrome/locale_settings_",
"${root_gen_dir}/chrome/platform_locale_settings_",
"${root_gen_dir}/components/omnibox/resources/omnibox_pedal_synonyms_",
"${root_gen_dir}/components/plus_addresses/resources/strings/plus_addresses_strings_",
"${root_gen_dir}/components/strings/components_locale_settings_",
"${root_gen_dir}/components/strings/components_strings_",
"${root_gen_dir}/components/strings/privacy_sandbox_strings_",
"${root_gen_dir}/third_party/blink/public/strings/blink_strings_",
"${root_gen_dir}/third_party/blink/public/strings/permission_element_strings_",
"${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_",
"${root_gen_dir}/device/fido/strings/fido_strings_",
"${root_gen_dir}/services/strings/services_strings_",
"${root_gen_dir}/third_party/libaddressinput/address_input_strings_",
"${root_gen_dir}/ui/strings/app_locale_settings_",
"${root_gen_dir}/ui/strings/auto_image_annotation_strings_",
"${root_gen_dir}/ui/strings/ax_strings_",
"${root_gen_dir}/ui/strings/ui_strings_",
]
if (!defined(deps)) {
deps = []
}
deps += [
"//chrome/app:branded_strings",
"//chrome/app:generated_resources",
"//chrome/app/resources:locale_settings",
"//chrome/app/resources:platform_locale_settings",
"//components/omnibox/resources:omnibox_pedal_synonyms",
"//components/plus_addresses/resources/strings",
"//components/strings:components_branded_strings",
"//components/strings:components_locale_settings",
"//components/strings:components_strings",
"//components/strings:privacy_sandbox_strings",
"//device/bluetooth/strings",
"//device/fido/strings",
"//services/strings",
"//third_party/blink/public/strings",
"//third_party/blink/public/strings:permission_element_strings",
"//third_party/libaddressinput:strings",
"//ui/strings:app_locale_settings",
"//ui/strings:auto_image_annotation_strings",
"//ui/strings:ax_strings",
"//ui/strings:ui_strings",
]
if (defined(invoker.deps)) {
deps += invoker.deps
}
if (is_chromeos) {
source_patterns +=
[ "${root_gen_dir}/ui/chromeos/strings/ui_chromeos_strings_" ]
deps += [ "//ui/chromeos/strings" ]
if (is_chrome_branded) {
source_patterns += [ "${root_gen_dir}/chrome/app/theme/google_chrome/chromeos/strings/chromeos_chrome_internal_strings_" ]
deps += [ "//chrome/app/theme/google_chrome/chromeos/strings" ]
}
}
if (is_chromeos_ash) {
source_patterns += [
"${root_gen_dir}/ash/strings/ash_strings_",
"${root_gen_dir}/ash/webui/camera_app_ui/resources/strings/ash_camera_app_strings_",
"${root_gen_dir}/chromeos/strings/chromeos_strings_",
"${root_gen_dir}/remoting/resources/",
]
deps += [
"//ash/strings",
"//ash/webui/camera_app_ui/resources/strings",
"//chromeos/strings",
"//remoting/resources",
]
if (is_chrome_branded) {
source_patterns += [ "${root_gen_dir}/chromeos/ash/resources/internal/strings/ash_internal_strings_" ]
deps += [ "//chromeos/ash/resources/internal/strings" ]
}
compress = true
}
if (is_chromeos_lacros) {
source_patterns +=
[ "${root_gen_dir}/chromeos/strings/chromeos_strings_" ]
deps += [ "//chromeos/strings" ]
}
if (!is_android) {
source_patterns += [ "${root_gen_dir}/components/strings/search_engine_descriptions_strings_" ]
deps += [ "//components/strings:search_engine_descriptions_strings" ]
}
if (enable_extensions_core) {
source_patterns +=
[ "${root_gen_dir}/extensions/strings/extensions_strings_" ]
deps += [ "//extensions/strings" ]
}
# src-internal strings only available on Chrome branded builds.
if (is_chrome_branded) {
source_patterns += [ "${root_gen_dir}/chrome/browser/nearby_sharing/internal/resources/nearby_share_internal_strings_" ]
deps += [ "//chrome/browser/nearby_sharing/internal/resources:nearby_share_internal_strings" ]
}
source_patterns += [
"${root_gen_dir}/chrome/${branding_path_product}_strings_",
"${root_gen_dir}/components/strings/components_${branding_path_product}_strings_",
]
if (defined(invoker.additional_source_patterns)) {
source_patterns += invoker.additional_source_patterns
}
}
}