OLD | NEW |
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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, | 233 {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS}, |
234 #endif | 234 #endif |
235 }; | 235 }; |
236 AddLocalizedStringsBulk(html_source, localized_strings, | 236 AddLocalizedStringsBulk(html_source, localized_strings, |
237 arraysize(localized_strings)); | 237 arraysize(localized_strings)); |
238 } | 238 } |
239 | 239 |
240 #if defined(OS_CHROMEOS) | 240 #if defined(OS_CHROMEOS) |
241 void AddBluetoothStrings(content::WebUIDataSource* html_source) { | 241 void AddBluetoothStrings(content::WebUIDataSource* html_source) { |
242 LocalizedString localized_strings[] = { | 242 LocalizedString localized_strings[] = { |
| 243 {"bluetoothAccept", IDS_OPTIONS_SETTINGS_BLUETOOTH_ACCEPT_PASSKEY}, |
| 244 {"bluetoothAddDevice", IDS_OPTIONS_SETTINGS_ADD_BLUETOOTH_DEVICE}, |
| 245 {"bluetoothAddDevicePageTitle", IDS_SETTINGS_BLUETOOTH_ADD_DEVICE}, |
| 246 {"bluetoothConnect", IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECT}, |
| 247 {"bluetoothConnecting", IDS_SETTINGS_BLUETOOTH_CONNECTING}, |
| 248 {"bluetoothDisconnect", IDS_OPTIONS_SETTINGS_BLUETOOTH_DISCONNECT}, |
| 249 {"bluetoothDismiss", IDS_OPTIONS_SETTINGS_BLUETOOTH_DISMISS_ERROR}, |
| 250 {"bluetoothEnable", IDS_SETTINGS_BLUETOOTH_ENABLE}, |
| 251 {"bluetoothNoDevices", IDS_OPTIONS_SETTINGS_BLUETOOTH_NO_DEVICES}, |
243 {"bluetoothPageTitle", IDS_SETTINGS_BLUETOOTH}, | 252 {"bluetoothPageTitle", IDS_SETTINGS_BLUETOOTH}, |
244 {"bluetoothAddDevicePageTitle", IDS_SETTINGS_BLUETOOTH_ADD_DEVICE}, | |
245 {"bluetoothPairDevicePageTitle", IDS_SETTINGS_BLUETOOTH_PAIR_DEVICE}, | 253 {"bluetoothPairDevicePageTitle", IDS_SETTINGS_BLUETOOTH_PAIR_DEVICE}, |
246 {"bluetoothEnable", IDS_SETTINGS_BLUETOOTH_ENABLE}, | 254 {"bluetoothReject", IDS_OPTIONS_SETTINGS_BLUETOOTH_REJECT_PASSKEY}, |
247 {"bluetoothConnect", IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECT}, | |
248 {"bluetoothAddDevice", IDS_OPTIONS_SETTINGS_ADD_BLUETOOTH_DEVICE}, | |
249 {"bluetoothNoDevices", IDS_OPTIONS_SETTINGS_BLUETOOTH_NO_DEVICES}, | |
250 {"bluetoothConnect", IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECT}, | |
251 {"bluetoothDisconnect", IDS_OPTIONS_SETTINGS_BLUETOOTH_DISCONNECT}, | |
252 {"bluetoothConnecting", IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECTING}, | |
253 {"bluetoothRemove", IDS_SETTINGS_BLUETOOTH_REMOVE}, | 255 {"bluetoothRemove", IDS_SETTINGS_BLUETOOTH_REMOVE}, |
254 {"bluetoothScanning", IDS_OPTIONS_SETTINGS_BLUETOOTH_SCANNING}, | 256 {"bluetoothScanning", IDS_OPTIONS_SETTINGS_BLUETOOTH_SCANNING}, |
255 {"bluetoothAccept", IDS_OPTIONS_SETTINGS_BLUETOOTH_ACCEPT_PASSKEY}, | |
256 {"bluetoothReject", IDS_OPTIONS_SETTINGS_BLUETOOTH_REJECT_PASSKEY}, | |
257 {"bluetoothConnect", IDS_OPTIONS_SETTINGS_BLUETOOTH_CONNECT}, | |
258 {"bluetoothDismiss", IDS_OPTIONS_SETTINGS_BLUETOOTH_DISMISS_ERROR}, | |
259 // Device connecting and pairing. | 257 // Device connecting and pairing. |
260 {"bluetoothStartConnecting", IDS_SETTINGS_BLUETOOTH_START_CONNECTING}, | 258 {"bluetoothStartConnecting", IDS_SETTINGS_BLUETOOTH_START_CONNECTING}, |
261 {"bluetoothEnterKey", IDS_OPTIONS_SETTINGS_BLUETOOTH_ENTER_KEY}, | 259 {"bluetoothEnterKey", IDS_OPTIONS_SETTINGS_BLUETOOTH_ENTER_KEY}, |
262 // These ids are generated in JS using 'bluetooth_' + a value from | 260 // These ids are generated in JS using 'bluetooth_' + a value from |
263 // bluetoothPrivate.PairingEventType (see bluetooth_private.idl). | 261 // bluetoothPrivate.PairingEventType (see bluetooth_private.idl). |
264 // 'keysEntered', and 'requestAuthorization' have no associated message. | 262 // 'keysEntered', and 'requestAuthorization' have no associated message. |
265 {"bluetooth_requestPincode", IDS_SETTINGS_BLUETOOTH_REQUEST_PINCODE}, | 263 {"bluetooth_requestPincode", IDS_SETTINGS_BLUETOOTH_REQUEST_PINCODE}, |
266 {"bluetooth_displayPincode", IDS_SETTINGS_BLUETOOTH_DISPLAY_PINCODE}, | 264 {"bluetooth_displayPincode", IDS_SETTINGS_BLUETOOTH_DISPLAY_PINCODE}, |
267 {"bluetooth_requestPasskey", IDS_SETTINGS_BLUETOOTH_REQUEST_PASSKEY}, | 265 {"bluetooth_requestPasskey", IDS_SETTINGS_BLUETOOTH_REQUEST_PASSKEY}, |
268 {"bluetooth_displayPasskey", IDS_SETTINGS_BLUETOOTH_DISPLAY_PASSKEY}, | 266 {"bluetooth_displayPasskey", IDS_SETTINGS_BLUETOOTH_DISPLAY_PASSKEY}, |
269 {"bluetooth_confirmPasskey", IDS_SETTINGS_BLUETOOTH_CONFIRM_PASSKEY}, | 267 {"bluetooth_confirmPasskey", IDS_SETTINGS_BLUETOOTH_CONFIRM_PASSKEY}, |
| 268 // These ids are generated in JS using 'bluetooth_result_' + a value from |
| 269 // bluetoothPrivate.ConnectResultType (see bluetooth_private.idl). |
| 270 {"bluetooth_connect_attributeLengthInvalid", |
| 271 IDS_SETTINGS_BLUETOOTH_CONNECT_ATTRIBUTE_LENGTH_INVALID}, |
| 272 {"bluetooth_connect_authCanceled", |
| 273 IDS_SETTINGS_BLUETOOTH_CONNECT_AUTH_CANCELED}, |
| 274 {"bluetooth_connect_authFailed", |
| 275 IDS_SETTINGS_BLUETOOTH_CONNECT_AUTH_FAILED}, |
| 276 {"bluetooth_connect_authRejected", |
| 277 IDS_SETTINGS_BLUETOOTH_CONNECT_AUTH_REJECTED}, |
| 278 {"bluetooth_connect_authTimeout", |
| 279 IDS_SETTINGS_BLUETOOTH_CONNECT_AUTH_TIMEOUT}, |
| 280 {"bluetooth_connect_connectionCongested", |
| 281 IDS_SETTINGS_BLUETOOTH_CONNECT_CONNECTION_CONGESTED}, |
| 282 {"bluetooth_connect_failed", IDS_SETTINGS_BLUETOOTH_CONNECT_FAILED}, |
| 283 {"bluetooth_connect_inProgress", |
| 284 IDS_SETTINGS_BLUETOOTH_CONNECT_IN_PROGRESS}, |
| 285 {"bluetooth_connect_insufficientEncryption", |
| 286 IDS_SETTINGS_BLUETOOTH_CONNECT_INSUFFICIENT_ENCRYPTION}, |
| 287 {"bluetooth_connect_offsetInvalid", |
| 288 IDS_SETTINGS_BLUETOOTH_CONNECT_OFFSET_INVALID}, |
| 289 {"bluetooth_connect_readNotPermitted", |
| 290 IDS_SETTINGS_BLUETOOTH_CONNECT_READ_NOT_PERMITTED}, |
| 291 {"bluetooth_connect_requestNotSupported", |
| 292 IDS_SETTINGS_BLUETOOTH_CONNECT_REQUEST_NOT_SUPPORTED}, |
| 293 {"bluetooth_connect_unsupportedDevice", |
| 294 IDS_SETTINGS_BLUETOOTH_CONNECT_UNSUPPORTED_DEVICE}, |
| 295 {"bluetooth_connect_writeNotPermitted", |
| 296 IDS_SETTINGS_BLUETOOTH_CONNECT_WRITE_NOT_PERMITTED}, |
270 }; | 297 }; |
271 AddLocalizedStringsBulk(html_source, localized_strings, | 298 AddLocalizedStringsBulk(html_source, localized_strings, |
272 arraysize(localized_strings)); | 299 arraysize(localized_strings)); |
273 } | 300 } |
274 #endif | 301 #endif |
275 | 302 |
276 #if defined(USE_NSS_CERTS) | 303 #if defined(USE_NSS_CERTS) |
277 void AddCertificateManagerStrings(content::WebUIDataSource* html_source) { | 304 void AddCertificateManagerStrings(content::WebUIDataSource* html_source) { |
278 LocalizedString localized_strings[] = { | 305 LocalizedString localized_strings[] = { |
279 {"certificateManagerPageTitle", IDS_SETTINGS_CERTIFICATE_MANAGER}, | 306 {"certificateManagerPageTitle", IDS_SETTINGS_CERTIFICATE_MANAGER}, |
(...skipping 1028 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1308 #endif | 1335 #endif |
1309 AddUsersStrings(html_source); | 1336 AddUsersStrings(html_source); |
1310 AddWebContentStrings(html_source); | 1337 AddWebContentStrings(html_source); |
1311 | 1338 |
1312 policy_indicator::AddLocalizedStrings(html_source); | 1339 policy_indicator::AddLocalizedStrings(html_source); |
1313 | 1340 |
1314 html_source->SetJsonPath(kLocalizedStringsFile); | 1341 html_source->SetJsonPath(kLocalizedStringsFile); |
1315 } | 1342 } |
1316 | 1343 |
1317 } // namespace settings | 1344 } // namespace settings |
OLD | NEW |