Merge change 6328 into donut

* changes:
  String fixes for the credential storage and vpn settings.
This commit is contained in:
Android (Google) Code Review
2009-07-06 20:44:44 -07:00
6 changed files with 21 additions and 20 deletions

View File

@@ -1822,8 +1822,8 @@ found in the list of installed applications.</string>
<!-- In VPN connect dialog, for inputing username and password --> <!-- In VPN connect dialog, for inputing username and password -->
<string name="vpn_username_colon">Username:</string> <string name="vpn_username_colon">Username:</string>
<string name="vpn_password_colon">Password:</string> <string name="vpn_password_colon">Password:</string>
<string name="vpn_username">username</string> <string name="vpn_a_username">a username</string>
<string name="vpn_password">password</string> <string name="vpn_a_password">a password</string>
<!-- In VPN connect dialog where user may check to remember the username entered --> <!-- In VPN connect dialog where user may check to remember the username entered -->
<string name="vpn_save_username">Remember username</string> <string name="vpn_save_username">Remember username</string>
@@ -1843,8 +1843,8 @@ found in the list of installed applications.</string>
<string name="vpn_menu_delete">Delete network</string> <string name="vpn_menu_delete">Delete network</string>
<!-- VPN error dialog messages --> <!-- VPN error dialog messages -->
<string name="vpn_error_miss_entering">You must enter a %s.</string> <string name="vpn_error_miss_entering">You must enter %s.</string>
<string name="vpn_error_miss_selecting">You must select a %s.</string> <string name="vpn_error_miss_selecting">You must select %s.</string>
<string name="vpn_error_duplicate_name">The VPN name \'%s\' already exists. Find another name.</string> <string name="vpn_error_duplicate_name">The VPN name \'%s\' already exists. Find another name.</string>
<string name="vpn_confirm_profile_deletion">Are you sure you want to delete this VPN?</string> <string name="vpn_confirm_profile_deletion">Are you sure you want to delete this VPN?</string>
<string name="vpn_confirm_add_profile_cancellation">Are you sure you don\'t want to create this profile?</string> <string name="vpn_confirm_add_profile_cancellation">Are you sure you don\'t want to create this profile?</string>
@@ -1874,6 +1874,7 @@ found in the list of installed applications.</string>
<!-- Name of a VPN profile --> <!-- Name of a VPN profile -->
<string name="vpn_name">VPN name</string> <string name="vpn_name">VPN name</string>
<string name="vpn_a_name">a VPN name</string>
<!-- Toast message shown when a profile is added --> <!-- Toast message shown when a profile is added -->
<string name="vpn_profile_added">&#39;%s&#39; is added</string> <string name="vpn_profile_added">&#39;%s&#39; is added</string>
@@ -1884,30 +1885,30 @@ found in the list of installed applications.</string>
<string name="vpn_user_certificate_title">Set user certificate</string> <string name="vpn_user_certificate_title">Set user certificate</string>
<!-- Complete term --> <!-- Complete term -->
<string name="vpn_user_certificate">User certificate</string> <string name="vpn_user_certificate">User certificate</string>
<string name="vpn_a_user_certificate">a user certificate</string>
<!-- Preference title --> <!-- Preference title -->
<string name="vpn_ca_certificate_title">Set CA certificate</string> <string name="vpn_ca_certificate_title">Set CA certificate</string>
<!-- Complete term --> <!-- Complete term -->
<string name="vpn_ca_certificate">Certificate authority (CA) certificate</string> <string name="vpn_ca_certificate">Certificate authority (CA) certificate</string>
<string name="vpn_a_ca_certificate">a CA certificate</string>
<!-- Preference title --> <!-- Preference title -->
<string name="vpn_l2tp_secret_string_title">Set L2TP secret</string> <string name="vpn_l2tp_secret_string_title">Set L2TP secret</string>
<!-- Complete term --> <!-- Complete term -->
<string name="vpn_l2tp_secret">L2TP secret</string> <string name="vpn_l2tp_secret">L2TP secret</string>
<string name="vpn_a_l2tp_secret">an L2TP secret</string>
<!-- Preference title --> <!-- Preference title -->
<string name="vpn_ipsec_presharedkey_title">Set IPSec pre-shared key</string> <string name="vpn_ipsec_presharedkey_title">Set IPSec pre-shared key</string>
<!-- Complete term --> <!-- Complete term -->
<string name="vpn_ipsec_presharedkey">IPSec pre-shared key</string> <string name="vpn_ipsec_presharedkey">IPSec pre-shared key</string>
<string name="vpn_a_ipsec_presharedkey">an IPSec pre-shared key</string>
<!-- Preference title -->
<string name="vpn_psk_title">Set IPSec pre-shared key</string>
<!-- Complete term -->
<string name="vpn_psk">IPSec pre-shared key</string>
<!-- Preference title --> <!-- Preference title -->
<string name="vpn_vpn_server_title">Set VPN server</string> <string name="vpn_vpn_server_title">Set VPN server</string>
<!-- Complete term --> <!-- Complete term -->
<string name="vpn_vpn_server">VPN server</string> <string name="vpn_vpn_server">VPN server</string>
<string name="vpn_a_vpn_server">a VPN server</string>
<!-- Dialog title for setting VPN server name --> <!-- Dialog title for setting VPN server name -->
<string name="vpn_vpn_server_dialog_title">VPN server name</string> <string name="vpn_vpn_server_dialog_title">VPN server name</string>
@@ -1947,7 +1948,7 @@ found in the list of installed applications.</string>
<!-- Title of dialog to enable/dislable access to credential storage --> <!-- Title of dialog to enable/dislable access to credential storage -->
<string name="cstor_access_dialog_title">Enter password</string> <string name="cstor_access_dialog_title">Enter password</string>
<!-- Description of dialog to enable/dislable access to credential storage from an action that requires the credential storage --> <!-- Description of dialog to enable/dislable access to credential storage from an action that requires the credential storage -->
<string name="cstor_access_dialog_hint_from_action">This action requires enabling the credential storage. Please enter the password to enable it.</string> <string name="cstor_access_dialog_hint_from_action">Enter the credential storage password.</string>
<!-- Title of preference to set storage password --> <!-- Title of preference to set storage password -->
<string name="cstor_set_passwd_title">Set password</string> <string name="cstor_set_passwd_title">Set password</string>
@@ -1978,9 +1979,9 @@ found in the list of installed applications.</string>
<!-- Description for the confirm-new-password input box --> <!-- Description for the confirm-new-password input box -->
<string name="cstor_confirm_password">Confirm new password:</string> <string name="cstor_confirm_password">Confirm new password:</string>
<!-- Description when user set up the storage for the very first time --> <!-- Description when user set up the storage for the very first time -->
<string name="cstor_first_time_hint">You must set a password for the credential storage.</string> <string name="cstor_first_time_hint">Set a password for the credential storage.</string>
<!-- Description when user set up the storage for the very first time from an action that requires the credential storage--> <!-- Description when user set up the storage for the very first time from an action that requires the credential storage-->
<string name="cstor_first_time_hint_from_action">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.</string> <string name="cstor_first_time_hint_from_action">Set a password for the credential storage.</string>
<string name="cstor_password_error">Please enter the correct password.</string> <string name="cstor_password_error">Please enter the correct password.</string>
<string name="cstor_password_error_reset_warning">Please enter the correct password. You have one more try to enter the correct password before the credential storage is erased.</string> <string name="cstor_password_error_reset_warning">Please enter the correct password. You have one more try to enter the correct password before the credential storage is erased.</string>
<string name="cstor_password_error_reset_warning_plural">Please enter the correct password. You have %d more tries to enter the correct password before the credential storage is erased.</string> <string name="cstor_password_error_reset_warning_plural">Please enter the correct password. You have %d more tries to enter the correct password before the credential storage is erased.</string>

