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

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

Issue 2146553005: MD Settings: Bluetooth: Add error dialog and messages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@issue_602538_bluetooth_fixes_0
Patch Set: . Created 4 years, 5 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 <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/i18n/number_formatting.h" 10 #include "base/i18n/number_formatting.h"
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, 225 {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS},
226 #endif 226 #endif
227 }; 227 };
228 AddLocalizedStringsBulk(html_source, localized_strings, 228 AddLocalizedStringsBulk(html_source, localized_strings,
229 arraysize(localized_strings)); 229 arraysize(localized_strings));
230 } 230 }
231 231
232 #if defined(OS_CHROMEOS) 232 #if defined(OS_CHROMEOS)
233 void AddBluetoothStrings(content::WebUIDataSource* html_source) { 233 void AddBluetoothStrings(content::WebUIDataSource* html_source) {
234 LocalizedString localized_strings[] = { 234 LocalizedString localized_strings[] = {
235 {"bluetoothAccept", IDS_OPTIONS_SETTINGS_BLUETOOTH_ACCEPT_PASSKEY},
236 {"bluetoothAddDevice", IDS_OPTIONS_SETTINGS_ADD_BLUETOOTH_DEVICE},
237 {"bluetoothAddDevicePageTitle", IDS_SETTINGS_BLUETOOTH_ADD_DEVICE},
238 {"bluetoothConnect", IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECT},
239 {"bluetoothConnecting", IDS_SETTINGS_BLUETOOTH_CONNECTING},
240 {"bluetoothDisconnect", IDS_OPTIONS_SETTINGS_BLUETOOTH_DISCONNECT},
241 {"bluetoothDismiss", IDS_OPTIONS_SETTINGS_BLUETOOTH_DISMISS_ERROR},
242 {"bluetoothEnable", IDS_SETTINGS_BLUETOOTH_ENABLE},
243 {"bluetoothNoDevices", IDS_OPTIONS_SETTINGS_BLUETOOTH_NO_DEVICES},
235 {"bluetoothPageTitle", IDS_SETTINGS_BLUETOOTH}, 244 {"bluetoothPageTitle", IDS_SETTINGS_BLUETOOTH},
236 {"bluetoothAddDevicePageTitle", IDS_SETTINGS_BLUETOOTH_ADD_DEVICE},
237 {"bluetoothPairDevicePageTitle", IDS_SETTINGS_BLUETOOTH_PAIR_DEVICE}, 245 {"bluetoothPairDevicePageTitle", IDS_SETTINGS_BLUETOOTH_PAIR_DEVICE},
238 {"bluetoothEnable", IDS_SETTINGS_BLUETOOTH_ENABLE}, 246 {"bluetoothReject", IDS_OPTIONS_SETTINGS_BLUETOOTH_REJECT_PASSKEY},
239 {"bluetoothConnect", IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECT},
240 {"bluetoothAddDevice", IDS_OPTIONS_SETTINGS_ADD_BLUETOOTH_DEVICE},
241 {"bluetoothNoDevices", IDS_OPTIONS_SETTINGS_BLUETOOTH_NO_DEVICES},
242 {"bluetoothConnect", IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECT},
243 {"bluetoothDisconnect", IDS_OPTIONS_SETTINGS_BLUETOOTH_DISCONNECT},
244 {"bluetoothConnecting", IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECTING},
245 {"bluetoothRemove", IDS_SETTINGS_BLUETOOTH_REMOVE}, 247 {"bluetoothRemove", IDS_SETTINGS_BLUETOOTH_REMOVE},
246 {"bluetoothScanning", IDS_OPTIONS_SETTINGS_BLUETOOTH_SCANNING}, 248 {"bluetoothScanning", IDS_OPTIONS_SETTINGS_BLUETOOTH_SCANNING},
247 {"bluetoothAccept", IDS_OPTIONS_SETTINGS_BLUETOOTH_ACCEPT_PASSKEY},
248 {"bluetoothReject", IDS_OPTIONS_SETTINGS_BLUETOOTH_REJECT_PASSKEY},
249 {"bluetoothConnect", IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECT},
250 {"bluetoothDismiss", IDS_OPTIONS_SETTINGS_BLUETOOTH_DISMISS_ERROR},
251 // Device connecting and pairing. 249 // Device connecting and pairing.
252 {"bluetoothStartConnecting", IDS_SETTINGS_BLUETOOTH_START_CONNECTING}, 250 {"bluetoothStartConnecting", IDS_SETTINGS_BLUETOOTH_START_CONNECTING},
253 {"bluetoothEnterKey", IDS_OPTIONS_SETTINGS_BLUETOOTH_ENTER_KEY}, 251 {"bluetoothEnterKey", IDS_OPTIONS_SETTINGS_BLUETOOTH_ENTER_KEY},
254 // These ids are generated in JS using 'bluetooth_' + a value from 252 // These ids are generated in JS using 'bluetooth_' + a value from
255 // bluetoothPrivate.PairingEventType (see bluetooth_private.idl). 253 // bluetoothPrivate.PairingEventType (see bluetooth_private.idl).
256 // 'keysEntered', and 'requestAuthorization' have no associated message. 254 // 'keysEntered', and 'requestAuthorization' have no associated message.
257 {"bluetooth_requestPincode", IDS_SETTINGS_BLUETOOTH_REQUEST_PINCODE}, 255 {"bluetooth_requestPincode", IDS_SETTINGS_BLUETOOTH_REQUEST_PINCODE},
258 {"bluetooth_displayPincode", IDS_SETTINGS_BLUETOOTH_DISPLAY_PINCODE}, 256 {"bluetooth_displayPincode", IDS_SETTINGS_BLUETOOTH_DISPLAY_PINCODE},
259 {"bluetooth_requestPasskey", IDS_SETTINGS_BLUETOOTH_REQUEST_PASSKEY}, 257 {"bluetooth_requestPasskey", IDS_SETTINGS_BLUETOOTH_REQUEST_PASSKEY},
260 {"bluetooth_displayPasskey", IDS_SETTINGS_BLUETOOTH_DISPLAY_PASSKEY}, 258 {"bluetooth_displayPasskey", IDS_SETTINGS_BLUETOOTH_DISPLAY_PASSKEY},
261 {"bluetooth_confirmPasskey", IDS_SETTINGS_BLUETOOTH_CONFIRM_PASSKEY}, 259 {"bluetooth_confirmPasskey", IDS_SETTINGS_BLUETOOTH_CONFIRM_PASSKEY},
Dan Beam 2016/07/13 01:35:11 hmmmmm, why do identifiers do bluetooth_request in
stevenjb 2016/07/13 17:26:43 As the comment above explains, these are generated
260 // These ids are generated in JS using 'bluetooth_result_' + a value from
261 // bluetoothPrivate.ConnectResultType (see bluetooth_private.idl).
262 {"bluetooth_connect_attributeLengthInvalid",
263 IDS_SETTINGS_BLUETOOTH_CONNECT_ATTRIBUTE_LENGTH_INVALID},
264 {"bluetooth_connect_authCanceled",
265 IDS_SETTINGS_BLUETOOTH_CONNECT_AUTH_CANCELED},
266 {"bluetooth_connect_authFailed",
267 IDS_SETTINGS_BLUETOOTH_CONNECT_AUTH_FAILED},
268 {"bluetooth_connect_authRejected",
269 IDS_SETTINGS_BLUETOOTH_CONNECT_AUTH_REJECTED},
270 {"bluetooth_connect_authTimeout",
271 IDS_SETTINGS_BLUETOOTH_CONNECT_AUTH_TIMEOUT},
272 {"bluetooth_connect_connectionCongested",
273 IDS_SETTINGS_BLUETOOTH_CONNECT_CONNECTION_CONGESTED},
274 {"bluetooth_connect_failed", IDS_SETTINGS_BLUETOOTH_CONNECT_FAILED},
275 {"bluetooth_connect_inProgress",
276 IDS_SETTINGS_BLUETOOTH_CONNECT_IN_PROGRESS},
277 {"bluetooth_connect_insufficientEncryption",
278 IDS_SETTINGS_BLUETOOTH_CONNECT_INSUFFICIENT_ENCRYPTION},
279 {"bluetooth_connect_offsetInvalid",
280 IDS_SETTINGS_BLUETOOTH_CONNECT_OFFSET_INVALID},
281 {"bluetooth_connect_readNotPermitted",
282 IDS_SETTINGS_BLUETOOTH_CONNECT_READ_NOT_PERMITTED},
283 {"bluetooth_connect_requestNotSupported",
284 IDS_SETTINGS_BLUETOOTH_CONNECT_REQUEST_NOT_SUPPORTED},
285 {"bluetooth_connect_unsupportedDevice",
286 IDS_SETTINGS_BLUETOOTH_CONNECT_UNSUPPORTED_DEVICE},
287 {"bluetooth_connect_writeNotPermitted",
288 IDS_SETTINGS_BLUETOOTH_CONNECT_WRITE_NOT_PERMITTED},
262 }; 289 };
263 AddLocalizedStringsBulk(html_source, localized_strings, 290 AddLocalizedStringsBulk(html_source, localized_strings,
264 arraysize(localized_strings)); 291 arraysize(localized_strings));
265 } 292 }
266 #endif 293 #endif
267 294
268 #if defined(USE_NSS_CERTS) 295 #if defined(USE_NSS_CERTS)
269 void AddCertificateManagerStrings(content::WebUIDataSource* html_source) { 296 void AddCertificateManagerStrings(content::WebUIDataSource* html_source) {
270 LocalizedString localized_strings[] = { 297 LocalizedString localized_strings[] = {
271 {"certificateManagerPageTitle", IDS_SETTINGS_CERTIFICATE_MANAGER}, 298 {"certificateManagerPageTitle", IDS_SETTINGS_CERTIFICATE_MANAGER},
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 #endif 1305 #endif
1279 AddUsersStrings(html_source); 1306 AddUsersStrings(html_source);
1280 AddWebContentStrings(html_source); 1307 AddWebContentStrings(html_source);
1281 1308
1282 policy_indicator::AddLocalizedStrings(html_source); 1309 policy_indicator::AddLocalizedStrings(html_source);
1283 1310
1284 html_source->SetJsonPath(kLocalizedStringsFile); 1311 html_source->SetJsonPath(kLocalizedStringsFile);
1285 } 1312 }
1286 1313
1287 } // namespace settings 1314 } // namespace settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698