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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 #endif | 251 #endif |
252 } | 252 } |
253 | 253 |
254 #if defined(OS_CHROMEOS) | 254 #if defined(OS_CHROMEOS) |
255 void AddAccountUITweaksStrings(content::WebUIDataSource* html_source, | 255 void AddAccountUITweaksStrings(content::WebUIDataSource* html_source, |
256 Profile* profile) { | 256 Profile* profile) { |
257 base::DictionaryValue localized_values; | 257 base::DictionaryValue localized_values; |
258 chromeos::AddAccountUITweaksLocalizedValues(&localized_values, profile); | 258 chromeos::AddAccountUITweaksLocalizedValues(&localized_values, profile); |
259 html_source->AddLocalizedStrings(localized_values); | 259 html_source->AddLocalizedStrings(localized_values); |
260 } | 260 } |
| 261 |
| 262 void AddAndroidAppStrings(content::WebUIDataSource* html_source) { |
| 263 LocalizedString localized_strings[] = { |
| 264 {"androidAppsPageTitle", IDS_SETTINGS_ANDROID_APPS_TITLE}, |
| 265 {"androidAppsEnabled", IDS_SETTINGS_ANDROID_APPS_ENABLE}, |
| 266 {"androidAppsManageApps", IDS_SETTINGS_ANDROID_APPS_MANAGE_APPS}, |
| 267 {"androidAppsLearnMore", IDS_SETTINGS_ANDROID_APPS_LEARN_MORE}, |
| 268 {"androidAppsDisableDialogTitle", |
| 269 IDS_SETTINGS_ANDROID_APPS_DISABLE_DIALOG_TITLE}, |
| 270 {"androidAppsDisableDialogMessage", |
| 271 IDS_SETTINGS_ANDROID_APPS_DISABLE_DIALOG_MESSAGE}, |
| 272 }; |
| 273 AddLocalizedStringsBulk(html_source, localized_strings, |
| 274 arraysize(localized_strings)); |
| 275 html_source->AddString("androidAppsLearnMoreUrl", |
| 276 chrome::kAndroidAppsLearnMoreURL); |
| 277 } |
261 #endif | 278 #endif |
262 | 279 |
263 void AddAppearanceStrings(content::WebUIDataSource* html_source, | 280 void AddAppearanceStrings(content::WebUIDataSource* html_source, |
264 Profile* profile) { | 281 Profile* profile) { |
265 LocalizedString localized_strings[] = { | 282 LocalizedString localized_strings[] = { |
266 {"appearancePageTitle", IDS_SETTINGS_APPEARANCE}, | 283 {"appearancePageTitle", IDS_SETTINGS_APPEARANCE}, |
267 {"exampleDotCom", IDS_SETTINGS_EXAMPLE_DOT_COM}, | 284 {"exampleDotCom", IDS_SETTINGS_EXAMPLE_DOT_COM}, |
268 {"themes", IDS_SETTINGS_THEMES}, | 285 {"themes", IDS_SETTINGS_THEMES}, |
269 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 286 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
270 {"systemTheme", IDS_SETTINGS_SYSTEM_THEME}, | 287 {"systemTheme", IDS_SETTINGS_SYSTEM_THEME}, |
(...skipping 1536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1807 AddResetStrings(html_source); | 1824 AddResetStrings(html_source); |
1808 AddSearchEnginesStrings(html_source); | 1825 AddSearchEnginesStrings(html_source); |
1809 AddSearchInSettingsStrings(html_source); | 1826 AddSearchInSettingsStrings(html_source); |
1810 AddSearchStrings(html_source); | 1827 AddSearchStrings(html_source); |
1811 AddSiteSettingsStrings(html_source, profile); | 1828 AddSiteSettingsStrings(html_source, profile); |
1812 AddUsersStrings(html_source); | 1829 AddUsersStrings(html_source); |
1813 AddWebContentStrings(html_source); | 1830 AddWebContentStrings(html_source); |
1814 | 1831 |
1815 #if defined(OS_CHROMEOS) | 1832 #if defined(OS_CHROMEOS) |
1816 AddAccountUITweaksStrings(html_source, profile); | 1833 AddAccountUITweaksStrings(html_source, profile); |
| 1834 AddAndroidAppStrings(html_source); |
1817 AddBluetoothStrings(html_source); | 1835 AddBluetoothStrings(html_source); |
1818 AddCrNetworkStrings(html_source); | 1836 AddCrNetworkStrings(html_source); |
1819 AddDateTimeStrings(html_source); | 1837 AddDateTimeStrings(html_source); |
1820 AddDeviceStrings(html_source); | 1838 AddDeviceStrings(html_source); |
1821 AddEasyUnlockStrings(html_source); | 1839 AddEasyUnlockStrings(html_source); |
1822 AddInternetStrings(html_source); | 1840 AddInternetStrings(html_source); |
1823 AddMultiProfilesStrings(html_source, profile); | 1841 AddMultiProfilesStrings(html_source, profile); |
1824 #else | 1842 #else |
1825 AddDefaultBrowserStrings(html_source); | 1843 AddDefaultBrowserStrings(html_source); |
1826 AddImportDataStrings(html_source); | 1844 AddImportDataStrings(html_source); |
1827 AddSystemStrings(html_source); | 1845 AddSystemStrings(html_source); |
1828 #endif | 1846 #endif |
1829 | 1847 |
1830 #if defined(USE_NSS_CERTS) | 1848 #if defined(USE_NSS_CERTS) |
1831 AddCertificateManagerStrings(html_source); | 1849 AddCertificateManagerStrings(html_source); |
1832 #endif | 1850 #endif |
1833 | 1851 |
1834 policy_indicator::AddLocalizedStrings(html_source); | 1852 policy_indicator::AddLocalizedStrings(html_source); |
1835 | 1853 |
1836 html_source->SetJsonPath(kLocalizedStringsFile); | 1854 html_source->SetJsonPath(kLocalizedStringsFile); |
1837 } | 1855 } |
1838 | 1856 |
1839 } // namespace settings | 1857 } // namespace settings |
OLD | NEW |