View File

@@ -70,9 +70,9 @@ public class AuthenticationActor implements VpnProfileActor {
TextView passwordView = (TextView) d.findViewById(R.id.password_value); TextView passwordView = (TextView) d.findViewById(R.id.password_value);
Context c = mContext; Context c = mContext;
if (TextUtils.isEmpty(usernameView.getText().toString())) { 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())) { } else if (TextUtils.isEmpty(passwordView.getText().toString())) {
return c.getString(R.string.vpn_password); return c.getString(R.string.vpn_a_password);
} else { } else {
return null; return null;
} }

View File

@@ -57,7 +57,7 @@ class L2tpEditor extends VpnProfileEditor {
return ((result != null) return ((result != null)
? result ? result
: validate(mSecretString, R.string.vpn_l2tp_secret)); : validate(mSecretString, R.string.vpn_a_l2tp_secret));
} }
private Preference createSecretPreference(Context c) { private Preference createSecretPreference(Context c) {

View File

@@ -55,10 +55,10 @@ class L2tpIpsecEditor extends L2tpEditor {
public String validate() { public String validate() {
String result = super.validate(); String result = super.validate();
if (result == null) { if (result == null) {
result = validate(mUserCertificate, R.string.vpn_user_certificate); result = validate(mUserCertificate, R.string.vpn_a_user_certificate);
} }
if (result == null) { if (result == null) {
result = validate(mCaCertificate, R.string.vpn_ca_certificate); result = validate(mCaCertificate, R.string.vpn_a_ca_certificate);
} }
return result; return result;
} }

View File

@@ -47,7 +47,7 @@ class L2tpIpsecPskEditor extends L2tpEditor {
return ((result != null) return ((result != null)
? result ? result
: validate(mPresharedKey, R.string.vpn_ipsec_presharedkey)); : validate(mPresharedKey, R.string.vpn_a_ipsec_presharedkey));
} }
private Preference createPresharedKeyPreference(Context c) { private Preference createPresharedKeyPreference(Context c) {

View File

@@ -85,10 +85,10 @@ class VpnProfileEditor {
* null if all the inputs are valid * null if all the inputs are valid
*/ */
public String validate() { public String validate() {
String result = validate(mName, R.string.vpn_name); String result = validate(mName, R.string.vpn_a_name);
return ((result != null) return ((result != null)
? result ? result
: validate(mServerName, R.string.vpn_vpn_server)); : validate(mServerName, R.string.vpn_a_vpn_server));
} }
/** /**