summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorkaiyiz <kaiyiz@codeaurora.org>2014-03-04 17:53:30 +0800
committeremancebo <emancebo@cyngn.com>2014-09-04 10:40:19 -0700
commit85df641512d37c0af9609b8c347a863f274b8381 (patch)
tree6deb24fc17ef05d4064335602d3e4d4145a69721 /src
parentb4a96363005b5bb066cf1f31339317398374e713 (diff)
downloadandroid_packages_apps_Gallery2-85df641512d37c0af9609b8c347a863f274b8381.tar.gz
android_packages_apps_Gallery2-85df641512d37c0af9609b8c347a863f274b8381.tar.bz2
android_packages_apps_Gallery2-85df641512d37c0af9609b8c347a863f274b8381.zip
Gallery2: Fix the string can't be translated in Gallery2.
The string is defined in FilterDrawRepresentation.java with English. Extract this string into source.xml file and get it by getString(). CR-fixed: 623893 Change-Id: Ied7afc964555cfd752af306742be69eba4a41349
Diffstat (limited to 'src')
-rw-r--r--src/com/android/gallery3d/app/GalleryAppImpl.java6
-rw-r--r--src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java6
2 files changed, 10 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/app/GalleryAppImpl.java b/src/com/android/gallery3d/app/GalleryAppImpl.java
index c6e7a0b57..9c5f232df 100644
--- a/src/com/android/gallery3d/app/GalleryAppImpl.java
+++ b/src/com/android/gallery3d/app/GalleryAppImpl.java
@@ -36,6 +36,7 @@ public class GalleryAppImpl extends Application implements GalleryApp {
private static final String DOWNLOAD_FOLDER = "download";
private static final long DOWNLOAD_CAPACITY = 64 * 1024 * 1024; // 64M
+ private static GalleryAppImpl sGalleryAppImpl;
private ImageCacheService mImageCacheService;
private Object mLock = new Object();
@@ -51,6 +52,7 @@ public class GalleryAppImpl extends Application implements GalleryApp {
WidgetUtils.initialize(this);
PicasaSource.initialize(this);
UsageStatistics.initialize(this);
+ sGalleryAppImpl = this;
}
@Override
@@ -58,6 +60,10 @@ public class GalleryAppImpl extends Application implements GalleryApp {
return this;
}
+ public static Context getContext() {
+ return sGalleryAppImpl;
+ }
+
@Override
public synchronized DataManager getDataManager() {
if (mDataManager == null) {
diff --git a/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java b/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java
index 48d3d9077..9ed6ae9fa 100644
--- a/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java
+++ b/src/com/android/gallery3d/filtershow/filters/FilterDrawRepresentation.java
@@ -16,6 +16,7 @@
package com.android.gallery3d.filtershow.filters;
+import android.content.res.Resources;
import android.graphics.Color;
import android.graphics.Path;
import android.graphics.PathMeasure;
@@ -23,6 +24,7 @@ import android.util.JsonReader;
import android.util.JsonWriter;
import android.util.Log;
+import com.android.gallery3d.app.GalleryAppImpl;
import com.android.gallery3d.R;
import com.android.gallery3d.filtershow.controller.BasicParameterInt;
import com.android.gallery3d.filtershow.controller.BasicParameterStyle;
@@ -158,9 +160,9 @@ public class FilterDrawRepresentation extends FilterRepresentation {
private StrokeData mCurrent; // used in the currently drawing style
public FilterDrawRepresentation() {
- super("Draw");
+ super(GalleryAppImpl.getContext().getString(R.string.imageDraw));
setFilterClass(ImageFilterDraw.class);
- setSerializationName("DRAW");
+ setSerializationName(GalleryAppImpl.getContext().getString(R.string.imageDraw));
setFilterType(FilterRepresentation.TYPE_VIGNETTE);
setTextId(R.string.imageDraw);
setEditorId(EditorDraw.ID);