From 33ababd1bdb651d32952536e6d5e72750d1f4cc9 Mon Sep 17 00:00:00 2001 From: Hung-ying Tyan Date: Tue, 7 Jul 2009 10:35:45 +0800 Subject: [PATCH] String fixes for the credential storage and vpn settings. * Changes + Shorten the messages for both set-password and enter-password dialogs when other activities access the credential storage. Patch Set 2: + Fix the capital issue in the vpn error messages. + Add separate strings for terms used in the error messages. + Modify related src files that use those terms. --- res/values/strings.xml | 25 ++++++++++--------- .../settings/vpn/AuthenticationActor.java | 4 +-- src/com/android/settings/vpn/L2tpEditor.java | 2 +- .../android/settings/vpn/L2tpIpsecEditor.java | 4 +-- .../settings/vpn/L2tpIpsecPskEditor.java | 2 +- .../settings/vpn/VpnProfileEditor.java | 4 +-- 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 1022a2e0472..8af3c584e12 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1822,8 +1822,8 @@ found in the list of installed applications. Username: Password: - username - password + a username + a password Remember username @@ -1843,8 +1843,8 @@ found in the list of installed applications. Delete network - You must enter a %s. - You must select a %s. + You must enter %s. + You must select %s. The VPN name \'%s\' already exists. Find another name. Are you sure you want to delete this VPN? Are you sure you don\'t want to create this profile? @@ -1874,6 +1874,7 @@ found in the list of installed applications. VPN name + a VPN name '%s' is added @@ -1884,30 +1885,30 @@ found in the list of installed applications. Set user certificate User certificate + a user certificate Set CA certificate Certificate authority (CA) certificate + a CA certificate Set L2TP secret L2TP secret + an L2TP secret Set IPSec pre-shared key IPSec pre-shared key - - - Set IPSec pre-shared key - - IPSec pre-shared key + an IPSec pre-shared key Set VPN server VPN server + a VPN server VPN server name @@ -1947,7 +1948,7 @@ found in the list of installed applications. Enter password - This action requires enabling the credential storage. Please enter the password to enable it. + Enter the credential storage password. Set password @@ -1978,9 +1979,9 @@ found in the list of installed applications. Confirm new password: - You must set a password for the credential storage. + Set a password for the credential storage. - This action requires the credential storage but the storage has not been activated before. To activiate it, you must set a password for the credential storage. + Set a password for the credential storage. Please enter the correct password. Please enter the correct password. You have one more try to enter the correct password before the credential storage is erased. Please enter the correct password. You have %d more tries to enter the correct password before the credential storage is erased. diff --git a/src/com/android/settings/vpn/AuthenticationActor.java b/src/com/android/settings/vpn/AuthenticationActor.java index af9875c1149..286064f3cae 100644 --- a/src/com/android/settings/vpn/AuthenticationActor.java +++ b/src/com/android/settings/vpn/AuthenticationActor.java @@ -70,9 +70,9 @@ public class AuthenticationActor implements VpnProfileActor { TextView passwordView = (TextView) d.findViewById(R.id.password_value); Context c = mContext; if (TextUtils.isEmpty(usernameView.getText().toString())) { - return c.getString(R.string.vpn_username); + return c.getString(R.string.vpn_a_username); } else if (TextUtils.isEmpty(passwordView.getText().toString())) { - return c.getString(R.string.vpn_password); + return c.getString(R.string.vpn_a_password); } else { return null; } diff --git a/src/com/android/settings/vpn/L2tpEditor.java b/src/com/android/settings/vpn/L2tpEditor.java index c518dec46a6..643ba3b61f2 100644 --- a/src/com/android/settings/vpn/L2tpEditor.java +++ b/src/com/android/settings/vpn/L2tpEditor.java @@ -57,7 +57,7 @@ class L2tpEditor extends VpnProfileEditor { return ((result != null) ? result - : validate(mSecretString, R.string.vpn_l2tp_secret)); + : validate(mSecretString, R.string.vpn_a_l2tp_secret)); } private Preference createSecretPreference(Context c) { diff --git a/src/com/android/settings/vpn/L2tpIpsecEditor.java b/src/com/android/settings/vpn/L2tpIpsecEditor.java index b6b244f7ee5..b14feb32d2c 100644 --- a/src/com/android/settings/vpn/L2tpIpsecEditor.java +++ b/src/com/android/settings/vpn/L2tpIpsecEditor.java @@ -55,10 +55,10 @@ class L2tpIpsecEditor extends L2tpEditor { public String validate() { String result = super.validate(); if (result == null) { - result = validate(mUserCertificate, R.string.vpn_user_certificate); + result = validate(mUserCertificate, R.string.vpn_a_user_certificate); } if (result == null) { - result = validate(mCaCertificate, R.string.vpn_ca_certificate); + result = validate(mCaCertificate, R.string.vpn_a_ca_certificate); } return result; } diff --git a/src/com/android/settings/vpn/L2tpIpsecPskEditor.java b/src/com/android/settings/vpn/L2tpIpsecPskEditor.java index fb67c987ffc..11590daaa5b 100644 --- a/src/com/android/settings/vpn/L2tpIpsecPskEditor.java +++ b/src/com/android/settings/vpn/L2tpIpsecPskEditor.java @@ -47,7 +47,7 @@ class L2tpIpsecPskEditor extends L2tpEditor { return ((result != null) ? result - : validate(mPresharedKey, R.string.vpn_ipsec_presharedkey)); + : validate(mPresharedKey, R.string.vpn_a_ipsec_presharedkey)); } private Preference createPresharedKeyPreference(Context c) { diff --git a/src/com/android/settings/vpn/VpnProfileEditor.java b/src/com/android/settings/vpn/VpnProfileEditor.java index a708a8c89d5..a1cdc7633d4 100644 --- a/src/com/android/settings/vpn/VpnProfileEditor.java +++ b/src/com/android/settings/vpn/VpnProfileEditor.java @@ -85,10 +85,10 @@ class VpnProfileEditor { * null if all the inputs are valid */ public String validate() { - String result = validate(mName, R.string.vpn_name); + String result = validate(mName, R.string.vpn_a_name); return ((result != null) ? result - : validate(mServerName, R.string.vpn_vpn_server)); + : validate(mServerName, R.string.vpn_a_vpn_server)); } /**