From aacced6bc5a64c7daa4af2f29b94a1b00770f083 Mon Sep 17 00:00:00 2001 From: Leon Scroggins Date: Fri, 11 Dec 2009 15:01:22 -0500 Subject: Provide localized strings for labels. Fix for http://b/issue?id=2178786 Provide strings for input types file, submit, and reset, and allow them to be passed down to native. Requires a change in external/webkit. --- core/java/android/webkit/BrowserFrame.java | 17 ++++++++++++++++- core/res/res/values/strings.xml | 6 ++++++ 2 files changed, 22 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/java/android/webkit/BrowserFrame.java b/core/java/android/webkit/BrowserFrame.java index f71af20..b36fa8d 100644 --- a/core/java/android/webkit/BrowserFrame.java +++ b/core/java/android/webkit/BrowserFrame.java @@ -782,10 +782,13 @@ class BrowserFrame extends Handler { return mSettings.getUserAgentString(); } - // these ids need to be in sync with enum RAW_RES_ID in WebFrame + // These ids need to be in sync with enum rawResId in PlatformBridge.h private static final int NODOMAIN = 1; private static final int LOADERROR = 2; private static final int DRAWABLEDIR = 3; + private static final int FILE_UPLOAD_LABEL = 4; + private static final int RESET_LABEL = 5; + private static final int SUBMIT_LABEL = 6; String getRawResFilename(int id) { int resid; @@ -803,6 +806,18 @@ class BrowserFrame extends Handler { resid = com.android.internal.R.drawable.btn_check_off; break; + case FILE_UPLOAD_LABEL: + return mContext.getResources().getString( + com.android.internal.R.string.upload_file); + + case RESET_LABEL: + return mContext.getResources().getString( + com.android.internal.R.string.reset); + + case SUBMIT_LABEL: + return mContext.getResources().getString( + com.android.internal.R.string.submit); + default: Log.e(LOGTAG, "getRawResFilename got incompatible resource ID"); return ""; diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 9e72f64..bc354c5 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -2097,6 +2097,12 @@ Layer 2 Tunneling Protocol Pre-shared key based L2TP/IPSec VPN Certificate based L2TP/IPSec VPN + + Choose file + + Reset + + Submit -- cgit v1.1