diff options
author | Felix Bechstein <f@ub0r.de> | 2017-07-16 16:38:30 +0200 |
---|---|---|
committer | Mohamed Zenadi <zeapo@users.noreply.github.com> | 2017-07-16 16:38:30 +0200 |
commit | 8e6ab25572571080eae228599af069f78b5ea750 (patch) | |
tree | 8784005c016dc5b9552cfe9d6a4a3245db3687ce /app/src/main/java/com/zeapo | |
parent | 816b3d2c4a9a5b440df5fcfd76f8c18e722affb0 (diff) |
externalize strings (#316)
Diffstat (limited to 'app/src/main/java/com/zeapo')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java | 4 | ||||
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java index 21627038..447f39f3 100644 --- a/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java +++ b/app/src/main/java/com/zeapo/pwdstore/autofill/AutofillService.java @@ -401,8 +401,8 @@ public class AutofillService extends AccessibilityService { for (int i = 0; i < items.size(); i++) { itemNames[i] = items.get(i).getName().replace(".gpg", ""); } - itemNames[items.size()] = "Pick..."; - itemNames[items.size() + 1] = "Pick and match..."; + itemNames[items.size()] = getString(R.string.autofill_pick); + itemNames[items.size() + 1] = getString(R.string.autofill_pick_and_match); builder.setItems(itemNames, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { diff --git a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java index 3b027830..683c2561 100644 --- a/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java +++ b/app/src/main/java/com/zeapo/pwdstore/crypto/PgpHandler.java @@ -255,15 +255,13 @@ public class PgpHandler extends AppCompatActivity implements OpenPgpServiceConne ClipData clip = ClipData.newPlainText("pgp_handler_result_pm", decodedPassword); clipboard.setPrimaryClip(clip); + int clearAfter = 45; try { - showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text) - + " " + Integer.parseInt(settings.getString("general_show_time", "45")) + " " - + this.getResources().getString(R.string.clipboard_ending_toast_text)); + clearAfter = Integer.parseInt(settings.getString("general_show_time", "45")); } catch (NumberFormatException e) { - showToast(this.getResources().getString(R.string.clipboard_beginning_toast_text) - + " 45 " - + this.getResources().getString(R.string.clipboard_ending_toast_text)); + // ignore and keep default } + showToast(this.getResources().getString(R.string.clipboard_toast_text, clearAfter)); } public void handleClick(View view) { |