From 4fc4f6529753dc9c45b947ae70c72e5af042bf85 Mon Sep 17 00:00:00 2001 From: Michael W Date: Wed, 21 Feb 2018 22:36:23 +0100 Subject: Snap: Convert "save best" dialog text to a quantity string * Saving 1 vs saving several can be a different string in other languages (e.g. German: "1 von 10 Bildern wird gespeichert[...]" vs "2 von 10 Bildern werden gespeichert[...]") * Also fixes a missing "be" in the source string ("will _be_ deleted") Change-Id: I0f0a91fa3cd1abe17c9d3eef453c4ed706a6fb25 --- src/com/android/camera/BestpictureActivity.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/com/android') diff --git a/src/com/android/camera/BestpictureActivity.java b/src/com/android/camera/BestpictureActivity.java index 6eaa2a3d0..e4c1ca073 100644 --- a/src/com/android/camera/BestpictureActivity.java +++ b/src/com/android/camera/BestpictureActivity.java @@ -411,7 +411,8 @@ public class BestpictureActivity extends FragmentActivity { @Override public String getContentString() { - return getResources().getString(R.string.save_best_dialog_content, choosenCount); + return getResources().getQuantityString(R.plurals.save_best_dialog_content, + choosenCount, choosenCount); } @Override @@ -496,8 +497,8 @@ public class BestpictureActivity extends FragmentActivity { } } } - String toastString = getResources().getString(R.string.save_best_image_toast, - toSaveCount); + String toastString = getResources().getQuantityString(R.plurals.save_best_image_toast, + toSaveCount, toSaveCount); Toast.makeText(BestpictureActivity.this, toastString, Toast.LENGTH_SHORT).show(); backToViewfinder(); } -- cgit v1.2.3