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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
457 AddLocalizedStringsBulk(html_source, localized_strings, | 457 AddLocalizedStringsBulk(html_source, localized_strings, |
458 arraysize(localized_strings)); | 458 arraysize(localized_strings)); |
459 } | 459 } |
460 | 460 |
461 #if !defined(OS_CHROMEOS) | 461 #if !defined(OS_CHROMEOS) |
462 void AddDefaultBrowserStrings(content::WebUIDataSource* html_source) { | 462 void AddDefaultBrowserStrings(content::WebUIDataSource* html_source) { |
463 LocalizedString localized_strings[] = { | 463 LocalizedString localized_strings[] = { |
464 {"defaultBrowser", IDS_SETTINGS_DEFAULT_BROWSER}, | 464 {"defaultBrowser", IDS_SETTINGS_DEFAULT_BROWSER}, |
465 {"defaultBrowserDefault", IDS_SETTINGS_DEFAULT_BROWSER_DEFAULT}, | 465 {"defaultBrowserDefault", IDS_SETTINGS_DEFAULT_BROWSER_DEFAULT}, |
466 {"defaultBrowserMakeDefault", IDS_SETTINGS_DEFAULT_BROWSER_MAKE_DEFAULT}, | 466 {"defaultBrowserMakeDefault", IDS_SETTINGS_DEFAULT_BROWSER_MAKE_DEFAULT}, |
467 {"defaultBrowserUnknown", IDS_SETTINGS_DEFAULT_BROWSER_UNKNOWN}, | 467 {"defaultBrowserError", IDS_SETTINGS_DEFAULT_BROWSER_ERROR}, |
468 {"defaultBrowserSecondary", IDS_SETTINGS_DEFAULT_BROWSER_SECONDARY}, | 468 {"defaultBrowserSecondary", IDS_SETTINGS_DEFAULT_BROWSER_SECONDARY}, |
469 {"unableToSetDefaultBrowser", IDS_SETTINGS_DEFAULT_BROWSER_ERROR}, | |
470 }; | 469 }; |
471 AddLocalizedStringsBulk(html_source, localized_strings, | 470 AddLocalizedStringsBulk(html_source, localized_strings, |
472 arraysize(localized_strings)); | 471 arraysize(localized_strings)); |
473 } | 472 } |
474 #endif | 473 #endif |
475 | 474 |
476 #if defined(OS_CHROMEOS) | 475 #if defined(OS_CHROMEOS) |
477 void AddDeviceStrings(content::WebUIDataSource* html_source) { | 476 void AddDeviceStrings(content::WebUIDataSource* html_source) { |
478 LocalizedString device_strings[] = { | 477 LocalizedString device_strings[] = { |
479 {"devicePageTitle", IDS_SETTINGS_DEVICE_TITLE}, | 478 {"devicePageTitle", IDS_SETTINGS_DEVICE_TITLE}, |
(...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1123 html_source->AddString("improveBrowsingExperience", | 1122 html_source->AddString("improveBrowsingExperience", |
1124 l10n_util::GetStringFUTF16( | 1123 l10n_util::GetStringFUTF16( |
1125 IDS_SETTINGS_IMPROVE_BROWSING_EXPERIENCE, | 1124 IDS_SETTINGS_IMPROVE_BROWSING_EXPERIENCE, |
1126 base::ASCIIToUTF16(chrome::kPrivacyLearnMoreURL))); | 1125 base::ASCIIToUTF16(chrome::kPrivacyLearnMoreURL))); |
1127 } | 1126 } |
1128 | 1127 |
1129 void AddSearchInSettingsStrings(content::WebUIDataSource* html_source) { | 1128 void AddSearchInSettingsStrings(content::WebUIDataSource* html_source) { |
1130 LocalizedString localized_strings[] = { | 1129 LocalizedString localized_strings[] = { |
1131 {"searchPrompt", IDS_SETTINGS_SEARCH_PROMPT}, | 1130 {"searchPrompt", IDS_SETTINGS_SEARCH_PROMPT}, |
1132 {"searchNoResults", IDS_SETTINGS_SEARCH_NO_RESULTS}, | 1131 {"searchNoResults", IDS_SETTINGS_SEARCH_NO_RESULTS}, |
1133 // TODO(dpapad); IDS_DOWNLOAD_CLEAR_SEARCH and IDS_MD_HISTORY_CLEAR_SEARCH | 1132 // TODO(dpapad): IDS_DOWNLOAD_CLEAR_SEARCH and IDS_MD_HISTORY_CLEAR_SEARCH |
1134 // are identical, merge them to one and re-use here. | 1133 // are identical, merge them to one and re-use here. |
1135 {"clearSearch", IDS_DOWNLOAD_CLEAR_SEARCH}, | 1134 {"clearSearch", IDS_DOWNLOAD_CLEAR_SEARCH}, |
1136 }; | 1135 }; |
1137 AddLocalizedStringsBulk(html_source, localized_strings, | 1136 AddLocalizedStringsBulk(html_source, localized_strings, |
1138 arraysize(localized_strings)); | 1137 arraysize(localized_strings)); |
1139 | 1138 |
1140 base::string16 help_text = l10n_util::GetStringFUTF16( | 1139 base::string16 help_text = l10n_util::GetStringFUTF16( |
1141 IDS_SETTINGS_SEARCH_NO_RESULTS_HELP, | 1140 IDS_SETTINGS_SEARCH_NO_RESULTS_HELP, |
1142 base::ASCIIToUTF16(chrome::kSettingsSearchHelpURL)); | 1141 base::ASCIIToUTF16(chrome::kSettingsSearchHelpURL)); |
1143 html_source->AddString("searchNoResultsHelp", help_text); | 1142 html_source->AddString("searchNoResultsHelp", help_text); |
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1580 #endif | 1579 #endif |
1581 AddUsersStrings(html_source); | 1580 AddUsersStrings(html_source); |
1582 AddWebContentStrings(html_source); | 1581 AddWebContentStrings(html_source); |
1583 | 1582 |
1584 policy_indicator::AddLocalizedStrings(html_source); | 1583 policy_indicator::AddLocalizedStrings(html_source); |
1585 | 1584 |
1586 html_source->SetJsonPath(kLocalizedStringsFile); | 1585 html_source->SetJsonPath(kLocalizedStringsFile); |
1587 } | 1586 } |
1588 | 1587 |
1589 } // namespace settings | 1588 } // namespace settings |
OLD | NEW |