| 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 14 matching lines...) Expand all Loading... |
| 25 #include "chrome/grit/locale_settings.h" | 25 #include "chrome/grit/locale_settings.h" |
| 26 #include "components/autofill/core/browser/payments/payments_service_url.h" | 26 #include "components/autofill/core/browser/payments/payments_service_url.h" |
| 27 #include "components/autofill/core/common/autofill_constants.h" | 27 #include "components/autofill/core/common/autofill_constants.h" |
| 28 #include "components/google/core/browser/google_util.h" | 28 #include "components/google/core/browser/google_util.h" |
| 29 #include "components/password_manager/core/browser/password_manager_constants.h" | 29 #include "components/password_manager/core/browser/password_manager_constants.h" |
| 30 #include "components/safe_browsing_db/safe_browsing_prefs.h" | 30 #include "components/safe_browsing_db/safe_browsing_prefs.h" |
| 31 #include "components/strings/grit/components_strings.h" | 31 #include "components/strings/grit/components_strings.h" |
| 32 #include "content/public/browser/web_ui_data_source.h" | 32 #include "content/public/browser/web_ui_data_source.h" |
| 33 #include "ui/base/l10n/l10n_util.h" | 33 #include "ui/base/l10n/l10n_util.h" |
| 34 | 34 |
| 35 | |
| 36 #if defined(OS_CHROMEOS) | 35 #if defined(OS_CHROMEOS) |
| 37 #include "ash/common/system/chromeos/devicetype_utils.h" | 36 #include "ash/common/system/chromeos/devicetype_utils.h" |
| 38 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 37 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 39 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" | 38 #include "chrome/browser/ui/webui/chromeos/ui_account_tweaks.h" |
| 40 #include "chromeos/chromeos_switches.h" | 39 #include "chromeos/chromeos_switches.h" |
| 41 #include "components/user_manager/user.h" | 40 #include "components/user_manager/user.h" |
| 42 #include "components/user_manager/user_manager.h" | 41 #include "components/user_manager/user_manager.h" |
| 43 #include "ui/chromeos/strings/grit/ui_chromeos_strings.h" | 42 #include "ui/chromeos/strings/grit/ui_chromeos_strings.h" |
| 44 #else | 43 #else |
| 45 #include "chrome/browser/ui/webui/settings/system_handler.h" | 44 #include "chrome/browser/ui/webui/settings/system_handler.h" |
| (...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 IDS_SETTINGS_STORAGE_SPACE_CRITICALLY_LOW_MESSAGE_LINE_2}, | 645 IDS_SETTINGS_STORAGE_SPACE_CRITICALLY_LOW_MESSAGE_LINE_2}, |
| 647 {"storageClearDriveCacheDialogTitle", | 646 {"storageClearDriveCacheDialogTitle", |
| 648 IDS_SETTINGS_STORAGE_CLEAR_DRIVE_CACHE_DIALOG_TITLE}, | 647 IDS_SETTINGS_STORAGE_CLEAR_DRIVE_CACHE_DIALOG_TITLE}, |
| 649 {"storageClearDriveCacheDialogDescription", | 648 {"storageClearDriveCacheDialogDescription", |
| 650 IDS_SETTINGS_STORAGE_CLEAR_DRIVE_CACHE_DESCRIPTION}, | 649 IDS_SETTINGS_STORAGE_CLEAR_DRIVE_CACHE_DESCRIPTION}, |
| 651 {"storageDeleteAllButtonTitle", | 650 {"storageDeleteAllButtonTitle", |
| 652 IDS_SETTINGS_STORAGE_DELETE_ALL_BUTTON_TITLE}}; | 651 IDS_SETTINGS_STORAGE_DELETE_ALL_BUTTON_TITLE}}; |
| 653 AddLocalizedStringsBulk(html_source, storage_strings, | 652 AddLocalizedStringsBulk(html_source, storage_strings, |
| 654 arraysize(storage_strings)); | 653 arraysize(storage_strings)); |
| 655 | 654 |
| 655 LocalizedString power_strings[] = { |
| 656 {"powerSourceLabel", IDS_SETTINGS_POWER_SOURCE_LABEL}, |
| 657 {"powerSourceBattery", IDS_SETTINGS_POWER_SOURCE_BATTERY}, |
| 658 {"powerSourceAcAdapter", IDS_SETTINGS_POWER_SOURCE_AC_ADAPTER}, |
| 659 {"powerSourceLowPowerCharger", |
| 660 IDS_SETTINGS_POWER_SOURCE_LOW_POWER_CHARGER}, |
| 661 {"calculatingPower", IDS_SETTINGS_POWER_SOURCE_CALCULATING}}; |
| 662 AddLocalizedStringsBulk(html_source, power_strings, arraysize(power_strings)); |
| 663 |
| 656 html_source->AddString("naturalScrollLearnMoreLink", | 664 html_source->AddString("naturalScrollLearnMoreLink", |
| 657 base::ASCIIToUTF16(chrome::kNaturalScrollHelpURL)); | 665 base::ASCIIToUTF16(chrome::kNaturalScrollHelpURL)); |
| 658 } | 666 } |
| 659 #endif | 667 #endif |
| 660 | 668 |
| 661 void AddDownloadsStrings(content::WebUIDataSource* html_source) { | 669 void AddDownloadsStrings(content::WebUIDataSource* html_source) { |
| 662 LocalizedString localized_strings[] = { | 670 LocalizedString localized_strings[] = { |
| 663 {"downloadsPageTitle", IDS_SETTINGS_DOWNLOADS}, | 671 {"downloadsPageTitle", IDS_SETTINGS_DOWNLOADS}, |
| 664 {"downloadLocation", IDS_SETTINGS_DOWNLOAD_LOCATION}, | 672 {"downloadLocation", IDS_SETTINGS_DOWNLOAD_LOCATION}, |
| 665 {"changeDownloadLocation", IDS_SETTINGS_CHANGE_DOWNLOAD_LOCATION}, | 673 {"changeDownloadLocation", IDS_SETTINGS_CHANGE_DOWNLOAD_LOCATION}, |
| (...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1863 #if defined(USE_NSS_CERTS) | 1871 #if defined(USE_NSS_CERTS) |
| 1864 AddCertificateManagerStrings(html_source); | 1872 AddCertificateManagerStrings(html_source); |
| 1865 #endif | 1873 #endif |
| 1866 | 1874 |
| 1867 policy_indicator::AddLocalizedStrings(html_source); | 1875 policy_indicator::AddLocalizedStrings(html_source); |
| 1868 | 1876 |
| 1869 html_source->SetJsonPath(kLocalizedStringsFile); | 1877 html_source->SetJsonPath(kLocalizedStringsFile); |
| 1870 } | 1878 } |
| 1871 | 1879 |
| 1872 } // namespace settings | 1880 } // namespace settings |
| OLD | NEW |