Commit 006f47d7 authored by My Nguyen's avatar My Nguyen Committed by Commit Bot

Fix OS languages new route in settings page

https://crrev.com/c/2123311 changes the route for os languages setting
page. This results in the need to:
- Update the hard-coded strings in os_languages_section.html
- Update the constants in system_tray_client
and virtual_keyboard_delegate (found this by doing a codesearch).

Note: chrome::kOsLanguagesDetailsSubPage is equivalent to the old
chrome::kLanguagesSubPage

Bug: 1068045
Change-Id: Ifee9e8ab7fb392787c1a9450a56d5b30b5eff127
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2137105Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Reviewed-by: default avatarDarren Shen <shend@chromium.org>
Commit-Queue: My Nguyen <myy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756901}
parent 13f56c06
...@@ -253,7 +253,7 @@ bool ChromeVirtualKeyboardDelegate::ShowLanguageSettings() { ...@@ -253,7 +253,7 @@ bool ChromeVirtualKeyboardDelegate::ShowLanguageSettings() {
base::RecordAction(base::UserMetricsAction("OpenLanguageOptionsDialog")); base::RecordAction(base::UserMetricsAction("OpenLanguageOptionsDialog"));
chrome::ShowSettingsSubPageForProfile(ProfileManager::GetActiveUserProfile(), chrome::ShowSettingsSubPageForProfile(ProfileManager::GetActiveUserProfile(),
chrome::kLanguagesSubPage); chrome::kOsLanguagesDetailsSubPage);
return true; return true;
} }
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</settings-languages> </settings-languages>
<!-- Top-level settings section. --> <!-- Top-level settings section. -->
<settings-animated-pages id="pages" section="languages" <settings-animated-pages id="pages" section="osLanguages"
focus-config="[[focusConfig_]]"> focus-config="[[focusConfig_]]">
<div route-path="default"> <div route-path="default">
<cr-link-row <cr-link-row
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
</div> </div>
<!-- "Language and input" sub-page. --> <!-- "Language and input" sub-page. -->
<template is="dom-if" route-path="/languages/details"> <template is="dom-if" route-path="/osLanguages/details">
<settings-subpage <settings-subpage
associated-control="[[$$('#languagesSubpageTrigger')]]" associated-control="[[$$('#languagesSubpageTrigger')]]"
page-title="$i18n{osLanguagesPageTitle}"> page-title="$i18n{osLanguagesPageTitle}">
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</template> </template>
<!-- "Manage input methods" sub-sub-page. --> <!-- "Manage input methods" sub-sub-page. -->
<template is="dom-if" route-path="/languages/inputMethods"> <template is="dom-if" route-path="/osLanguages/inputMethods">
<!-- TODO(crbug.com/950007): Associate control with the sub-subpage <!-- TODO(crbug.com/950007): Associate control with the sub-subpage
trigger button from os-settings-language-page's shadow dom. --> trigger button from os-settings-language-page's shadow dom. -->
<settings-subpage <settings-subpage
......
...@@ -101,8 +101,8 @@ cr.define('settings', function() { ...@@ -101,8 +101,8 @@ cr.define('settings', function() {
// Languages and input // Languages and input
r.OS_LANGUAGES = r.ADVANCED.createSection('/osLanguages', 'osLanguages'); r.OS_LANGUAGES = r.ADVANCED.createSection('/osLanguages', 'osLanguages');
r.OS_LANGUAGES_DETAILs = r.OS_LANGUAGES.createChild('/osLanguages/details'); r.OS_LANGUAGES_DETAILS = r.OS_LANGUAGES.createChild('/osLanguages/details');
r.OS_LANGUAGES_INPUT_METHODs = r.OS_LANGUAGES_INPUT_METHODS =
r.OS_LANGUAGES.createChild('/osLanguages/inputMethods'); r.OS_LANGUAGES.createChild('/osLanguages/inputMethods');
r.OS_PRINTING = r.ADVANCED.createSection('/osPrinting', 'osPrinting'); r.OS_PRINTING = r.ADVANCED.createSection('/osPrinting', 'osPrinting');
......
...@@ -244,7 +244,7 @@ void SystemTrayClient::ShowChromeSlow() { ...@@ -244,7 +244,7 @@ void SystemTrayClient::ShowChromeSlow() {
void SystemTrayClient::ShowIMESettings() { void SystemTrayClient::ShowIMESettings() {
base::RecordAction(base::UserMetricsAction("OpenLanguageOptionsDialog")); base::RecordAction(base::UserMetricsAction("OpenLanguageOptionsDialog"));
ShowSettingsSubPageForActiveUser(chrome::kLanguagesSubPage); ShowSettingsSubPageForActiveUser(chrome::kOsLanguagesDetailsSubPage);
} }
void SystemTrayClient::ShowConnectedDevicesSettings() { void SystemTrayClient::ShowConnectedDevicesSettings() {
......
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