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"
13 namespace internet_options_strings
{
17 struct StringResource
{
22 StringResource kStringResources
[] = {
23 // Main settings page.
24 {"ethernetName", IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET
},
25 {"ethernetTitle", IDS_STATUSBAR_NETWORK_DEVICE_ETHERNET
},
26 {"wifiTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_WIFI_NETWORK
},
27 {"wimaxTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_WIMAX_NETWORK
},
28 {"cellularTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_CELLULAR_NETWORK
},
29 {"vpnTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_PRIVATE_NETWORK
},
31 IDS_OPTIONS_SETTINGS_SECTION_THIRD_PARTY_VPN_NAME_TEMPLATE
},
32 {"joinOtherNetwork", IDS_OPTIONS_SETTINGS_NETWORK_OTHER
},
33 {"networkDisabled", IDS_OPTIONS_SETTINGS_NETWORK_DISABLED
},
34 {"turnOffWifi", IDS_OPTIONS_SETTINGS_NETWORK_DISABLE_WIFI
},
35 {"turnOffWimax", IDS_OPTIONS_SETTINGS_NETWORK_DISABLE_WIMAX
},
36 {"turnOffCellular", IDS_OPTIONS_SETTINGS_NETWORK_DISABLE_CELLULAR
},
37 {"disconnectNetwork", IDS_OPTIONS_SETTINGS_DISCONNECT
},
38 {"preferredNetworks", IDS_OPTIONS_SETTINGS_PREFERRED_NETWORKS_LABEL
},
39 {"preferredNetworksPage", IDS_OPTIONS_SETTINGS_PREFERRED_NETWORKS_TITLE
},
40 {"useSharedProxies", IDS_OPTIONS_SETTINGS_USE_SHARED_PROXIES
},
41 {"addConnectionTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_ADD_CONNECTION
},
42 {"addConnectionWifi", IDS_OPTIONS_SETTINGS_ADD_CONNECTION_WIFI
},
43 {"addConnectionVPNTemplate", IDS_OPTIONS_SETTINGS_ADD_VPN_TEMPLATE
},
44 {"otherCellularNetworks", IDS_OPTIONS_SETTINGS_OTHER_CELLULAR_NETWORKS
},
45 {"enableDataRoaming", IDS_OPTIONS_SETTINGS_ENABLE_DATA_ROAMING
},
46 {"disableDataRoaming", IDS_OPTIONS_SETTINGS_DISABLE_DATA_ROAMING
},
47 {"dataRoamingDisableToggleTooltip",
48 IDS_OPTIONS_SETTINGS_TOGGLE_DATA_ROAMING_RESTRICTION
},
50 // ONC network states. Format is 'Onc' + key + value.
51 // Note: '.' must be replaced with '-', e.g. VPN.Type -> OncVPN-Type
52 {"OncCellular-ActivationStateActivated",
53 IDS_CHROMEOS_NETWORK_ACTIVATION_STATE_ACTIVATED
},
54 {"OncCellular-ActivationStateActivating",
55 IDS_CHROMEOS_NETWORK_ACTIVATION_STATE_ACTIVATING
},
56 {"OncCellular-ActivationStateNotActivated",
57 IDS_CHROMEOS_NETWORK_ACTIVATION_STATE_NOT_ACTIVATED
},
58 {"OncCellular-ActivationStatePartiallyActivated",
59 IDS_CHROMEOS_NETWORK_ACTIVATION_STATE_PARTIALLY_ACTIVATED
},
60 {"OncConnectionStateConnected", IDS_CHROMEOS_NETWORK_STATE_CONNECTED
},
61 {"OncConnectionStateConnecting", IDS_CHROMEOS_NETWORK_STATE_CONNECTING
},
62 {"OncConnectionStateNotConnected",
63 IDS_CHROMEOS_NETWORK_STATE_NOT_CONNECTED
},
64 {"OncCellular-RoamingStateHome", IDS_CHROMEOS_NETWORK_ROAMING_STATE_HOME
},
65 {"OncCellular-RoamingStateRoaming",
66 IDS_CHROMEOS_NETWORK_ROAMING_STATE_ROAMING
},
67 {"OncTypeCellular", IDS_NETWORK_TYPE_CELLULAR
},
68 {"OncTypeEthernet", IDS_NETWORK_TYPE_ETHERNET
},
69 {"OncTypeWiFi", IDS_NETWORK_TYPE_WIFI
},
70 {"OncTypeWimax", IDS_NETWORK_TYPE_WIMAX
},
71 {"OncVPN-TypeL2TP-IPsecCert",
72 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_L2TP_IPSEC_USER_CERT
},
73 {"OncVPN-TypeL2TP-IPsecPSK",
74 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_L2TP_IPSEC_PSK
},
75 {"OncVPN-TypeOpenVPN", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_OPEN_VPN
},
76 {"OncVPN-TypeThirdPartyVPN",
77 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_THIRD_PARTY_VPN
},
79 // Internet details dialog.
80 {"restrictedNo", IDS_CONFIRM_MESSAGEBOX_NO_BUTTON_LABEL
},
81 {"restrictedYes", IDS_CONFIRM_MESSAGEBOX_YES_BUTTON_LABEL
},
82 {"managedNetwork", IDS_OPTIONS_SETTINGS_MANAGED_NETWORK
},
83 {"wifiNetworkTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_CONNECTION
},
84 {"vpnTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_VPN
},
85 {"cellularConnTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_CONNECTION
},
86 {"cellularDeviceTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_DEVICE
},
87 {"networkTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_NETWORK
},
88 {"securityTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_SECURITY
},
89 {"proxyTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_PROXY
},
90 {"connectionState", IDS_OPTIONS_SETTINGS_INTERNET_CONNECTION_STATE
},
91 // TODO(stevenjb): Rename the IDS constant when we redesign the UI.
92 {"restrictedConnectivity",
93 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_RESTRICTED_POOL
},
94 {"inetAddress", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_ADDRESS
},
95 {"inetNetmask", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_SUBNETMASK
},
96 {"inetGateway", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_GATEWAY
},
97 {"inetNameServers", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_DNSSERVER
},
98 {"ipAutomaticConfiguration",
99 IDS_OPTIONS_SETTINGS_INTERNET_IP_AUTOMATIC_CONFIGURATION
},
100 {"automaticNameServers",
101 IDS_OPTIONS_SETTINGS_INTERNET_AUTOMATIC_NAME_SERVERS
},
102 {"userNameServer1", IDS_OPTIONS_SETTINGS_INTERNET_USER_NAME_SERVER_1
},
103 {"userNameServer2", IDS_OPTIONS_SETTINGS_INTERNET_USER_NAME_SERVER_2
},
104 {"userNameServer3", IDS_OPTIONS_SETTINGS_INTERNET_USER_NAME_SERVER_3
},
105 {"userNameServer4", IDS_OPTIONS_SETTINGS_INTERNET_USER_NAME_SERVER_4
},
106 {"googleNameServers", IDS_OPTIONS_SETTINGS_INTERNET_GOOGLE_NAME_SERVERS
},
107 {"userNameServers", IDS_OPTIONS_SETTINGS_INTERNET_USER_NAME_SERVERS
},
108 {"hardwareAddress", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_HARDWARE_ADDRESS
},
109 {"detailsInternetDismiss", IDS_CLOSE
},
110 {"activateButton", IDS_OPTIONS_SETTINGS_ACTIVATE
},
111 {"connectButton", IDS_OPTIONS_SETTINGS_CONNECT
},
112 {"configureButton", IDS_OPTIONS_SETTINGS_CONFIGURE
},
113 {"disconnectButton", IDS_OPTIONS_SETTINGS_DISCONNECT
},
114 {"viewAccountButton", IDS_STATUSBAR_NETWORK_VIEW_ACCOUNT
},
115 {"wimaxConnTabLabel", IDS_OPTIONS_SETTINGS_INTERNET_TAB_WIMAX
},
118 {"inetSsid", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_ID
},
119 {"inetBssid", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_BSSID
},
121 IDS_OPTIONS_SETTIGNS_INTERNET_OPTIONS_NETWORK_ENCRYPTION
},
122 {"inetFrequency", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_FREQUENCY
},
123 {"inetFrequencyFormat",
124 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_FREQUENCY_MHZ
},
125 {"inetSignalStrength",
126 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_STRENGTH
},
127 {"inetSignalStrengthFormat",
128 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_STRENGTH_PERCENTAGE
},
129 {"inetPassProtected", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NET_PROTECTED
},
130 {"inetNetworkShared", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_NETWORK_SHARED
},
131 {"inetPreferredNetwork",
132 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_PREFER_NETWORK
},
133 {"inetAutoConnectNetwork",
134 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_AUTO_CONNECT
},
137 {"inetServiceName", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_SERVICE_NAME
},
138 {"inetServerHostname",
139 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_SERVER_HOSTNAME
},
141 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_PROVIDER_TYPE
},
143 IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_PROVIDER_NAME
},
144 {"inetUsername", IDS_OPTIONS_SETTINGS_INTERNET_OPTIONS_VPN_USERNAME
},
147 {"serviceName", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_SERVICE_NAME
},
148 {"networkTechnology",
149 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_NETWORK_TECHNOLOGY
},
150 {"operatorName", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_OPERATOR
},
151 {"operatorCode", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_OPERATOR_CODE
},
153 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_ACTIVATION_STATE
},
154 {"roamingState", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_ROAMING_STATE
},
155 {"errorState", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_ERROR_STATE
},
156 {"cellularManufacturer",
157 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_MANUFACTURER
},
158 {"modelId", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_MODEL_ID
},
160 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_FIRMWARE_REVISION
},
162 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_HARDWARE_REVISION
},
163 {"prlVersion", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_PRL_VERSION
},
164 {"cellularApnLabel", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_APN
},
165 {"cellularApnOther", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_APN_OTHER
},
166 {"cellularApnUsername",
167 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_APN_USERNAME
},
168 {"cellularApnPassword",
169 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_APN_PASSWORD
},
170 {"cellularApnUseDefault", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_APN_CLEAR
},
171 {"cellularApnSet", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_APN_SET
},
172 {"cellularApnCancel", IDS_CANCEL
},
175 {"lockSimCard", IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_LOCK_SIM_CARD
},
177 IDS_OPTIONS_SETTINGS_INTERNET_CELLULAR_CHANGE_PIN_BUTTON
},
180 {"webProxyAutoDiscoveryUrl", IDS_PROXY_WEB_PROXY_AUTO_DISCOVERY
},
183 const size_t kStringResourcesLength
= arraysize(kStringResources
);
187 void RegisterLocalizedStrings(base::DictionaryValue
* localized_strings
) {
188 for (size_t i
= 0; i
< kStringResourcesLength
; ++i
) {
189 localized_strings
->SetString(
190 kStringResources
[i
].name
,
191 l10n_util::GetStringUTF16(kStringResources
[i
].id
));
195 } // namespace internet_options_strings
196 } // namespace chromeos