Commit 28f1077f authored by kelvinp's avatar kelvinp Committed by Commit bot

Repack remoting resources into Chrome on Chrome OS

The Continue Dialog (along with a few other dialogs) in Remote Assistance references
localized strings defined in rmeoting_strings.grd.  To make Remote Assistance work
on Chrome OS, we need to get those resources into Chrome.

This CL
1. Modifies repack_locales.py to merge the generated strings from remoting_strings.grd
into the merged resource packs (e.g. merge remoting/resource/en.pak -> en-US.pak).
2. Chrome currently supports more languages than remoting.  This CL adds the missing
languages into remoting_strings.grd.  This is required to avoid compilation failures.
The list of added locales are based-on on referencing other chrome grd files (e.g.
generated_resources.grd).
3. remoting_strings.grds currently uses an overlapping resource ID range with chrome.
To avoid conflicts, this CL reserves ids [29550-30000) for strings in remoting
(see the changes in remoting/resources/resource_ids and tools/gritsettings/resource_ids).

Review URL: https://codereview.chromium.org/682863002

Cr-Commit-Position: refs/heads/master@{#301566}
parent ad9d3ccf
...@@ -47,8 +47,10 @@ template("_repack_one_locale") { ...@@ -47,8 +47,10 @@ template("_repack_one_locale") {
if (is_chromeos) { if (is_chromeos) {
sources += [ sources += [
"${root_gen_dir}/ui/chromeos/strings/ui_chromeos_strings_${locale}.pak", "${root_gen_dir}/ui/chromeos/strings/ui_chromeos_strings_${locale}.pak",
"${root_gen_dir}/remoting/resources/${locale}.pak",
] ]
deps += [ deps += [
"//remoting/resources",
"//ui/chromeos/strings", "//ui/chromeos/strings",
] ]
} }
......
...@@ -462,6 +462,7 @@ ...@@ -462,6 +462,7 @@
}], }],
['chromeos==1', { ['chromeos==1', {
'dependencies': [ 'dependencies': [
'<(DEPTH)/remoting/remoting.gyp:remoting_resources',
'<(DEPTH)/ui/chromeos/ui_chromeos.gyp:ui_chromeos_resources', '<(DEPTH)/ui/chromeos/ui_chromeos.gyp:ui_chromeos_resources',
'<(DEPTH)/ui/chromeos/ui_chromeos.gyp:ui_chromeos_strings', '<(DEPTH)/ui/chromeos/ui_chromeos.gyp:ui_chromeos_strings',
], ],
......
...@@ -97,6 +97,8 @@ def calc_inputs(locale): ...@@ -97,6 +97,8 @@ def calc_inputs(locale):
if CHROMEOS: if CHROMEOS:
inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'chromeos', 'strings', inputs.append(os.path.join(SHARE_INT_DIR, 'ui', 'chromeos', 'strings',
'ui_chromeos_strings_%s.pak' % locale)) 'ui_chromeos_strings_%s.pak' % locale))
inputs.append(os.path.join(SHARE_INT_DIR, 'remoting', 'resources',
'%s.pak' % locale))
if OS != 'ios': if OS != 'ios':
#e.g. #e.g.
......
...@@ -158,7 +158,6 @@ ...@@ -158,7 +158,6 @@
], ],
'variables': { 'variables': {
'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)', 'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)',
'grit_resource_ids': 'resources/resource_ids',
'sources': [ 'sources': [
'<(SHARED_INTERMEDIATE_DIR)/main.html', '<(SHARED_INTERMEDIATE_DIR)/main.html',
'base/resources_unittest.cc', 'base/resources_unittest.cc',
......
...@@ -6,8 +6,10 @@ import("//tools/grit/grit_rule.gni") ...@@ -6,8 +6,10 @@ import("//tools/grit/grit_rule.gni")
# See also remoting_locales_with_underscores below. # See also remoting_locales_with_underscores below.
remoting_locales = [ remoting_locales = [
"am",
"ar", "ar",
"bg", "bg",
"bn",
"ca", "ca",
"cs", "cs",
"da", "da",
...@@ -18,9 +20,12 @@ remoting_locales = [ ...@@ -18,9 +20,12 @@ remoting_locales = [
"es", "es",
"es-419", "es-419",
"et", "et",
"fa",
"fake-bidi",
"fi", "fi",
"fil", "fil",
"fr", "fr",
"gu",
"he", "he",
"hi", "hi",
"hr", "hr",
...@@ -28,9 +33,13 @@ remoting_locales = [ ...@@ -28,9 +33,13 @@ remoting_locales = [
"id", "id",
"it", "it",
"ja", "ja",
"kn",
"ko", "ko",
"lt", "lt",
"lv", "lv",
"ml",
"mr",
"ms",
"nb", "nb",
"nl", "nl",
"pl", "pl",
...@@ -42,6 +51,9 @@ remoting_locales = [ ...@@ -42,6 +51,9 @@ remoting_locales = [
"sl", "sl",
"sr", "sr",
"sv", "sv",
"sw",
"ta",
"te",
"th", "th",
"tr", "tr",
"uk", "uk",
...@@ -56,6 +68,7 @@ remoting_locales_with_underscores = remoting_locales ...@@ -56,6 +68,7 @@ remoting_locales_with_underscores = remoting_locales
remoting_locales_with_underscores -= [ remoting_locales_with_underscores -= [
"en-GB", "en-GB",
"es-419", "es-419",
"fake-bidi",
"pt-BR", "pt-BR",
"pt-PT", "pt-PT",
"zh-CN", "zh-CN",
...@@ -64,12 +77,18 @@ remoting_locales_with_underscores -= [ ...@@ -64,12 +77,18 @@ remoting_locales_with_underscores -= [
remoting_locales_with_underscores += [ remoting_locales_with_underscores += [
"en_GB", "en_GB",
"es_419", "es_419",
"fake_bidi",
"pt_BR", "pt_BR",
"pt_PT", "pt_PT",
"zh_CN", "zh_CN",
"zh_TW", "zh_TW",
] ]
if (is_chromeos) {
remoting_locales += ["en-US"]
remoting_locales_with_underscores += ["en_US"]
}
group("resources") { group("resources") {
deps = [ deps = [
":copy_locales", ":copy_locales",
...@@ -134,8 +153,6 @@ grit("strings") { ...@@ -134,8 +153,6 @@ grit("strings") {
# generated file root. # generated file root.
output_dir = root_gen_dir output_dir = root_gen_dir
resource_ids = "resource_ids"
outputs = [ outputs = [
"remoting/base/string_resources.h", "remoting/base/string_resources.h",
] ]
......
This diff is collapsed.
# Copyright (c) 2012 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.
#
# This file is used to assign starting resource ids for resources and strings
# used by Chromoting. This is done to ensure that resource ids are unique
# across all the grd files. If you are adding a new grd file, please add
# a new entry to this file.
#
# The first entry in the file, SRCDIR, is special: It is a relative path from
# this file to the base of your checkout.
#
# http://msdn.microsoft.com/en-us/library/t2zechd4(VS.71).aspx says that the
# range for IDR_ is 1 to 28,671 and the range for IDS_ is 1 to 32,767 and
# common convention starts practical use of IDs at 100 or 101.
{
"SRCDIR": "../..",
"remoting/resources/remoting_strings.grd": {
"messages": [1000],
},
}
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# The first entry in the file, SRCDIR, is special: It is a relative path from # The first entry in the file, SRCDIR, is special: It is a relative path from
# this file to the base of your checkout. # this file to the base of your checkout.
# #
# The range of ID values, which is used by pak files, is from 0 to 2^16 - 1. # The range of ID values, which is used by pak files, is from 0 to 2^16 - 1.
{ {
"SRCDIR": "../..", "SRCDIR": "../..",
...@@ -215,6 +215,9 @@ ...@@ -215,6 +215,9 @@
"chrome/app/address_input_strings.grd": { "chrome/app/address_input_strings.grd": {
"messages": [29100], "messages": [29100],
}, },
"remoting/resources/remoting_strings.grd": {
"messages": [29550],
},
"components/components_strings.grd": { "components/components_strings.grd": {
"messages": [30000], "messages": [30000],
}, },
......
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