Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Side by Side Diff: chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc

Issue 1061703003: Localize the Accessibility Page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jhawkins nit. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/resources/settings/a11y_page/a11y_page.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/settings/md_settings_localized_strings_provide r.h" 5 #include "chrome/browser/ui/webui/settings/md_settings_localized_strings_provide r.h"
6 6
7 #include "chrome/grit/generated_resources.h" 7 #include "chrome/grit/generated_resources.h"
8 #include "content/public/browser/web_ui_data_source.h" 8 #include "content/public/browser/web_ui_data_source.h"
9 9
10 namespace { 10 namespace {
11 11
12 // Note that md_settings.html contains a <script> tag which imports a script of 12 // Note that md_settings.html contains a <script> tag which imports a script of
13 // the following name. These names must be kept in sync. 13 // the following name. These names must be kept in sync.
14 const char kLocalizedStringsFile[] = "strings.js"; 14 const char kLocalizedStringsFile[] = "strings.js";
15 15
16 void AddA11yStrings(content::WebUIDataSource* html_source) {
17 html_source->AddLocalizedString(
18 "a11yPageTitle", IDS_MD_SETTINGS_ACCESSIBILITY_PAGE_TITLE);
19 html_source->AddLocalizedString(
20 "accessibilityMoreFeaturesLink",
21 IDS_SETTINGS_ACCESSIBILITY_MORE_FEATURES_LINK);
22 html_source->AddLocalizedString(
23 "accessibilityOptionsInMenuLabel",
24 IDS_SETTINGS_ACCESSIBILITY_OPTIONS_IN_MENU_LABEL);
25 html_source->AddLocalizedString(
26 "accessibilityLargeMouseCursorLabel",
27 IDS_SETTINGS_ACCESSIBILITY_LARGE_MOUSE_CURSOR_LABEL);
28 html_source->AddLocalizedString(
29 "accessibilityHighContrastLabel",
30 IDS_SETTINGS_ACCESSIBILITY_HIGH_CONTRAST_LABEL);
31 html_source->AddLocalizedString(
32 "accessibilityStickyKeysLabel",
33 IDS_SETTINGS_ACCESSIBILITY_STICKY_KEYS_LABEL);
34 html_source->AddLocalizedString(
35 "accessibilityStickyKeysSublabel",
36 IDS_SETTINGS_ACCESSIBILITY_STICKY_KEYS_SUBLABEL);
37 html_source->AddLocalizedString(
38 "accessibilityChromeVoxLabel",
39 IDS_SETTINGS_ACCESSIBILITY_CHROMEVOX_LABEL);
40 html_source->AddLocalizedString(
41 "accessibilityChromeVoxSublabel",
42 IDS_SETTINGS_ACCESSIBILITY_CHROMEVOX_SUBLABEL);
43 html_source->AddLocalizedString(
44 "accessibilityScreenMagnifierLabel",
45 IDS_SETTINGS_ACCESSIBILITY_SCREEN_MAGNIFIER_LABEL);
46 html_source->AddLocalizedString(
47 "accessibilityTapDraggingLabel",
48 IDS_SETTINGS_ACCESSIBILITY_TAP_DRAGGING_LABEL);
49 html_source->AddLocalizedString(
50 "accessibilityClickOnStopLabel",
51 IDS_SETTINGS_ACCESSIBILITY_CLICK_ON_STOP_LABEL);
52 html_source->AddLocalizedString(
53 "accessibilityDelayBeforeClickLabel",
54 IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_LABEL);
55 html_source->AddLocalizedString(
56 "accessibilityDelayBeforeClickExtremelyShort",
57 IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_EXTREMELY_SHORT);
58 html_source->AddLocalizedString(
59 "accessibilityDelayBeforeClickVeryShort",
60 IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_VERY_SHORT);
61 html_source->AddLocalizedString(
62 "accessibilityDelayBeforeClickShort",
63 IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_SHORT);
64 html_source->AddLocalizedString(
65 "accessibilityDelayBeforeClickLong",
66 IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_LONG);
67 html_source->AddLocalizedString(
68 "accessibilityDelayBeforeClickVeryLong",
69 IDS_SETTINGS_ACCESSIBILITY_DELAY_BEFORE_CLICK_VERY_LONG);
70 html_source->AddLocalizedString(
71 "accessibilityOnScreenKeyboardLabel",
72 IDS_SETTINGS_ACCESSIBILITY_ON_SCREEN_KEYBOARD_LABEL);
73 }
74
75 void AddDownloadsStrings(content::WebUIDataSource* html_source) {
76 html_source->AddLocalizedString(
77 "downloadsPageTitle", IDS_MD_SETTINGS_DOWNLOADS_PAGE_TITLE);
78 }
79
16 } // namespace 80 } // namespace
17 81
18 namespace settings { 82 namespace settings {
19 83
20 void AddLocalizedStrings(content::WebUIDataSource* html_source) { 84 void AddLocalizedStrings(content::WebUIDataSource* html_source) {
21 html_source->AddLocalizedString( 85 AddA11yStrings(html_source);
22 "a11yPageTitle", IDS_MD_SETTINGS_ACCESSIBILITY_PAGE_TITLE); 86 AddDownloadsStrings(html_source);
23 html_source->AddLocalizedString(
24 "downloadsPageTitle", IDS_MD_SETTINGS_DOWNLOADS_PAGE_TITLE);
25 87
26 html_source->SetJsonPath(kLocalizedStringsFile); 88 html_source->SetJsonPath(kLocalizedStringsFile);
27 } 89 }
28 90
29 } // namespace settings 91 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/a11y_page/a11y_page.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698