Added string reference for Issue #207

This commit is contained in:
Sreeram Boyapati 2014-03-10 22:37:23 +05:30
parent b47f291d12
commit a41ee31b6c
2 changed files with 6 additions and 4 deletions

View File

@ -92,10 +92,10 @@ public class SelectSecretKeyLayoutFragment extends Fragment {
String userName, userEmail;
if (userIdSplit[0] != null) { userName = userIdSplit[0]; }
else { userName = "No Name"; }
else { userName = getActivity().getResources().getString(R.string.user_id_no_name); }
if (userIdSplit[1] != null) { userEmail = userIdSplit[1]; }
else { userEmail = "No Email"; }
else { userEmail = getActivity().getResources().getString(R.string.error_user_id_no_email); }
mKeyMasterKeyIdHex.setText(masterkeyIdHex);
mKeyUserId.setText(userName);
@ -104,7 +104,7 @@ public class SelectSecretKeyLayoutFragment extends Fragment {
mKeyUserIdRest.setVisibility(View.VISIBLE);
}
else{
mKeyMasterKeyIdHex.setText("No key found for KeyRing");
mKeyMasterKeyIdHex.setText(getActivity().getResources().getString(R.string.no_key));
mKeyUserId.setVisibility(View.GONE);
mKeyUserIdRest.setVisibility(View.GONE);
@ -112,7 +112,7 @@ public class SelectSecretKeyLayoutFragment extends Fragment {
}
else{
mKeyMasterKeyIdHex.setText("No KeyRings found for MasterId: "+secretKeyId);
mKeyMasterKeyIdHex.setText(getActivity().getResources().getString(R.string.no_keys_added_or_updated)+" for master id: "+secretKeyId);
mKeyUserId.setVisibility(View.GONE);
mKeyUserIdRest.setVisibility(View.GONE);
}

View File

@ -145,6 +145,7 @@
<string name="user_id_no_name">&lt;no name&gt;</string>
<string name="none">&lt;none&gt;</string>
<string name="no_key">&lt;no key&gt;</string>
<string name="no_email">&lt;No Email&gt;</string>
<string name="unknown_status"></string>
<string name="can_encrypt">can encrypt</string>
<string name="can_sign">can sign</string>
@ -271,6 +272,7 @@
<string name="error_master_key_must_not_be_el_gamal">the master key cannot be an ElGamal key</string>
<string name="error_unknown_algorithm_choice">unknown algorithm choice</string>
<string name="error_user_id_needs_a_name">you need to specify a name</string>
<string name="error_user_id_no_email">no email found</string>
<string name="error_user_id_needs_an_email_address">you need to specify an email address</string>
<string name="error_key_needs_a_user_id">need at least one user id</string>
<string name="error_main_user_id_must_not_be_empty">main user id must not be empty</string>