OSDN Git Service

Get all strings in for Wifi tethering
authorIrfan Sheriff <isheriff@google.com>
Fri, 5 Mar 2010 01:26:37 +0000 (17:26 -0800)
committerIrfan Sheriff <isheriff@google.com>
Fri, 5 Mar 2010 01:40:43 +0000 (17:40 -0800)
Bug: 2413908
Change-Id: I3d28fcfcb4a6e4eaf03e57d69f9d2c92730b12e5

res/values/strings.xml
res/xml/tether_prefs.xml
res/xml/wifi_ap_settings.xml
src/com/android/settings/wifi/WifiApDialog.java
src/com/android/settings/wifi/WifiApEnabler.java

index 04757a8..21135ca 100644 (file)
     <string name="wifi_gateway">Gateway</string>
     <!-- Label for the netmask of the network -->
     <string name="wifi_netmask">Netmask</string>
-    <!-- Alert message to indicate Wi-Fi AP will be disabled to enable station mode operation-->
-    <string name="wifi_ap_disable_message">Wi-fi Access Point for tethering is currently enabled. Turning Wi-fi on will disable Access Point operation.</string>
 
     <!-- Wifi AP settings-->
-    <!-- Title for Wifi AP tether settings-->
-    <string name="wifi_ap_title">Wi-Fi</string>
-    <!-- Label for checkbox. Toggles Access Point on/off -->
-    <string name="wifi_ap">Wi-Fi AP</string>
-    <!-- Summary for the AP toggle checkbox. -->
-    <string name="wifi_ap_summary">Set as Access Point</string>
-    <!-- Title of the Wi-fi settings screen and label for the settings preference-->
-    <string name="wifi_ap_settings">Wi-Fi AP settings</string>
-    <!-- Summary for the settings preference. -->
-    <string name="wifi_ap_settings_summary">Set up &amp; manage Access Point</string>
-    <!-- Used to open the ssid and security dialog for Wifi Access Point-->
-    <string name="wifi_ap_ssid_and_security">SSID and Security</string>
-    <!-- Action message to configure Access Point ssid and security-->
-    <string name="wifi_ap_configure_network">Configure AP</string>
-    <!-- Used to open the channel selection dialog -->
-    <string name="wifi_ap_channel">Channel </string>
-    <!-- The Toast message shown to user when tethering is enabled with Wifi on-->
-    <string name="wifi_ap_tether_message">Enabling Wi-fi Access Point for tethering. This will reset any existing Wi-fi connection and stop Wi-fi station mode operation.</string>
+    <!-- Label for wifi tether checkbox. Toggles Access Point on/off -->
+    <string name="wifi_tether_checkbox_text">Wi-Fi tethering</string>
+    <!-- Subtext for wifi tether checkbox on success -->
+    <string name="wifi_tether_enabled_subtext">Access point <xliff:g id="network_ssid">%1$s</xliff:g> active</string>
+    <!-- Subtext for wifi tether checkbox on failure -->
+    <string name="wifi_tether_failed_subtext">Wi-Fi tethering error</string>
+    <!-- Label for Wi-fi tether settings preference -->
+    <string name="wifi_tether_settings_text">Wi-Fi tethering settings</string>
+    <!-- Subtext for Wi-fi tether settings preference -->
+    <string name="wifi_tether_settings_subtext">Set up &amp; manage access point</string>
+    <!-- Title of the Wi-fi settings screen -->
+    <string name="wifi_tether_settings_title">Wi-Fi tethering settings</string>
+    <!-- Used to open the ssid and security dialog for Wifi Access Point -->
+    <string name="wifi_tether_configure_ap_text">Configure AP</string>
+    <!-- Subtext on configuration preference to indicate SSID and security chosen -->
+    <string name="wifi_tether_configure_subtext"><xliff:g id="network_ssid">%1$s</xliff:g> <xliff:g id="network_security">%2$s</xliff:g> access point</string>
+    <!-- Default access point SSID used for tethering -->
+    <string name="wifi_tether_configure_ssid_default">AndroidAP</string>
+
 
     <!-- Do not translate. Used for diagnostic screens, precise translation is not necessary
          Wi-Fi Testing on the diagnostic screen-->
index d15003c..aefe6d3 100644 (file)
 
     <PreferenceCategory
         android:key="wifi_category"
-        android:title="@string/wifi_ap_title">
+        android:title="@string/wifi">
 
         <CheckBoxPreference
             android:key="enable_wifi_ap"
-            android:title="@string/wifi_ap"
-            android:summary="@string/wifi_ap_summary"
+            android:title="@string/wifi_tether_checkbox_text"
             android:persistent="false" />
 
         <PreferenceScreen
             android:key="wifi_ap_settings"
             android:dependency="enable_wifi_ap"
-            android:title="@string/wifi_ap_settings"
-            android:summary="@string/wifi_ap_settings_summary" >
+            android:title="@string/wifi_tether_settings_text"
+            android:summary="@string/wifi_tether_settings_subtext" >
             <intent
                 android:action="android.intent.action.MAIN"
                 android:targetPackage="com.android.settings"
index 2a403d8..7c935da 100644 (file)
 -->
 
 <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
-        android:title="@string/wifi_settings_category">
+        android:title="@string/wifi_tether_settings_title">
 
     <CheckBoxPreference
         android:key="enable_wifi_ap"
-        android:title="@string/wifi_ap"
-        android:summary="@string/wifi_ap_summary"
+        android:title="@string/wifi_tether_checkbox_text"
         android:persistent="false" />
 
     <Preference
         android:key="wifi_ap_ssid_and_security"
         android:dependency="enable_wifi_ap"
-        android:title="@string/wifi_ap_ssid_and_security"
+        android:title="@string/wifi_tether_configure_ap_text"
         android:persistent="false" />
 
+    <!-- TODO: Channel setting will go away -->
     <ListPreference
         android:key="wifi_ap_channel"
         android:dependency="enable_wifi_ap"
-        android:title="@string/wifi_ap_channel"
+        android:title="Channel"
         android:persistent="false" />
 
 </PreferenceScreen>
index 79372d0..485e54e 100644 (file)
@@ -119,7 +119,7 @@ class WifiApDialog extends AlertDialog implements View.OnClickListener,
 
         Context context = getContext();
 
-        setTitle(R.string.wifi_ap_configure_network);
+        setTitle(R.string.wifi_tether_configure_ap_text);
         mView.findViewById(R.id.type).setVisibility(View.VISIBLE);
         mSsid = (TextView) mView.findViewById(R.id.ssid);
         mPassword = (EditText) mView.findViewById(R.id.password);
index 7e05173..922b3b2 100644 (file)
@@ -86,7 +86,10 @@ public class WifiApEnabler implements Preference.OnPreferenceChangeListener,
 
         if (enable && mWifiManager.isWifiEnabled()) {
             AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
-            builder.setMessage(R.string.wifi_ap_tether_message)
+            /**
+             * TODO: this alert will go away.
+             */
+            builder.setMessage("Turning off Wifi client. Enabling Wifi tethering")
                    .setCancelable(false)
                    .setPositiveButton(android.R.string.ok, this)
                    .setNegativeButton(android.R.string.cancel, this);