Commit c5cea411 authored by Javier Ernesto Flores Robles's avatar Javier Ernesto Flores Robles Committed by Commit Bot

[iOS][WidgetKit] Strings & i18n

- Add extension strings
- Generate localizable.strings files for the extension
- Add translation expectations and resource ids
- Add screenshots

Bug: 1138717
Change-Id: I443a367af96cad05dfa32ab6d94ca17c1f4c9524
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2504635
Commit-Queue: Javier Flores <javierrobles@chromium.org>
Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
Reviewed-by: default avatarOlivier Robin <olivierrobin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821842}
parent b8a4a089
......@@ -14,6 +14,7 @@ import("//ios/public/provider/chrome/browser/build_config.gni")
tweak_info_plist("tweak_info_plist") {
info_plist = "Info.plist"
# TODO(crbug.com/1140474): Remove once iOS 14.2 reaches mass adoption.
if (ios_lock_to_version != "") {
args = [ "--lock-to-version=$ios_lock_to_version" ]
......@@ -37,6 +38,7 @@ ios_appex_bundle("widget_kit_extension") {
sources = []
deps = [
":system_strings",
"resources:widget_actions_row_background_color",
"resources:widget_background_color",
"resources:widget_chrome_logo",
......@@ -63,3 +65,19 @@ ios_appex_bundle("widget_kit_extension") {
extra_substitutions = [ "PRODUCT_BUNDLE_IDENTIFIER=$ios_app_bundle_id_prefix.$xcode_product_bundle_id" ]
}
extension_repack_all_locales("packed_resources") {
extension = "widget_kit_extension"
input_locales = ios_packed_locales
output_locales = ios_packed_locales_as_mac_outputs
}
generate_localizable_strings("system_strings") {
visibility = [ ":*" ]
_packed_resources_target = ":packed_resources"
config_file = "widget_kit_extension_localize_strings_config.plist"
datapack_dir = get_label_info(_packed_resources_target, "target_gen_dir")
packed_locales = ios_packed_locales_as_mac_outputs
output_filenames = [ "Localizable.strings" ]
deps = [ _packed_resources_target ]
}
# Copyright 2020 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("//tools/grit/grit_rule.gni")
grit("strings") {
source = "ios_widget_kit_extension_strings.grd"
output_dir = "$root_gen_dir/ios/widget_kit_extension"
outputs = [ "grit/ios_widget_kit_extension_strings.h" ]
foreach(locale, locales_with_fake_bidi) {
outputs += [ "ios_widget_kit_extension_strings_$locale.pak" ]
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>headers</key>
<array>
<string>ios/widget_kit_extension/grit/ios_widget_kit_extension_strings.h</string>
</array>
<key>outputs</key>
<array>
<dict>
<key>name</key>
<string>Localizable.strings</string>
<key>strings</key>
<array>
<string>IDS_IOS_WIDGET_KIT_EXTENSION_GAME_A11Y_LABEL</string>
<string>IDS_IOS_WIDGET_KIT_EXTENSION_GAME_DESCRIPTION</string>
<string>IDS_IOS_WIDGET_KIT_EXTENSION_GAME_DISPLAY_NAME</string>
<string>IDS_IOS_WIDGET_KIT_EXTENSION_GAME_TITLE</string>
<string>IDS_IOS_WIDGET_KIT_EXTENSION_QUICK_ACTIONS_DESCRIPTION</string>
<string>IDS_IOS_WIDGET_KIT_EXTENSION_QUICK_ACTIONS_DISPLAY_NAME</string>
<string>IDS_IOS_WIDGET_KIT_EXTENSION_QUICK_ACTIONS_TITLE</string>
<string>IDS_IOS_WIDGET_KIT_EXTENSION_SEARCH_A11Y_LABEL</string>
<string>IDS_IOS_WIDGET_KIT_EXTENSION_SEARCH_DESCRIPTION</string>
<string>IDS_IOS_WIDGET_KIT_EXTENSION_SEARCH_DISPLAY_NAME</string>
<string>IDS_IOS_WIDGET_KIT_EXTENSION_SEARCH_TITLE</string>
</array>
</dict>
</array>
</dict>
</plist>
......@@ -463,6 +463,9 @@
"META": {"join": 2},
"messages": [800],
},
"ios/chrome/widget_kit_extension/strings/ios_widget_kit_extension_strings.grd": {
"messages": [820],
},
# END ios/ section.
......
......@@ -65,6 +65,7 @@
"ios/chrome/search_widget_extension/strings/ios_search_widget_extension_chromium_strings.grd",
"ios/chrome/search_widget_extension/strings/ios_search_widget_extension_google_chrome_strings.grd",
"ios/chrome/share_extension/strings/ios_share_extension_strings.grd",
"ios/chrome/widget_kit_extension/strings/ios_widget_kit_extension_strings.grd",
"remoting/resources/remoting_strings.grd",
"services/services_strings.grd",
"third_party/libaddressinput/chromium/address_input_strings.grd",
......
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