Chromium Code Reviews| 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 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 781 arraysize(localized_strings)); | 781 arraysize(localized_strings)); |
| 782 } | 782 } |
| 783 | 783 |
| 784 #if defined(OS_WIN) | 784 #if defined(OS_WIN) |
| 785 void AddChromeCleanupStrings(content::WebUIDataSource* html_source) { | 785 void AddChromeCleanupStrings(content::WebUIDataSource* html_source) { |
| 786 LocalizedString localized_strings[] = { | 786 LocalizedString localized_strings[] = { |
| 787 {"chromeCleanupExplanation", IDS_CHROME_CLEANUP_WEBUI_EXPLANATION}, | 787 {"chromeCleanupExplanation", IDS_CHROME_CLEANUP_WEBUI_EXPLANATION}, |
| 788 {"chromeCleanupDoneButtonLabel", | 788 {"chromeCleanupDoneButtonLabel", |
| 789 IDS_CHROME_CLEANUP_WEBUI_DONE_BUTTON_LABEL}, | 789 IDS_CHROME_CLEANUP_WEBUI_DONE_BUTTON_LABEL}, |
| 790 {"chromeCleanupLinkShowFiles", IDS_CHROME_CLEANUP_WEBUI_LINK_SHOW_FILES}, | 790 {"chromeCleanupLinkShowFiles", IDS_CHROME_CLEANUP_WEBUI_LINK_SHOW_FILES}, |
| 791 {"chromeCleanupLogsUploadPermission", IDS_CHROME_CLEANUP_LOGS_PERMISSION}, | |
| 791 {"chromeCleanupRemoveButtonLabel", | 792 {"chromeCleanupRemoveButtonLabel", |
| 792 IDS_CHROME_CLEANUP_WEBUI_REMOVE_BUTTON_LABEL}, | 793 IDS_CHROME_CLEANUP_WEBUI_REMOVE_BUTTON_LABEL}, |
| 793 {"chromeCleanupRestartButtonLabel", | 794 {"chromeCleanupRestartButtonLabel", |
| 794 IDS_CHROME_CLEANUP_WEBUI_RESTART_BUTTON_LABEL}, | 795 IDS_CHROME_CLEANUP_WEBUI_RESTART_BUTTON_LABEL}, |
| 795 {"chromeCleanupTitleErrorCantRemove", | 796 {"chromeCleanupTitleErrorCantRemove", |
| 796 IDS_CHROME_CLEANUP_WEBUI_TITLE_ERROR_CANT_REMOVE}, | 797 IDS_CHROME_CLEANUP_WEBUI_TITLE_ERROR_CANT_REMOVE}, |
| 797 {"chromeCleanupTitleRemove", IDS_CHROME_CLEANUP_WEBUI_TITLE_REMOVE}, | 798 {"chromeCleanupTitleRemove", IDS_CHROME_CLEANUP_WEBUI_TITLE_REMOVE}, |
| 798 {"chromeCleanupTitleRemoved", IDS_CHROME_CLEANUP_WEBUI_TITLE_REMOVED}, | 799 {"chromeCleanupTitleRemoved", IDS_CHROME_CLEANUP_WEBUI_TITLE_REMOVED}, |
| 799 {"chromeCleanupTitleRemoving", IDS_CHROME_CLEANUP_WEBUI_TITLE_REMOVING}, | 800 {"chromeCleanupTitleRemoving", IDS_CHROME_CLEANUP_WEBUI_TITLE_REMOVING}, |
| 800 {"chromeCleanupTitleRestart", IDS_CHROME_CLEANUP_WEBUI_TITLE_RESTART}, | 801 {"chromeCleanupTitleRestart", IDS_CHROME_CLEANUP_WEBUI_TITLE_RESTART}, |
| 801 }; | 802 }; |
| 802 AddLocalizedStringsBulk(html_source, localized_strings, | 803 AddLocalizedStringsBulk(html_source, localized_strings, |
| 803 arraysize(localized_strings)); | 804 arraysize(localized_strings)); |
| 805 std::string cleanup_learn_more_url = | |
|
ftirelo
2017/07/05 20:24:50
Nitty nit: this can be const.
proberge
2017/07/06 21:12:56
Done.
| |
| 806 google_util::AppendGoogleLocaleParam( | |
| 807 GURL(chrome::kChromeCleanerLearnMoreURL), | |
| 808 g_browser_process->GetApplicationLocale()) | |
| 809 .spec(); | |
| 810 html_source->AddString("chromeCleanupLearnMoreUrl", cleanup_learn_more_url); | |
| 804 } | 811 } |
| 805 #endif // defined(OS_WIN) | 812 #endif // defined(OS_WIN) |
| 806 | 813 |
| 807 void AddResetStrings(content::WebUIDataSource* html_source) { | 814 void AddResetStrings(content::WebUIDataSource* html_source) { |
| 808 LocalizedString localized_strings[] = { | 815 LocalizedString localized_strings[] = { |
| 809 {"resetPageTitle", IDS_SETTINGS_RESET}, | 816 {"resetPageTitle", IDS_SETTINGS_RESET}, |
| 810 {"resetPageDescription", IDS_SETTINGS_RESET_PROFILE_SETTINGS_DESCRIPTION}, | 817 {"resetPageDescription", IDS_SETTINGS_RESET_PROFILE_SETTINGS_DESCRIPTION}, |
| 811 {"resetPageExplanation", IDS_RESET_PROFILE_SETTINGS_EXPLANATION}, | 818 {"resetPageExplanation", IDS_RESET_PROFILE_SETTINGS_EXPLANATION}, |
| 812 {"triggeredResetPageExplanation", | 819 {"triggeredResetPageExplanation", |
| 813 IDS_TRIGGERED_RESET_PROFILE_SETTINGS_EXPLANATION}, | 820 IDS_TRIGGERED_RESET_PROFILE_SETTINGS_EXPLANATION}, |
| (...skipping 1367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2181 | 2188 |
| 2182 #if defined(OS_CHROMEOS) | 2189 #if defined(OS_CHROMEOS) |
| 2183 chromeos::network_element::AddLocalizedStrings(html_source); | 2190 chromeos::network_element::AddLocalizedStrings(html_source); |
| 2184 #endif | 2191 #endif |
| 2185 policy_indicator::AddLocalizedStrings(html_source); | 2192 policy_indicator::AddLocalizedStrings(html_source); |
| 2186 | 2193 |
| 2187 html_source->SetJsonPath(kLocalizedStringsFile); | 2194 html_source->SetJsonPath(kLocalizedStringsFile); |
| 2188 } | 2195 } |
| 2189 | 2196 |
| 2190 } // namespace settings | 2197 } // namespace settings |
| OLD | NEW |