extract strings

This commit is contained in:
Vincent Breitmoser 2017-09-20 21:29:48 +02:00
parent 48b54f4090
commit 36ba682d90
3 changed files with 40 additions and 21 deletions

View File

@ -198,21 +198,21 @@ public class ViewKeyAdvLockFragment extends LoaderFragment implements OnClickLis
switch (currentLockType) {
case NONE:
lockStatusText.setText("None");
lockStatusText.setText(R.string.lock_status_none);
lockCurrentNone.setVisibility(View.VISIBLE);
break;
case PASSWORD:
lockStatusText.setText("Password");
lockStatusText.setText(R.string.lock_status_password);
lockCurrentPassword.setVisibility(View.VISIBLE);
break;
case SECURITY_TOKEN:
lockStatusText.setText("Security Token");
lockStatusText.setText(R.string.lock_status_security_token);
break;
case MIXED:
lockStatusText.setText("Mixed");
lockStatusText.setText(R.string.lock_status_mixed);
break;
case UNAVAILABLE:
lockStatusText.setText("Unavailable");
lockStatusText.setText(R.string.lock_status_unavailable);
break;
}
}
@ -241,8 +241,7 @@ public class ViewKeyAdvLockFragment extends LoaderFragment implements OnClickLis
public boolean onCreateActionMode(ActionMode mode, Menu menu) {
actionMode = mode;
mode.setTitle("Edit Key Lock");
// mode.getMenuInflater().inflate(R.menu.action_edit_lock, menu);
mode.setTitle(R.string.title_edit_key_lock);
viewAnimator.setDisplayedChildId(R.id.lock_layout_select);
return true;
@ -284,12 +283,12 @@ public class ViewKeyAdvLockFragment extends LoaderFragment implements OnClickLis
}
case SECURITY_TOKEN: {
Notify.create(getActivity(), "Key is on Security Token!", Style.ERROR).show();
Notify.create(getActivity(), R.string.error_key_is_on_token, Style.ERROR).show();
break;
}
case UNAVAILABLE: {
Notify.create(getActivity(), "Stripped keys can't be locked!", Style.ERROR).show();
Notify.create(getActivity(), R.string.error_key_not_available, Style.ERROR).show();
break;
}
}

View File

@ -17,7 +17,7 @@
android:padding="16dp"
android:gravity="center_vertical"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="Your key is stored in OpenKeychain's private storage, and other Apps can\'t access it. For extra protection, you can additionally lock your key using a password."
android:text="@string/lock_explanation"
/>
<org.sufficientlysecure.keychain.ui.widget.ToolableViewAnimator
@ -49,7 +49,7 @@
android:paddingRight="8dp"
android:gravity="center"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="Current lock method:"
android:text="@string/lock_current"
/>
<TextView
@ -78,7 +78,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Choose a lock method:"
android:text="@string/lock_choose"
style="@style/SectionHeader"
/>
@ -100,7 +100,7 @@
android:layout_height="wrap_content"
android:textAppearance="?android:textAppearanceMedium"
android:textColor="@color/md_black_1000"
android:text="None"
android:text="@string/lock_method_none"
/>
<TextView
@ -108,7 +108,7 @@
android:layout_height="wrap_content"
android:id="@+id/lock_method_current_none"
android:textAppearance="?android:textAppearanceSmall"
android:text="Currently selected"
android:text="@string/lock_currently_selected"
android:visibility="gone"
/>
@ -138,7 +138,7 @@
android:layout_height="wrap_content"
android:textAppearance="?android:textAppearanceMedium"
android:textColor="@color/md_black_1000"
android:text="Password"
android:text="@string/lock_method_password"
/>
<TextView
@ -146,7 +146,7 @@
android:layout_height="wrap_content"
android:id="@+id/lock_method_current_password"
android:textAppearance="?android:textAppearanceSmall"
android:text="Current key lock"
android:text="@string/lock_currently_selected"
android:visibility="gone"
tools:visibility="visible"
/>
@ -170,7 +170,7 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Choose a password:"
android:text="@string/lock_password_choose"
android:layout_marginBottom="8dp"
style="@style/SectionHeader"
/>
@ -184,7 +184,7 @@
android:inputType="textVisiblePassword"
android:imeOptions="actionNext"
android:ems="10"
android:hint="Password"
android:hint="@string/hint_password"
/>
<EditText
@ -196,7 +196,7 @@
android:inputType="textVisiblePassword"
android:imeOptions="actionNext"
android:ems="10"
android:hint="Repeat Password"
android:hint="@string/hint_repeat_password"
/>
<LinearLayout
@ -209,7 +209,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/lock_button_password_back"
android:text="Back"
android:text="@string/button_back"
style="?buttonBarButtonStyle"
/>
@ -217,7 +217,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/lock_button_password_save"
android:text="Save"
android:text="@string/button_save"
style="?buttonBarButtonStyle"
/>

View File

@ -1986,4 +1986,24 @@
<string name="label_usb_untested_summary">If enabled, USB Smartcard readers can be used that have not been properly tested.</string>
<string name="label_usb_untested">Allow untested USB Devices</string>
<string name="title_edit_key_lock">Edit Key Lock</string>
<string name="lock_status_none">"None"</string>
<string name="lock_status_password">"Password"</string>
<string name="lock_status_security_token">"Security Token"</string>
<string name="lock_status_mixed">"Mixed"</string>
<string name="lock_status_unavailable">"Key not available"</string>
<string name="lock_explanation">Your key is stored in OpenKeychain\'s private storage, and other Apps can\'t access it. For extra protection, you can additionally lock your key using a password.</string>
<string name="lock_current">Current lock method:</string>
<string name="lock_choose">Choose a lock method:</string>
<string name="lock_method_none">None</string>
<string name="lock_currently_selected">Currently selected</string>
<string name="lock_method_password">Password</string>
<string name="lock_password_choose">Choose a password:</string>
<string name="hint_password">Password</string>
<string name="hint_repeat_password">Repeat Password</string>
<string name="button_back">Back</string>
<string name="button_save">Save</string>
<string name="error_key_is_on_token">"Key is on Security Token!"</string>
<string name="error_key_not_available">"This key is stripped, it can\'t be locked!"</string>
</resources>