OSDN Git Service

Update some strings to match spec
authorFan Zhang <zhfan@google.com>
Wed, 15 Mar 2017 23:13:46 +0000 (16:13 -0700)
committerFan Zhang <zhfan@google.com>
Thu, 16 Mar 2017 16:59:42 +0000 (09:59 -0700)
Change-Id: Iba242871fce9c9bca8fbbc5d3ad3f7948f35d3d0
Fix: 36234108
Test: make RunSettingsRoboTests

res/values/strings.xml
src/com/android/settings/connecteddevice/UsbModePreferenceController.java
src/com/android/settings/network/VpnPreferenceController.java
tests/robotests/src/com/android/settings/connecteddevice/UsbModePreferenceControllerTest.java

index 79042c4..1684c73 100644 (file)
     <!-- Tethering controls, item title to go into the tethering settings when USB and Bluetooth tethering are available [CHAR LIMIT=25]-->
     <string name="tether_settings_title_usb_bluetooth">Tethering</string>
     <!-- Tethering controls, item title to go into the tethering settings when USB, Bluetooth and Wifi tethering are available [CHAR LIMIT=50]-->
-    <string name="tether_settings_title_all">Hotspot &amp; Tethering</string>
+    <string name="tether_settings_title_all">Hotspot &amp; tethering</string>
     <!-- Tethering setting summary when both Wi-Fi hotspot and tether are turned on [CHAR LIMIT=NONE]-->
     <string name="tether_settings_summary_hotspot_on_tether_on">Hotspot on, tethering</string>
     <!-- Tethering setting summary when Wi-Fi hotspot is on and tether is off [CHAR LIMIT=NONE]-->
     <string name="tethering_help_button_text">Help</string>
 
     <!-- Wireless controls, item title to go into the network settings -->
-    <string name="network_settings_title">Mobile networks</string>
+    <string name="network_settings_title">Mobile network</string>
 
     <!-- Mobile plan [CHAR LIMIT=35]-->
     <string name="manage_mobile_plan_title" translatable="true">Mobile plan</string>
     <string name="vpn_no_network">There is no network connection. Please try again later.</string>
     <!-- Toast message when VPN has disconnected automatically due to Clear credentials. [CHAR LIMIT=NONE] -->
     <string name="vpn_disconnected">Disconnected from VPN</string>
+    <!-- Seting subtext indicating the device is not currently connected to any VPN [CHAR LIMIT=40]-->
+    <string name="vpn_disconnected_summary">None</string>
     <!-- Toast message when a certificate is missing. [CHAR LIMIT=100] -->
     <string name="vpn_missing_cert">A certificate is missing. Please edit the profile.</string>
 
     <!-- Title of one of the choices in a dialog (with title defined in usb_use) that lets the user
          select what the USB connection for this device should be used for. This choice
          is for transferring files via MTP. -->
-    <string name="usb_use_file_transfers">Transfer files</string>
+    <string name="usb_use_file_transfers">Transferring files</string>
     <!-- Description of one of the choices in a dialog (with title defined in usb_use) that lets the user
          select what the USB connection for this device should be used for. This choice
          is for transferring files via MTP. -->
     <!-- Title of one of the choices in a dialog (with title defined in usb_use) that lets the user
          select what the USB connection for this device should be used for. This choice
          is for transferring photos via PTP. -->
-    <string name="usb_use_photo_transfers">Transfer photos (PTP)</string>
+    <string name="usb_use_photo_transfers">Transferring photos (PTP)</string>
     <!-- Description of one of the choices in a dialog (with title defined in usb_use) that lets the user
          select what the USB connection for this device should be used for. This choice
          is for transferring photos via PTP. -->
     <!-- Title of one of the choices in a dialog (with title defined in usb_use) that lets the user
          select what the USB connection for this device should be used for. This choice
          is for entering MIDI mode. -->
-    <string name="usb_use_MIDI">Use device as MIDI</string>
+    <string name="usb_use_MIDI">Using device as MIDI</string>
     <!-- Description of one of the choices in a dialog (with title defined in usb_use) that lets the user
          select what the USB connection for this device should be used for. This choice
          is for entering MIDI mode. -->
 
     <!-- Settings item title for USB preference [CHAR LIMIT=35] -->
     <string name="usb_pref">USB</string>
-    <!-- Summary for the USB preference when nothing is connected through the usb port.  [CHAR LIMIT=40] -->
-    <string name="usb_nothing_connected">Nothing connected</string>
 
     <!-- Settings item title for background check prefs [CHAR LIMIT=35] -->
     <string name="background_check_pref">Background check</string>
     <string name="screen_zoom_conversation_timestamp_4">Tue 6:03PM</string>
 
     <!-- Wi-Fi state - Disconnected [CHAR LIMIT=NONE] -->
-    <string name="disconnected">Disconnected</string>
+    <string name="disconnected">Not connected</string>
 
     <!-- Summary of data usage [CHAR LIMIT=NONE] -->
     <string name="data_usage_summary_format"><xliff:g id="amount" example="50%">%1$s</xliff:g> of data used</string>
     <!-- Title of screen controlling which apps have access to send premium SMS messages [CHAR LIMIT=60] -->
     <string name="premium_sms_access">Premium SMS access</string>
 
-    <!-- [CHAR LIMIT=25] Bluetooth is disabled. -->
-    <string name="bluetooth_disabled">Disabled</string>
+    <!-- Bluetooth is disabled. -->
+    <string name="bluetooth_disabled">Not visible to other devices</string>
 
     <!-- [CHAR LIMIT=60] Name of dev option called "System UI demo mode" -->
     <string name="demo_mode">System UI demo mode</string>
index 5f700bd..6c1a28b 100644 (file)
@@ -119,7 +119,7 @@ public class UsbModePreferenceController extends PreferenceController
                 preference.setEnabled(true);
                 preference.setSummary(getTitle(mode));
             } else {
-                preference.setSummary(R.string.usb_nothing_connected);
+                preference.setSummary(R.string.disconnected);
                 preference.setEnabled(false);
             }
         }
index 86ff175..72b361a 100644 (file)
@@ -150,13 +150,13 @@ public class VpnPreferenceController extends PreferenceController implements Lif
             uid = userInfo.id;
         }
         VpnConfig vpn = vpns.get(uid);
-        final String vpnName;
+        final String summary;
         if (vpn == null) {
-            vpnName = null;
+            summary = mContext.getString(R.string.vpn_disconnected_summary);
         } else {
-            vpnName = getNameForVpnConfig(vpn, UserHandle.of(uid));
+            summary = getNameForVpnConfig(vpn, UserHandle.of(uid));
         }
-        new Handler(Looper.getMainLooper()).post(() -> mPreference.setSummary(vpnName));
+        new Handler(Looper.getMainLooper()).post(() -> mPreference.setSummary(summary));
     }
 
     private String getNameForVpnConfig(VpnConfig cfg, UserHandle user) {
index da25f0f..8b6e900 100644 (file)
@@ -113,7 +113,7 @@ public class UsbModePreferenceControllerTest {
         preference.setEnabled(true);
         mController.updateState(preference);
         assertThat(preference.getSummary()).isEqualTo(
-                mContext.getString(R.string.usb_nothing_connected));
+                mContext.getString(R.string.disconnected));
     }
 
     @Test