Use strings in edit key

This commit is contained in:
Dominik Schürmann 2014-07-03 16:49:25 +02:00
parent e006d4762c
commit 709196f774
3 changed files with 18 additions and 7 deletions

View file

@ -26,6 +26,7 @@ import android.os.RemoteException;
import android.support.v4.app.DialogFragment;
import org.sufficientlysecure.keychain.Constants;
import org.sufficientlysecure.keychain.R;
import org.sufficientlysecure.keychain.util.Log;
public class EditUserIdDialogFragment extends DialogFragment {
@ -57,9 +58,9 @@ public class EditUserIdDialogFragment extends DialogFragment {
mMessenger = getArguments().getParcelable(ARG_MESSENGER);
CustomAlertDialogBuilder builder = new CustomAlertDialogBuilder(getActivity());
CharSequence[] array = {"change to primary user id", "revoke"};
CharSequence[] array = getResources().getStringArray(R.array.edit_key_edit_user_id);
builder.setTitle("select action!");
builder.setTitle(R.string.edit_key_edit_user_id_title);
builder.setItems(array, new DialogInterface.OnClickListener() {
@Override
@ -76,7 +77,7 @@ public class EditUserIdDialogFragment extends DialogFragment {
}
}
});
builder.setNegativeButton("cancel", new DialogInterface.OnClickListener() {
builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int id) {
dismiss();

View file

@ -14,7 +14,7 @@
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginTop="8dp"
android:text="Passphrase"
android:text="@string/label_passphrase"
android:layout_weight="1" />
<TextView
@ -24,7 +24,7 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="change passphrase"
android:text="@string/edit_key_action_change_passphrase"
android:minHeight="?android:attr/listPreferredItemHeight"
android:drawableRight="@drawable/ic_action_edit"
android:drawablePadding="8dp"
@ -67,7 +67,7 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="add identity"
android:text="@string/edit_key_action_add_identity"
android:minHeight="?android:attr/listPreferredItemHeight"
android:drawableRight="@drawable/ic_action_add_person"
android:drawablePadding="8dp"
@ -109,7 +109,7 @@
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="add key"
android:text="@string/edit_key_action_add_subkey"
android:minHeight="?android:attr/listPreferredItemHeight"
android:drawableRight="@drawable/ic_action_new_account"
android:drawablePadding="8dp"

View file

@ -471,6 +471,16 @@
<string name="key_view_tab_keys">Subkeys</string>
<string name="key_view_tab_certs">Certificates</string>
<!-- Edit key -->
<string name="edit_key_action_change_passphrase">Change Passphrase</string>
<string name="edit_key_action_add_identity">Add Identity</string>
<string name="edit_key_action_add_subkey">Add Subkey</string>
<string name="edit_key_edit_user_id_title">Select an action!</string>
<string-array name="edit_key_edit_user_id">
<item>Change to Primary Identity</item>
<item>Revoke Identity</item>
</string-array>
<!-- Navigation Drawer -->
<string name="nav_keys">Keys</string>
<string name="nav_encrypt">Sign and Encrypt</string>