Commit 6f6eba38 authored by khorimoto's avatar khorimoto Committed by Commit bot

Localize the Accessibility Page.

BUG=472677

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

Cr-Commit-Position: refs/heads/master@{#323952}
parent aa719a69
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- Settings-specific strings (included from generated_resources.grd). --> <!-- Settings-specific strings (included from generated_resources.grd). -->
<grit-part> <grit-part>
<!-- Accessibility Page -->
<message name="IDS_MD_SETTINGS_ACCESSIBILITY_PAGE_TITLE" desc="Name of the settings page which displays accessibility preferences."> <message name="IDS_MD_SETTINGS_ACCESSIBILITY_PAGE_TITLE" desc="Name of the settings page which displays accessibility preferences.">
Accessibility Accessibility
</message> </message>
<message name="IDS_SETTINGS_ACCESSIBILITY_MORE_FEATURES_LINK" desc="Link which opens page where users can install extensions which provide additional accessibility features.">
Add additional accessibility features
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_OPTIONS_IN_MENU_LABEL" desc="Label for checkbox which enables showing accessibilitly options in the system menu.">
Show accessibility options in the system menu
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_LARGE_MOUSE_CURSOR_LABEL" desc="Label for checkbox which enables showing a larger mouse cursor than normal.">
Show large mouse cursor
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_HIGH_CONTRAST_LABEL" desc="Label for checkbox which enables high-contrast UI.">
Use high contrast mode
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_STICKY_KEYS_LABEL" desc="Label for checkbox which enables sticky keys.">
Enable sticky keys
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_STICKY_KEYS_SUBLABEL" desc="Sub-label describing what the term 'sticky keys' means.">
(to perform keyboard shortcuts by typing them sequentially)
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_CHROMEVOX_LABEL" desc="Label for checkbox which enables ChromeVox">
Enable ChromeVox
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_CHROMEVOX_SUBLABEL" desc="Sub-label describingn what ChromeVox is.">
(spoken feedback)
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_LABEL" desc="Label for checkbox which enables the screen magnifier">
Enable screen magnifier
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_TAP_DRAGGING_LABEL" desc="Label for checkbox which enables tap dragging.">
Enable tap dragging
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_CLICK_ON_STOP_LABEL" desc="Label for checkbox which enables automatically clicking when the mouse pointer stops.">
Automatically click when the mouse pointer stops
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_LABEL" desc="Label for dropdown menu which contains various time delays for clicks.">
Delay before click:
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_EXTREMELY_SHORT" desc="Description of an extremely short delay before clicks.">
extremeley short
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_VERY_SHORT" desc="Description of a very short delay before clicks.">
very short
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_SHORT" desc="Description of a short delay before clicks.">
short
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_LONG" desc="Description of a long delay before clicks.">
long
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_VERY_LONG" desc="Description of a very long delay before clicks.">
very long
</message>
<message name="IDS_SETTINGS_ACCESSIBILITY_ON_SCREEN_KEYBOARD_LABEL" desc="Label for checkbox which enables an on-screen keyboard.">
Enable on-screen keyboard
</message>
<!-- Downloads Page -->
<message name="IDS_MD_SETTINGS_DOWNLOADS_PAGE_TITLE" desc="Name of the settings page which displays download preferences."> <message name="IDS_MD_SETTINGS_DOWNLOADS_PAGE_TITLE" desc="Name of the settings page which displays download preferences.">
Downloads Downloads
</message> </message>
......
...@@ -15,52 +15,66 @@ ...@@ -15,52 +15,66 @@
<div class="more-a11y-link"> <div class="more-a11y-link">
<a href="https://chrome.google.com/webstore/category/collection/accessibility" <a href="https://chrome.google.com/webstore/category/collection/accessibility"
target="_blank"> target="_blank" i18n-content="accessibilityMoreFeaturesLink"></a>
Add additional accessibility features
</a>
</div> </div>
<if expr="chromeos"> <if expr="chromeos">
<cr-settings-checkbox pref="{{prefs.settings.a11y.enable_menu}}" <cr-settings-checkbox pref="{{prefs.settings.a11y.enable_menu}}"
label="Show accessibility options in the system menu"> i18n-values="label:accessibilityOptionsInMenuLabel">
</cr-settings-checkbox> </cr-settings-checkbox>
<cr-settings-checkbox pref="{{prefs.settings.a11y.large_cursor_enabled}}" <cr-settings-checkbox pref="{{prefs.settings.a11y.large_cursor_enabled}}"
label="Show large mouse cursor"></cr-settings-checkbox> i18n-values="label:accessibilityLargeMouseCursorLabel">
</cr-settings-checkbox>
<cr-settings-checkbox pref="{{prefs.settings.a11y.high_contrast_enabled}}" <cr-settings-checkbox pref="{{prefs.settings.a11y.high_contrast_enabled}}"
label="Use high contrast mode"></cr-settings-checkbox> i18n-values="label:accessibilityHighContrastLabel">
</cr-settings-checkbox>
<cr-settings-checkbox pref="{{prefs.settings.a11y.sticky_keys_enabled}}" <cr-settings-checkbox pref="{{prefs.settings.a11y.sticky_keys_enabled}}"
label="Enable sticky keys" i18n-values="label:accessibilityStickyKeysLabel;
subLabel="(to perform keyboard shortcuts by typing them subLabel:accessibilityStickyKeysSublabel">
sequentially)"></cr-settings-checkbox> </cr-settings-checkbox>
<cr-settings-checkbox pref="{{prefs.settings.accessibility}}" <cr-settings-checkbox pref="{{prefs.settings.accessibility}}"
label="Enable ChromeVox" subLabel="(spoken feedback)"> i18n-values="label:accessibilityChromeVoxLabel;
subLabel:accessibilityChromeVoxSublabel">
</cr-settings-checkbox> </cr-settings-checkbox>
<cr-settings-checkbox pref="{{prefs.settings.a11y.screen_magnifier}}" <cr-settings-checkbox pref="{{prefs.settings.a11y.screen_magnifier}}"
label="Enable screen magnifier"></cr-settings-checkbox> i18n-values="label:accessibilityScreenMagnifierLabel">
</cr-settings-checkbox>
<cr-settings-checkbox <cr-settings-checkbox
pref="{{prefs.settings.touchpad.enable_tap_dragging}}" pref="{{prefs.settings.touchpad.enable_tap_dragging}}"
label="Enable tap dragging"></cr-settings-checkbox> i18n-values="label:accessibilityTapDraggingLabel">
</cr-settings-checkbox>
<cr-settings-checkbox pref="{{prefs.settings.a11y.autoclick}}" <cr-settings-checkbox pref="{{prefs.settings.a11y.autoclick}}"
label="Automatically click when the mouse pointer stops"> i18n-values="label:accessibilityClickOnStopLabel">
</cr-settings-checkbox> </cr-settings-checkbox>
<core-label horizontal layout center class="autoclick-delay-label" <core-label horizontal layout center class="autoclick-delay-label"
hidden?="{{!prefs.settings.a11y.autoclick}}"> hidden?="{{!prefs.settings.a11y.autoclick}}">
<span>Delay before click:</span> <span i18n-content="accessibilityDelayBeforeClickLabel"></span>
<cr-dropdown-menu class="autoclick-dropdown"> <cr-dropdown-menu class="autoclick-dropdown">
<core-menu class="menu" valueAttr="value" selectedAttribute="" <core-menu class="menu" valueAttr="value" selectedAttribute=""
selected="{{prefs.settings.a11y.autoclick_delay_ms}}"> selected="{{prefs.settings.a11y.autoclick_delay_ms}}">
<paper-item value="200">extremely short</paper-item> <paper-item value="200"
<paper-item value="400">very short</paper-item> i18n-content="accessibilityDelayBeforeClickExtremelyShort">
<paper-item value="600">short</paper-item> </paper-item>
<paper-item value="800">long</paper-item> <paper-item value="400"
<paper-item value="1000">very long</paper-item> i18n-content="accessibilityDelayBeforeClickVeryShort">
</paper-item>
<paper-item value="600"
i18n-content="accessibilityDelayBeforeClickShort">
</paper-item>
<paper-item value="800"
i18n-content="accessibilityDelayBeforeClickLong">
</paper-item>
<paper-item value="1000"
i18n-content="accessibilityDelayBeforeClickVeryLong">
</paper-item>
</core-menu> </core-menu>
</cr-dropdown-menu> </cr-dropdown-menu>
</core-label> </core-label>
<cr-settings-checkbox pref="{{prefs.settings.a11y.virtual_keyboard}}" <cr-settings-checkbox pref="{{prefs.settings.a11y.virtual_keyboard}}"
label="Enable on-screen keyboard"></cr-settings-checkbox> i18n-values="label:accessibilityOnScreenKeyboardLabel">
</cr-settings-checkbox>
</if> </if>
</paper-shadow> </paper-shadow>
......
...@@ -13,15 +13,77 @@ namespace { ...@@ -13,15 +13,77 @@ namespace {
// the following name. These names must be kept in sync. // the following name. These names must be kept in sync.
const char kLocalizedStringsFile[] = "strings.js"; const char kLocalizedStringsFile[] = "strings.js";
void AddA11yStrings(content::WebUIDataSource* html_source) {
html_source->AddLocalizedString(
"a11yPageTitle", IDS_MD_SETTINGS_ACCESSIBILITY_PAGE_TITLE);
html_source->AddLocalizedString(
"accessibilityMoreFeaturesLink",
IDS_SETTINGS_ACCESSIBILITY_MORE_FEATURES_LINK);
html_source->AddLocalizedString(
"accessibilityOptionsInMenuLabel",
IDS_SETTINGS_ACCESSIBILITY_OPTIONS_IN_MENU_LABEL);
html_source->AddLocalizedString(
"accessibilityLargeMouseCursorLabel",
IDS_SETTINGS_ACCESSIBILITY_LARGE_MOUSE_CURSOR_LABEL);
html_source->AddLocalizedString(
"accessibilityHighContrastLabel",
IDS_SETTINGS_ACCESSIBILITY_HIGH_CONTRAST_LABEL);
html_source->AddLocalizedString(
"accessibilityStickyKeysLabel",
IDS_SETTINGS_ACCESSIBILITY_STICKY_KEYS_LABEL);
html_source->AddLocalizedString(
"accessibilityStickyKeysSublabel",
IDS_SETTINGS_ACCESSIBILITY_STICKY_KEYS_SUBLABEL);
html_source->AddLocalizedString(
"accessibilityChromeVoxLabel",
IDS_SETTINGS_ACCESSIBILITY_CHROMEVOX_LABEL);
html_source->AddLocalizedString(
"accessibilityChromeVoxSublabel",
IDS_SETTINGS_ACCESSIBILITY_CHROMEVOX_SUBLABEL);
html_source->AddLocalizedString(
"accessibilityScreenMagnifierLabel",
IDS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_LABEL);
html_source->AddLocalizedString(
"accessibilityTapDraggingLabel",
IDS_SETTINGS_ACCESSIBILITY_TAP_DRAGGING_LABEL);
html_source->AddLocalizedString(
"accessibilityClickOnStopLabel",
IDS_SETTINGS_ACCESSIBILITY_CLICK_ON_STOP_LABEL);
html_source->AddLocalizedString(
"accessibilityDelayBeforeClickLabel",
IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_LABEL);
html_source->AddLocalizedString(
"accessibilityDelayBeforeClickExtremelyShort",
IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_EXTREMELY_SHORT);
html_source->AddLocalizedString(
"accessibilityDelayBeforeClickVeryShort",
IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_VERY_SHORT);
html_source->AddLocalizedString(
"accessibilityDelayBeforeClickShort",
IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_SHORT);
html_source->AddLocalizedString(
"accessibilityDelayBeforeClickLong",
IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_LONG);
html_source->AddLocalizedString(
"accessibilityDelayBeforeClickVeryLong",
IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_VERY_LONG);
html_source->AddLocalizedString(
"accessibilityOnScreenKeyboardLabel",
IDS_SETTINGS_ACCESSIBILITY_ON_SCREEN_KEYBOARD_LABEL);
}
void AddDownloadsStrings(content::WebUIDataSource* html_source) {
html_source->AddLocalizedString(
"downloadsPageTitle", IDS_MD_SETTINGS_DOWNLOADS_PAGE_TITLE);
}
} // namespace } // namespace
namespace settings { namespace settings {
void AddLocalizedStrings(content::WebUIDataSource* html_source) { void AddLocalizedStrings(content::WebUIDataSource* html_source) {
html_source->AddLocalizedString( AddA11yStrings(html_source);
"a11yPageTitle", IDS_MD_SETTINGS_ACCESSIBILITY_PAGE_TITLE); AddDownloadsStrings(html_source);
html_source->AddLocalizedString(
"downloadsPageTitle", IDS_MD_SETTINGS_DOWNLOADS_PAGE_TITLE);
html_source->SetJsonPath(kLocalizedStringsFile); html_source->SetJsonPath(kLocalizedStringsFile);
} }
......
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