Localize the "fail to load image" toast message.
Bug 5875813.
Change-Id: Ia11a3e909f90e8178238c390728b407708fabf8e
diff --git a/res/values/strings.xml b/res/values/strings.xml
index c0f2d3e..75cdc85 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -48,6 +48,10 @@
[CHAR LIMIT=50]-->
<string name="fail_to_load">Couldn\'t load</string>
+ <!-- Used in a toast message when an image fails to be loaded
+ [CHAR LIMIT=50]-->
+ <string name="fail_to_load_image">Couldn\'t load the image</string>
+
<!-- Displayed in place of the picture when we fail to get the thumbnail of it.
[CHAR LIMIT=50]-->
<string name="no_thumbnail">No thumbnail</string>
diff --git a/src/com/android/gallery3d/app/CropImage.java b/src/com/android/gallery3d/app/CropImage.java
index 997f1fd..5ac9f02 100644
--- a/src/com/android/gallery3d/app/CropImage.java
+++ b/src/com/android/gallery3d/app/CropImage.java
@@ -708,7 +708,7 @@
BitmapRegionDecoder regionDecoder) {
if (regionDecoder == null) {
- Toast.makeText(this, "fail to load image", Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, R.string.fail_to_load_image, Toast.LENGTH_SHORT).show();
finish();
return;
}
@@ -734,7 +734,7 @@
private void onBitmapAvailable(Bitmap bitmap) {
if (bitmap == null) {
- Toast.makeText(this, "fail to load image", Toast.LENGTH_SHORT).show();
+ Toast.makeText(this, R.string.fail_to_load_image, Toast.LENGTH_SHORT).show();
finish();
return;
}