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

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

Issue 1159623003: Add skeleton UI for sync page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: jhawkins comments. Created 5 years, 6 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
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/chromium_strings.h"
7 #include "chrome/grit/generated_resources.h" 8 #include "chrome/grit/generated_resources.h"
8 #include "content/public/browser/web_ui_data_source.h" 9 #include "content/public/browser/web_ui_data_source.h"
9 10
10 namespace { 11 namespace {
11 12
12 // Note that md_settings.html contains a <script> tag which imports a script of 13 // 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. 14 // the following name. These names must be kept in sync.
14 const char kLocalizedStringsFile[] = "strings.js"; 15 const char kLocalizedStringsFile[] = "strings.js";
15 16
16 void AddA11yStrings(content::WebUIDataSource* html_source) { 17 void AddA11yStrings(content::WebUIDataSource* html_source) {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 html_source->AddLocalizedString("searchEnginesDomainLabel", 152 html_source->AddLocalizedString("searchEnginesDomainLabel",
152 IDS_SETTINGS_SEARCH_ENGINES_DOMAIN_LABEL); 153 IDS_SETTINGS_SEARCH_ENGINES_DOMAIN_LABEL);
153 html_source->AddLocalizedString("searchEnginesKeywordLabel", 154 html_source->AddLocalizedString("searchEnginesKeywordLabel",
154 IDS_SETTINGS_SEARCH_ENGINES_KEYWORD_LABEL); 155 IDS_SETTINGS_SEARCH_ENGINES_KEYWORD_LABEL);
155 html_source->AddLocalizedString("searchEnginesQueryURLLabel", 156 html_source->AddLocalizedString("searchEnginesQueryURLLabel",
156 IDS_SETTINGS_SEARCH_ENGINES_QUERY_URL_LABEL); 157 IDS_SETTINGS_SEARCH_ENGINES_QUERY_URL_LABEL);
157 html_source->AddLocalizedString("searchEnginesAddButtonLabel", 158 html_source->AddLocalizedString("searchEnginesAddButtonLabel",
158 IDS_SETTINGS_SEARCH_ENGINES_ADD_BUTTON_LABEL); 159 IDS_SETTINGS_SEARCH_ENGINES_ADD_BUTTON_LABEL);
159 } 160 }
160 161
162 void AddSyncStrings(content::WebUIDataSource* html_source) {
163 html_source->AddLocalizedString("syncPageTitle",
164 IDS_SETTINGS_SYNC_PAGE_TITLE);
165 html_source->AddLocalizedString("syncEverythingMenuOption",
166 IDS_SETTINGS_SYNC_EVERYTHING_MENU_OPTION);
167 html_source->AddLocalizedString("chooseWhatToSyncMenuOption",
168 IDS_SETTINGS_CHOOSE_WHAT_TO_SYNC_MENU_OPTION);
169 html_source->AddLocalizedString("appCheckboxLabel",
170 IDS_SETTINGS_APPS_CHECKBOX_LABEL);
171 html_source->AddLocalizedString("extensionsCheckboxLabel",
172 IDS_SETTINGS_EXTENSIONS_CHECKBOX_LABEL);
173 html_source->AddLocalizedString("settingsCheckboxLabel",
174 IDS_SETTINGS_SETTINGS_CHECKBOX_LABEL);
175 html_source->AddLocalizedString("autofillCheckboxLabel",
176 IDS_SETTINGS_AUTOFILL_CHECKBOX_LABEL);
177 html_source->AddLocalizedString("historyCheckboxLabel",
178 IDS_SETTINGS_HISTORY_CHECKBOX_LABEL);
179 html_source->AddLocalizedString(
180 "themesAndWallpapersCheckboxLabel",
181 IDS_SETTINGS_THEMES_AND_WALLPAPERS_CHECKBOX_LABEL);
182 html_source->AddLocalizedString("bookmarksCheckboxLabel",
183 IDS_SETTINGS_BOOKMARKS_CHECKBOX_LABEL);
184 html_source->AddLocalizedString("passwordsCheckboxLabel",
185 IDS_SETTINGS_PASSWORDS_CHECKBOX_LABEL);
186 html_source->AddLocalizedString("openTabsCheckboxLabel",
187 IDS_SETTINGS_OPEN_TABS_CHECKBOX_LABEL);
188 html_source->AddLocalizedString("encryptionOptionsTitle",
189 IDS_SETTINGS_ENCRYPTION_OPTIONS_TITLE);
190 html_source->AddLocalizedString("syncDataEncryptedText",
191 IDS_SETTINGS_SYNC_DATA_ENCRYPTED_TEXT);
192 html_source->AddLocalizedString(
193 "encryptWithGoogleCredentialsLabel",
194 IDS_SETTINGS_ENCRYPT_WITH_GOOGLE_CREDENTIALS_LABEL);
195 html_source->AddLocalizedString(
196 "encryptWithSyncPassphraseLabel",
197 IDS_SETTINGS_ENCRYPT_WITH_SYNC_PASSPHRASE_LABEL);
198 html_source->AddLocalizedString(
199 "encryptWithSyncPassphraseLearnMoreLink",
200 IDS_SETTINGS_ENCRYPT_WITH_SYNC_PASSPHRASE_LEARN_MORE_LINK);
201 html_source->AddLocalizedString("useDefaultSettingsButton",
202 IDS_SETTINGS_USE_DEFAULT_SETTINGS_BUTTON);
203 html_source->AddLocalizedString("cancelButton",
204 IDS_SETTINGS_CANCEL_BUTTON);
205 html_source->AddLocalizedString("okButton",
James Hawkins 2015/06/04 22:17:12 Can you file a bug to pull out general strings lik
Kyle Horimoto 2015/06/04 22:47:45 crbug.com/496914
206 IDS_SETTINGS_OK_BUTTON);
207 }
208
161 } // namespace 209 } // namespace
162 210
163 namespace settings { 211 namespace settings {
164 212
165 void AddLocalizedStrings(content::WebUIDataSource* html_source) { 213 void AddLocalizedStrings(content::WebUIDataSource* html_source) {
166 AddA11yStrings(html_source); 214 AddA11yStrings(html_source);
167 AddAppearanceStrings(html_source); 215 AddAppearanceStrings(html_source);
168 AddDownloadsStrings(html_source); 216 AddDownloadsStrings(html_source);
169 AddDateTimeStrings(html_source); 217 AddDateTimeStrings(html_source);
170 #if defined(OS_CHROMEOS) 218 #if defined(OS_CHROMEOS)
171 AddInternetStrings(html_source); 219 AddInternetStrings(html_source);
172 #endif 220 #endif
173 AddSearchStrings(html_source); 221 AddSearchStrings(html_source);
174 AddSearchEnginesStrings(html_source); 222 AddSearchEnginesStrings(html_source);
223 AddSyncStrings(html_source);
175 html_source->SetJsonPath(kLocalizedStringsFile); 224 html_source->SetJsonPath(kLocalizedStringsFile);
176 } 225 }
177 226
178 } // namespace settings 227 } // namespace settings
OLDNEW
« no previous file with comments | « chrome/browser/resources/settings/sync_page/sync_page.js ('k') | ui/webui/resources/polymer_resources.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698