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 2010 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2021 {"advancedFontSettings", IDS_SETTINGS_ADVANCED_FONT_SETTINGS}, | 2021 {"advancedFontSettings", IDS_SETTINGS_ADVANCED_FONT_SETTINGS}, |
2022 {"openAdvancedFontSettings", IDS_SETTINGS_OPEN_ADVANCED_FONT_SETTINGS}, | 2022 {"openAdvancedFontSettings", IDS_SETTINGS_OPEN_ADVANCED_FONT_SETTINGS}, |
2023 {"requiresWebStoreExtension", IDS_SETTINGS_REQUIRES_WEB_STORE_EXTENSION}, | 2023 {"requiresWebStoreExtension", IDS_SETTINGS_REQUIRES_WEB_STORE_EXTENSION}, |
2024 {"quickBrownFox", IDS_SETTINGS_QUICK_BROWN_FOX}, | 2024 {"quickBrownFox", IDS_SETTINGS_QUICK_BROWN_FOX}, |
2025 }; | 2025 }; |
2026 AddLocalizedStringsBulk(html_source, localized_strings, | 2026 AddLocalizedStringsBulk(html_source, localized_strings, |
2027 arraysize(localized_strings)); | 2027 arraysize(localized_strings)); |
2028 } | 2028 } |
2029 | 2029 |
2030 #if defined(OS_CHROMEOS) | 2030 #if defined(OS_CHROMEOS) |
2031 void AddMultideviceStrings(content::WebUIDataSource* html_source) { | |
2032 LocalizedString localized_strings[] = { | |
Lei Zhang
2017/07/13 20:56:58
Can this be const? (And all the others in this fil
Oren Blasberg
2017/07/13 23:07:05
Adding const does not work..
../../chrome/browser
| |
2033 {"multidevicePageTitle", IDS_SETTINGS_MULTIDEVICE}, | |
2034 {"smsConnect", IDS_SETTINGS_MULTIDEVICE_SMS_CONNECT}, | |
2035 {"smsConnectSummary", IDS_SETTINGS_MULTIDEVICE_SMS_CONNECT_SUMMARY}, | |
2036 }; | |
2037 AddLocalizedStringsBulk(html_source, localized_strings, | |
2038 arraysize(localized_strings)); | |
2039 | |
2040 html_source->AddBoolean("enableMultideviceSettings", | |
2041 base::FeatureList::IsEnabled(features::kMultidevice)); | |
2042 } | |
2043 #endif | |
2044 | |
2045 #if defined(OS_CHROMEOS) | |
2031 void AddOncStrings(content::WebUIDataSource* html_source) { | 2046 void AddOncStrings(content::WebUIDataSource* html_source) { |
2032 LocalizedString onc_property_strings[] = { | 2047 LocalizedString onc_property_strings[] = { |
2033 // Thes strings are generated by prepending 'Onc' to the ONC property | 2048 // Thes strings are generated by prepending 'Onc' to the ONC property |
2034 // name. Any '.' in the property name is replaced with '-'. Properties | 2049 // name. Any '.' in the property name is replaced with '-'. Properties |
2035 // with translatable enumerated values have the value appended after '_'. | 2050 // with translatable enumerated values have the value appended after '_'. |
2036 {"OncCellular-APN-AccessPointName", | 2051 {"OncCellular-APN-AccessPointName", |
2037 IDS_ONC_CELLULAR_APN_ACCESS_POINT_NAME}, | 2052 IDS_ONC_CELLULAR_APN_ACCESS_POINT_NAME}, |
2038 {"OncCellular-APN-AccessPointName_none", | 2053 {"OncCellular-APN-AccessPointName_none", |
2039 IDS_ONC_CELLULAR_APN_ACCESS_POINT_NAME_NONE}, | 2054 IDS_ONC_CELLULAR_APN_ACCESS_POINT_NAME_NONE}, |
2040 {"OncCellular-APN-Password", IDS_ONC_CELLULAR_APN_PASSWORD}, | 2055 {"OncCellular-APN-Password", IDS_ONC_CELLULAR_APN_PASSWORD}, |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2160 | 2175 |
2161 #if defined(OS_CHROMEOS) | 2176 #if defined(OS_CHROMEOS) |
2162 AddAccountUITweaksStrings(html_source, profile); | 2177 AddAccountUITweaksStrings(html_source, profile); |
2163 AddAndroidAppStrings(html_source); | 2178 AddAndroidAppStrings(html_source); |
2164 AddBluetoothStrings(html_source); | 2179 AddBluetoothStrings(html_source); |
2165 AddChromeOSUserStrings(html_source, profile); | 2180 AddChromeOSUserStrings(html_source, profile); |
2166 AddDateTimeStrings(html_source); | 2181 AddDateTimeStrings(html_source); |
2167 AddDeviceStrings(html_source); | 2182 AddDeviceStrings(html_source); |
2168 AddEasyUnlockStrings(html_source); | 2183 AddEasyUnlockStrings(html_source); |
2169 AddInternetStrings(html_source); | 2184 AddInternetStrings(html_source); |
2185 AddMultideviceStrings(html_source); | |
2170 AddOncStrings(html_source); | 2186 AddOncStrings(html_source); |
2171 AddUsersStrings(html_source); | 2187 AddUsersStrings(html_source); |
2172 #else | 2188 #else |
2173 AddDefaultBrowserStrings(html_source); | 2189 AddDefaultBrowserStrings(html_source); |
2174 AddImportDataStrings(html_source); | 2190 AddImportDataStrings(html_source); |
2175 AddSystemStrings(html_source); | 2191 AddSystemStrings(html_source); |
2176 #endif | 2192 #endif |
2177 | 2193 |
2178 #if defined(USE_NSS_CERTS) | 2194 #if defined(USE_NSS_CERTS) |
2179 AddCertificateManagerStrings(html_source); | 2195 AddCertificateManagerStrings(html_source); |
2180 #endif | 2196 #endif |
2181 | 2197 |
2182 #if defined(OS_CHROMEOS) | 2198 #if defined(OS_CHROMEOS) |
2183 chromeos::network_element::AddLocalizedStrings(html_source); | 2199 chromeos::network_element::AddLocalizedStrings(html_source); |
2184 #endif | 2200 #endif |
2185 policy_indicator::AddLocalizedStrings(html_source); | 2201 policy_indicator::AddLocalizedStrings(html_source); |
2186 | 2202 |
2187 html_source->SetJsonPath(kLocalizedStringsFile); | 2203 html_source->SetJsonPath(kLocalizedStringsFile); |
2188 } | 2204 } |
2189 | 2205 |
2190 } // namespace settings | 2206 } // namespace settings |
OLD | NEW |