1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/webui/options/chromeos/internet_options_handler_strings.h"
7 #include "base/macros.h"
8 #include "base/values.h"
9 #include "chrome/grit/generated_resources.h"
10 #include "ui/base/l10n/l10n_util.h"
11 #include "ui/chromeos/strings/grit/ui_chromeos_strings.h"
14 namespace internet_options_strings
{
18 struct StringResource
{
23 StringResource kStringResources
[] = {
24 // Main settings page.
25 {"ethernetName", IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET
},
26 {"ethernetTitle", IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET
},
27 {"wifiTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_WIFI_NETWORK
},
28 {"wimaxTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_WIMAX_NETWORK
},
29 {"cellularTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_CELLULAR_NETWORK
},
30 {"vpnTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_PRIVATE_NETWORK
},
32 IDS_OPTIONS_SETTINGS_SECTION_THIRD_PARTY_VPN_NAME_TEMPLATE
},
33 {"defaultThirdPartyProviderName",
34 IDS_OPTIONS_SETTINGS_SECTION_DEFAULT_THIRD_PARTY_PROVIDER_NAME
},
35 {"vpnBuiltInProvider", IDS_NETWORK_VPN_BUILT_IN_PROVIDER
},
36 {"joinOtherNetwork", IDS_OPTIONS_SETTINGS_NETWORK_OTHER
},
37 {"networkDisabled", IDS_OPTIONS_SETTINGS_NETWORK_DISABLED
},
38 {"turnOffWifi", IDS_OPTIONS_SETTINGS_NETWORK_DISABLE_WIFI
},
39 {"turnOffWimax", IDS_OPTIONS_SETTINGS_NETWORK_DISABLE_WIMAX
},
40 {"turnOffCellular", IDS_OPTIONS_SETTINGS_NETWORK_DISABLE_CELLULAR
},
41 {"disconnectNetwork", IDS_OPTIONS_SETTINGS_DISCONNECT
},
42 {"preferredNetworks", IDS_OPTIONS_SETTINGS_PREFERRED_NETWORKS_LABEL
},
43 {"preferredNetworksPage", IDS_OPTIONS_SETTINGS_PREFERRED_NETWORKS_TITLE
},
44 {"useSharedProxies", IDS_OPTIONS_SETTINGS_USE_SHARED_PROXIES
},
45 {"addConnectionTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_ADD_CONNECTION
},
46 {"addConnectionWifi", IDS_OPTIONS_SETTINGS_ADD_CONNECTION_WIFI
},
47 {"addConnectionVPNTemplate", IDS_OPTIONS_SETTINGS_ADD_VPN_TEMPLATE
},
48 {"otherCellularNetworks", IDS_OPTIONS_SETTINGS_OTHER_CELLULAR_NETWORKS
},
49 {"enableDataRoaming", IDS_OPTIONS_SETTINGS_ENABLE_DATA_ROAMING
},
50 {"disableDataRoaming", IDS_OPTIONS_SETTINGS_DISABLE_DATA_ROAMING
},
51 {"dataRoamingDisableToggleTooltip",
52 IDS_OPTIONS_SETTINGS_TOGGLE_DATA_ROAMING_RESTRICTION
},
54 // ONC network states. Format is 'Onc' + key + value.
55 // Note: '.' must be replaced with '-', e.g. VPN.Type -> OncVPN-Type
56 {"OncCellular-ActivationStateActivated",
57 IDS_CHROMEOS_NETWORK_ACTIVATION_STATE_ACTIVATED
},
58 {"OncCellular-ActivationStateActivating",
59 IDS_CHROMEOS_NETWORK_ACTIVATION_STATE_ACTIVATING
},
60 {"OncCellular-ActivationStateNotActivated",
61 IDS_CHROMEOS_NETWORK_ACTIVATION_STATE_NOT_ACTIVATED
},
62 {"OncCellular-ActivationStatePartiallyActivated",
63 IDS_CHROMEOS_NETWORK_ACTIVATION_STATE_PARTIALLY_ACTIVATED
},
64 {"OncConnectionStateConnected", IDS_CHROMEOS_NETWORK_STATE_CONNECTED
},
65 {"OncConnectionStateConnecting", IDS_CHROMEOS_NETWORK_STATE_CONNECTING
},
66 {"OncConnectionStateNotConnected",
67 IDS_CHROMEOS_NETWORK_STATE_NOT_CONNECTED
},
68 {"OncCellular-RoamingStateHome", IDS_CHROMEOS_NETWORK_ROAMING_STATE_HOME
},
69 {"OncCellular-RoamingStateRoaming",
70 IDS_CHROMEOS_NETWORK_ROAMING_STATE_ROAMING
},
71 {"OncTypeCellular", IDS_NETWORK_TYPE_CELLULAR
},
72 {"OncTypeEthernet", IDS_NETWORK_TYPE_ETHERNET
},
73 {"OncTypeWiFi", IDS_NETWORK_TYPE_WIFI
},
74 {"OncTypeWimax", IDS_NETWORK_TYPE_WIMAX
},
75 {"OncVPN-TypeL2TP-IPsecCert",
76 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_L2TP_IPSEC_USER_CERT
},
77 {"OncVPN-TypeL2TP-IPsecPSK",
78 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_L2TP_IPSEC_PSK
},
79 {"OncVPN-TypeOpenVPN", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_OPEN_VPN
},
80 {"OncVPN-TypeThirdPartyVPN",
81 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_THIRD_PARTY_VPN
},
83 // Internet details dialog.
84 {"restrictedNo", IDS_CONFIRM_MESSAGEBOX_NO_BUTTON_LABEL
},
85 {"restrictedYes", IDS_CONFIRM_MESSAGEBOX_YES_BUTTON_LABEL
},
86 {"managedNetwork", IDS_OPTIONS_SETTINGS_MANAGED_NETWORK
},
87 {"wifiNetworkTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_CONNECTION
},
88 {"vpnTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_VPN
},
89 {"cellularConnTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_CONNECTION
},
90 {"cellularDeviceTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_DEVICE
},
91 {"networkTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_NETWORK
},
92 {"securityTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_SECURITY
},
93 {"proxyTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_PROXY
},
94 {"connectionState", IDS_OPTIONS_SETTINGS_INTERNET_CONNECTION_STATE
},
95 // TODO(stevenjb): Rename the IDS constant when we redesign the UI.
96 {"restrictedConnectivity",
97 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_RESTRICTED_POOL
},
98 {"inetAddress", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_ADDRESS
},
99 {"inetNetmask", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SUBNETMASK
},
100 {"inetGateway", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_GATEWAY
},
101 {"inetNameServers", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_DNSSERVER
},
102 {"ipAutomaticConfiguration",
103 IDS_OPTIONS_SETTINGS_INTERNET_IP_AUTOMATIC_CONFIGURATION
},
104 {"automaticNameServers",
105 IDS_OPTIONS_SETTINGS_INTERNET_AUTOMATIC_NAME_SERVERS
},
106 {"userNameServer1", IDS_OPTIONS_SETTINGS_INTERNET_USER_NAME_SERVER_1
},
107 {"userNameServer2", IDS_OPTIONS_SETTINGS_INTERNET_USER_NAME_SERVER_2
},
108 {"userNameServer3", IDS_OPTIONS_SETTINGS_INTERNET_USER_NAME_SERVER_3
},
109 {"userNameServer4", IDS_OPTIONS_SETTINGS_INTERNET_USER_NAME_SERVER_4
},
110 {"googleNameServers", IDS_OPTIONS_SETTINGS_INTERNET_GOOGLE_NAME_SERVERS
},
111 {"userNameServers", IDS_OPTIONS_SETTINGS_INTERNET_USER_NAME_SERVERS
},
112 {"hardwareAddress", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_HARDWARE_ADDRESS
},
113 {"detailsInternetDismiss", IDS_CLOSE
},
114 {"activateButton", IDS_OPTIONS_SETTINGS_ACTIVATE
},
115 {"connectButton", IDS_OPTIONS_SETTINGS_CONNECT
},
116 {"configureButton", IDS_OPTIONS_SETTINGS_CONFIGURE
},
117 {"disconnectButton", IDS_OPTIONS_SETTINGS_DISCONNECT
},
118 {"viewAccountButton", IDS_STATUSBAR_NETWORK_VIEW_ACCOUNT
},
119 {"wimaxConnTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_WIMAX
},
122 {"inetSsid", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_ID
},
123 {"inetBssid", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_BSSID
},
125 IDS_OPTIONS_SETTIGNS_INTERNET_OPTIONS_NETWORK_ENCRYPTION
},
126 {"inetFrequency", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_FREQUENCY
},
127 {"inetFrequencyFormat",
128 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_FREQUENCY_MHZ
},
129 {"inetSignalStrength",
130 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_STRENGTH
},
131 {"inetSignalStrengthFormat",
132 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_STRENGTH_PERCENTAGE
},
133 {"inetPassProtected", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NET_PROTECTED
},
134 {"inetNetworkShared", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_SHARED
},
135 {"inetPreferredNetwork",
136 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PREFER_NETWORK
},
137 {"inetAutoConnectNetwork",
138 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_AUTO_CONNECT
},
141 {"inetServiceName", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_SERVICE_NAME
},
142 {"inetServerHostname",
143 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_SERVER_HOSTNAME
},
145 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_PROVIDER_TYPE
},
147 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_PROVIDER_NAME
},
148 {"inetUsername", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_USERNAME
},
151 {"serviceName", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_SERVICE_NAME
},
152 {"networkTechnology",
153 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_NETWORK_TECHNOLOGY
},
154 {"operatorName", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_OPERATOR
},
155 {"operatorCode", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_OPERATOR_CODE
},
157 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_ACTIVATION_STATE
},
158 {"roamingState", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_ROAMING_STATE
},
159 {"errorState", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_ERROR_STATE
},
160 {"cellularManufacturer",
161 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_MANUFACTURER
},
162 {"modelId", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_MODEL_ID
},
164 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_FIRMWARE_REVISION
},
166 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_HARDWARE_REVISION
},
167 {"prlVersion", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_PRL_VERSION
},
168 {"cellularApnLabel", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_APN
},
169 {"cellularApnOther", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_APN_OTHER
},
170 {"cellularApnUsername",
171 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_APN_USERNAME
},
172 {"cellularApnPassword",
173 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_APN_PASSWORD
},
174 {"cellularApnUseDefault", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_APN_CLEAR
},
175 {"cellularApnSet", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_APN_SET
},
176 {"cellularApnCancel", IDS_CANCEL
},
179 {"lockSimCard", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_LOCK_SIM_CARD
},
181 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_BUTTON
},
184 {"webProxyAutoDiscoveryUrl", IDS_PROXY_WEB_PROXY_AUTO_DISCOVERY
},
187 const size_t kStringResourcesLength
= arraysize(kStringResources
);
191 void RegisterLocalizedStrings(base::DictionaryValue
* localized_strings
) {
192 for (size_t i
= 0; i
< kStringResourcesLength
; ++i
) {
193 localized_strings
->SetString(
194 kStringResources
[i
].name
,
195 l10n_util::GetStringUTF16(kStringResources
[i
].id
));
199 } // namespace internet_options_strings
200 } // namespace chromeos