Commit 35603d34 authored by Daniel Classon's avatar Daniel Classon Committed by Commit Bot

[DevicePage] Rename "Enable reverse scrolling" strings

Renames "Reverse scrolling" to "Enable reverse scrolling" on the
settings page for Mouse and Touchpad, as per the bug.

Fixed: 1132398
Change-Id: I173fe20f95a21c3909e8fa766cc8bfaac62258b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2434211Reviewed-by: default avatarKyle Horimoto <khorimoto@chromium.org>
Commit-Queue: Daniel Classon <dclasson@google.com>
Cr-Commit-Position: refs/heads/master@{#811504}
parent 8276edf4
...@@ -498,14 +498,11 @@ ...@@ -498,14 +498,11 @@
<!-- Device Page (OS Settings) --> <!-- Device Page (OS Settings) -->
<message name="IDS_OS_SETTINGS_TOUCHPAD_REVERSE_SCROLL_LABEL"> <message name="IDS_OS_SETTINGS_TOUCHPAD_REVERSE_SCROLL_LABEL">
Reverse scrolling <ph name="LINK_BEGIN">&lt;a&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph> Enable reverse scrolling <ph name="LINK_BEGIN">&lt;a&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
</message> </message>
<message name="IDS_SETTINGS_DEVICE_TITLE" desc="Name of the settings page which displays device and peripheral settings."> <message name="IDS_SETTINGS_DEVICE_TITLE" desc="Name of the settings page which displays device and peripheral settings.">
Device Device
</message> </message>
<message name="IDS_SETTINGS_SCROLL_LABEL" desc="In Device Settings, the title above the radio buttons to choose the scrolling behavior.">
Scrolling
</message>
<!-- Personalization Page (OS settings) --> <!-- Personalization Page (OS settings) -->
<message name="IDS_OS_SETTINGS_PERSONALIZATION" desc="Name of the OS settings page which displays personalization preferences."> <message name="IDS_OS_SETTINGS_PERSONALIZATION" desc="Name of the OS settings page which displays personalization preferences.">
...@@ -1641,7 +1638,7 @@ ...@@ -1641,7 +1638,7 @@
Swap primary mouse button Swap primary mouse button
</message> </message>
<message name="IDS_SETTINGS_MOUSE_REVERSE_SCROLL_LABEL" desc="In Device Settings, the text next to the checkbox to set reverse scrolling."> <message name="IDS_SETTINGS_MOUSE_REVERSE_SCROLL_LABEL" desc="In Device Settings, the text next to the checkbox to set reverse scrolling.">
Reverse scrolling Enable reverse scrolling <ph name="LINK_BEGIN">&lt;a&gt;</ph>Learn more<ph name="LINK_END">&lt;/a&gt;</ph>
</message> </message>
<message name="IDS_SETTINGS_MOUSE_ACCELERATION_LABEL" desc="In Device Settings, the text next to the checkbox to disable mouse acceleration."> <message name="IDS_SETTINGS_MOUSE_ACCELERATION_LABEL" desc="In Device Settings, the text next to the checkbox to disable mouse acceleration.">
Enable mouse acceleration Enable mouse acceleration
......
d8b70907a64d121e2063d6faf229295b8e56089f
\ No newline at end of file
a5951a0be1d8db1eed35d1fc22331b1450bcf4f0
\ No newline at end of file
...@@ -87,12 +87,22 @@ ...@@ -87,12 +87,22 @@
</settings-slider> </settings-slider>
</div> </div>
</template> </template>
<settings-toggle-button id="mouseReverseScroll" <div class="settings-box" id="mouseReverseScrollRow"
class="hr" on-click="onMouseReverseScrollRowClicked_">
pref="{{prefs.settings.mouse.reverse_scroll}}" <div class="start settings-box-text">
label="$i18n{mouseReverseScroll}" <settings-localized-link
deep-link-focus-id$="[[Setting.kMouseReverseScrolling]]"> on-click="onLearnMoreLinkClicked_"
</settings-toggle-button> id="enableMouseReverseScrollingLabel"
localized-string="$i18n{mouseReverseScroll}"
link-url="$i18n{naturalScrollLearnMoreLink}">
</settings-localized-link>
</div>
<cr-toggle id="mouseReverseScroll"
checked="{{prefs.settings.mouse.reverse_scroll.value}}"
aria-labelledby="enableMouseReverseScrollingLabel"
deep-link-focus-id$="[[Setting.kMouseReverseScrolling]]">
</cr-toggle>
</div>
</div> </div>
</div> </div>
<div id="touchpad" hidden$="[[!hasTouchpad]]"> <div id="touchpad" hidden$="[[!hasTouchpad]]">
...@@ -152,7 +162,7 @@ ...@@ -152,7 +162,7 @@
</div> </div>
</template> </template>
<div class="settings-box" id="reverseScrollRow" <div class="settings-box" id="reverseScrollRow"
on-click="onReverseScrollRowClicked_"> on-click="onTouchpadReverseScrollRowClicked_">
<div class="start settings-box-text"> <div class="start settings-box-text">
<settings-localized-link <settings-localized-link
on-click="onLearnMoreLinkClicked_" on-click="onLearnMoreLinkClicked_"
......
...@@ -145,7 +145,14 @@ Polymer({ ...@@ -145,7 +145,14 @@ Polymer({
}, },
/** @private */ /** @private */
onReverseScrollRowClicked_: function() { onMouseReverseScrollRowClicked_: function() {
this.setPrefValue(
'settings.mouse.reverse_scroll',
!this.getPref('settings.mouse.reverse_scroll').value);
},
/** @private */
onTouchpadReverseScrollRowClicked_: function() {
this.setPrefValue( this.setPrefValue(
'settings.touchpad.natural_scroll', 'settings.touchpad.natural_scroll',
!this.getPref('settings.touchpad.natural_scroll').value); !this.getPref('settings.touchpad.natural_scroll').value);
......
...@@ -787,7 +787,6 @@ DeviceSection::~DeviceSection() { ...@@ -787,7 +787,6 @@ DeviceSection::~DeviceSection() {
void DeviceSection::AddLoadTimeData(content::WebUIDataSource* html_source) { void DeviceSection::AddLoadTimeData(content::WebUIDataSource* html_source) {
static constexpr webui::LocalizedString kDeviceStrings[] = { static constexpr webui::LocalizedString kDeviceStrings[] = {
{"devicePageTitle", IDS_SETTINGS_DEVICE_TITLE}, {"devicePageTitle", IDS_SETTINGS_DEVICE_TITLE},
{"scrollLabel", IDS_SETTINGS_SCROLL_LABEL},
{"touchPadScrollLabel", IDS_OS_SETTINGS_TOUCHPAD_REVERSE_SCROLL_LABEL}, {"touchPadScrollLabel", IDS_OS_SETTINGS_TOUCHPAD_REVERSE_SCROLL_LABEL},
}; };
AddLocalizedStringsBulk(html_source, kDeviceStrings); AddLocalizedStringsBulk(html_source, kDeviceStrings);
......
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