From 7219fedf459e305bb7fbaabee2b4ce833f769ccc Mon Sep 17 00:00:00 2001 From: Adam Smith Date: Fri, 31 Oct 2014 14:13:17 +0000 Subject: Hard coded string in GitAsyncTask replaced with resources --- app/src/main/java/com/zeapo/pwdstore/GitAsyncTask.java | 8 ++++---- app/src/main/res/values/strings.xml | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'app/src') diff --git a/app/src/main/java/com/zeapo/pwdstore/GitAsyncTask.java b/app/src/main/java/com/zeapo/pwdstore/GitAsyncTask.java index c27bd0d4..6d0e745d 100644 --- a/app/src/main/java/com/zeapo/pwdstore/GitAsyncTask.java +++ b/app/src/main/java/com/zeapo/pwdstore/GitAsyncTask.java @@ -30,7 +30,7 @@ public class GitAsyncTask extends AsyncTask { } protected void onPreExecute() { - this.dialog.setMessage("Running command..."); + this.dialog.setMessage(activity.getResources().getString(R.string.running_dialog_text)); this.dialog.setCancelable(false); this.dialog.show(); } @@ -54,9 +54,9 @@ public class GitAsyncTask extends AsyncTask { if (!result.isEmpty()) { new AlertDialog.Builder(activity). - setTitle("Internal exception occurred"). - setMessage("Message from jgit:\n" + result). - setPositiveButton("OK", new DialogInterface.OnClickListener() { + setTitle(activity.getResources().getString(R.string.jgit_error_dialog_title)). + setMessage(activity.getResources().getString(R.string.jgit_error_dialog_text) + result). + setPositiveButton(activity.getResources().getString(R.string.dialog_ok), new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { if (operation.equals(CloneCommand.class)) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bf3460b1..3565d79f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -37,6 +37,11 @@ Account name empty! Please provide a file name You cannot use an empty password or empty extra content + + + Running command... + Internal exception occurred + Message from jgit: /n Welcome to Password Store\n\n In this screen you can either create a new repository or clone your git repository onto your device. -- cgit v1.2.3