diff options
author | حسين <zidhussein@gmail.com> | 2019-01-02 18:10:47 +0000 |
---|---|---|
committer | حسين <zidhussein@gmail.com> | 2019-01-02 19:18:18 +0000 |
commit | 249248e168a152e7502ba331bf86ab88c7815110 (patch) | |
tree | c4ea2a90acc9fb5d34116993efcdb33a906ee465 /app/src/main/java | |
parent | c200566bcaec971e1756afe5ebf96baf09e88816 (diff) |
improve translations with format strings
delete dialog format string
dialog text format
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/PasswordStore.java | 7 | ||||
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/UserPreference.kt | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java index 123acd2d..8a5acec8 100644 --- a/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java +++ b/app/src/main/java/com/zeapo/pwdstore/PasswordStore.java @@ -536,10 +536,9 @@ public class PasswordStore extends AppCompatActivity { } final int position = (int) it.next(); final PasswordItem item = adapter.getValues().get(position); - new AlertDialog.Builder(this). - setMessage(this.getResources().getString(R.string.delete_dialog_text) + - item + "\"") - .setPositiveButton(this.getResources().getString(R.string.dialog_yes), (dialogInterface, i) -> { + new AlertDialog.Builder(this) + .setMessage(getResources().getString(R.string.delete_dialog_text, item.getLongName())) + .setPositiveButton(getResources().getString(R.string.dialog_yes), (dialogInterface, i) -> { item.getFile().delete(); adapter.remove(position); it.remove(); diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt index d93d6bcc..2f36c965 100644 --- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt +++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt @@ -108,7 +108,7 @@ class UserPreference : AppCompatActivity() { val repoDir = PasswordRepository.getRepositoryDirectory(callingActivity.applicationContext) AlertDialog.Builder(callingActivity) .setTitle(R.string.pref_dialog_delete_title) - .setMessage("${resources.getString(R.string.dialog_delete_msg)} \n $repoDir") + .setMessage(resources.getString(R.string.dialog_delete_msg, repoDir)) .setCancelable(false) .setPositiveButton(R.string.dialog_delete) { dialogInterface, _ -> try { |