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

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

Issue 1277223002: Add cr-network-select element for selecting a Chrome OS network (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_515987_network_configure
Patch Set: Created 5 years, 4 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 "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/common/url_constants.h" 8 #include "chrome/common/url_constants.h"
9 #include "chrome/grit/chromium_strings.h" 9 #include "chrome/grit/chromium_strings.h"
10 #include "chrome/grit/generated_resources.h" 10 #include "chrome/grit/generated_resources.h"
11 #include "chrome/grit/google_chrome_strings.h" 11 #include "chrome/grit/google_chrome_strings.h"
12 #include "chrome/grit/locale_settings.h" 12 #include "chrome/grit/locale_settings.h"
13 #include "content/public/browser/web_ui_data_source.h" 13 #include "content/public/browser/web_ui_data_source.h"
14 #include "ui/base/l10n/l10n_util.h" 14 #include "ui/base/l10n/l10n_util.h"
15 #include "ui/chromeos/strings/grit/ui_chromeos_strings.h"
15 16
16 namespace { 17 namespace {
17 18
18 // Note that md_settings.html contains a <script> tag which imports a script of 19 // Note that md_settings.html contains a <script> tag which imports a script of
19 // the following name. These names must be kept in sync. 20 // the following name. These names must be kept in sync.
20 const char kLocalizedStringsFile[] = "strings.js"; 21 const char kLocalizedStringsFile[] = "strings.js";
21 22
22 void AddA11yStrings(content::WebUIDataSource* html_source) { 23 void AddA11yStrings(content::WebUIDataSource* html_source) {
23 html_source->AddLocalizedString( 24 html_source->AddLocalizedString(
24 "a11yPageTitle", IDS_SETTINGS_ACCESSIBILITY); 25 "a11yPageTitle", IDS_SETTINGS_ACCESSIBILITY);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 html_source->AddLocalizedString( 144 html_source->AddLocalizedString(
144 "dateTimeSetAutomatically", IDS_SETTINGS_DATE_TIME_SET_AUTOMATICALLY); 145 "dateTimeSetAutomatically", IDS_SETTINGS_DATE_TIME_SET_AUTOMATICALLY);
145 } 146 }
146 147
147 #if defined(OS_CHROMEOS) 148 #if defined(OS_CHROMEOS)
148 void AddInternetStrings(content::WebUIDataSource* html_source) { 149 void AddInternetStrings(content::WebUIDataSource* html_source) {
149 html_source->AddLocalizedString( 150 html_source->AddLocalizedString(
150 "internetPageTitle", IDS_SETTINGS_INTERNET); 151 "internetPageTitle", IDS_SETTINGS_INTERNET);
151 html_source->AddLocalizedString( 152 html_source->AddLocalizedString(
152 "internetDetailPageTitle", IDS_SETTINGS_INTERNET_DETAIL); 153 "internetDetailPageTitle", IDS_SETTINGS_INTERNET_DETAIL);
154
155 // Required by cr_network_list_item.js. TODO(stevenjb): Add to
156 // settings_strings.grdp or provide an alternative translation method.
157 // crbug.com/512214.
158 html_source->AddLocalizedString("networkConnected",
159 IDS_ASH_STATUS_TRAY_NETWORK_CONNECTED);
160 html_source->AddLocalizedString("networkConnecting",
161 IDS_ASH_STATUS_TRAY_NETWORK_CONNECTING);
162 html_source->AddLocalizedString("networkNotConnected",
163 IDS_ASH_STATUS_TRAY_NETWORK_NOT_CONNECTED);
164 html_source->AddLocalizedString("OncTypeCellular", IDS_NETWORK_TYPE_CELLULAR);
165 html_source->AddLocalizedString("OncTypeEthernet", IDS_NETWORK_TYPE_ETHERNET);
166 html_source->AddLocalizedString("OncTypeWiFi", IDS_NETWORK_TYPE_WIFI);
167 html_source->AddLocalizedString("OncTypeWimax", IDS_NETWORK_TYPE_WIMAX);
168 html_source->AddLocalizedString("Disabled",
michaelpg 2015/08/10 07:35:03 ditto
stevenjb 2015/08/10 19:19:47 -> networkDisabled
169 IDS_OPTIONS_SETTINGS_NETWORK_DISABLED);
153 } 170 }
154 #endif 171 #endif
155 172
156 void AddPrivacyStrings(content::WebUIDataSource* html_source) { 173 void AddPrivacyStrings(content::WebUIDataSource* html_source) {
157 html_source->AddLocalizedString("privacyPageTitle", 174 html_source->AddLocalizedString("privacyPageTitle",
158 IDS_SETTINGS_PRIVACY); 175 IDS_SETTINGS_PRIVACY);
159 html_source->AddString("improveBrowsingExperience", 176 html_source->AddString("improveBrowsingExperience",
160 l10n_util::GetStringFUTF16( 177 l10n_util::GetStringFUTF16(
161 IDS_SETTINGS_IMPROVE_BROWSING_EXPERIENCE, 178 IDS_SETTINGS_IMPROVE_BROWSING_EXPERIENCE,
162 base::ASCIIToUTF16(chrome::kPrivacyLearnMoreURL))); 179 base::ASCIIToUTF16(chrome::kPrivacyLearnMoreURL)));
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 AddPrivacyStrings(html_source); 371 AddPrivacyStrings(html_source);
355 AddSearchStrings(html_source); 372 AddSearchStrings(html_source);
356 AddSearchEnginesStrings(html_source); 373 AddSearchEnginesStrings(html_source);
357 AddSiteSettingsStrings(html_source); 374 AddSiteSettingsStrings(html_source);
358 AddSyncStrings(html_source); 375 AddSyncStrings(html_source);
359 AddUsersStrings(html_source); 376 AddUsersStrings(html_source);
360 html_source->SetJsonPath(kLocalizedStringsFile); 377 html_source->SetJsonPath(kLocalizedStringsFile);
361 } 378 }
362 379
363 } // namespace settings 380 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698