Localized displayed text strings to comply android localization requirements.
Merging kwd commit cc008fd033f1adaed378783c1db609c6f0a4bef8
Change-Id: I3017e738baf37204359cd1ee93eae899fdac514b
diff --git a/ScriptingLayerForAndroid/res/layout/act_console.xml b/ScriptingLayerForAndroid/res/layout/act_console.xml
index a76561b..8993db3 100644
--- a/ScriptingLayerForAndroid/res/layout/act_console.xml
+++ b/ScriptingLayerForAndroid/res/layout/act_console.xml
@@ -51,7 +51,7 @@
<Button
android:id="@+id/console_prompt_no"
- android:text="No"
+ android:text="@string/prompt_no"
android:paddingTop="5dip"
android:paddingBottom="10dip"
android:paddingLeft="40dip"
@@ -65,7 +65,7 @@
<Button
android:id="@+id/console_prompt_yes"
- android:text="Yes"
+ android:text="@string/prompt_yes"
android:paddingTop="5dip"
android:paddingBottom="10dip"
android:paddingLeft="40dip"
diff --git a/ScriptingLayerForAndroid/res/layout/api_prompt.xml b/ScriptingLayerForAndroid/res/layout/api_prompt.xml
index 4462d5b..7a65663 100644
--- a/ScriptingLayerForAndroid/res/layout/api_prompt.xml
+++ b/ScriptingLayerForAndroid/res/layout/api_prompt.xml
@@ -14,6 +14,6 @@
android:id="@+id/done"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:text="Finish"
+ android:text="@string/prompt_finish"
android:layout_alignParentBottom="true" />
</RelativeLayout>
diff --git a/ScriptingLayerForAndroid/res/layout/dia_resize.xml b/ScriptingLayerForAndroid/res/layout/dia_resize.xml
index 2269bd6..32253fb 100644
--- a/ScriptingLayerForAndroid/res/layout/dia_resize.xml
+++ b/ScriptingLayerForAndroid/res/layout/dia_resize.xml
@@ -32,12 +32,11 @@
android:layout_height="wrap_content"
android:singleLine="true"
android:numeric="integer"
- android:text="80"/>
+ android:text="@string/default_width"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="x"
android:paddingLeft="10dip"
android:paddingRight="10dip"
android:gravity="right|bottom"
@@ -51,5 +50,5 @@
android:layout_height="wrap_content"
android:singleLine="true"
android:numeric="integer"
- android:text="25"/>
+ android:text="@string/default_height"/>
</LinearLayout>
diff --git a/ScriptingLayerForAndroid/res/layout/duration_picker.xml b/ScriptingLayerForAndroid/res/layout/duration_picker.xml
index 1aac468..29e524d 100644
--- a/ScriptingLayerForAndroid/res/layout/duration_picker.xml
+++ b/ScriptingLayerForAndroid/res/layout/duration_picker.xml
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
-<!--
- * Copyright (C) 2008 OpenIntents.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+<!--
+ * Copyright (C) 2008 OpenIntents.org
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
-->
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
@@ -26,7 +26,7 @@
android:focusable="true"
android:focusableInTouchMode="true" />
<TextView
- android:text="Days"
+ android:text="@string/display_days"
android:gravity="center_horizontal"
android:layout_width="70dip"
android:layout_height="wrap_content"
@@ -41,7 +41,7 @@
android:focusableInTouchMode="true"
android:layout_toRightOf="@+id/day" />
<TextView
- android:text="Hours"
+ android:text="@string/display_hours"
android:gravity="center_horizontal"
android:layout_width="70dip"
android:layout_height="wrap_content"
@@ -56,7 +56,7 @@
android:focusableInTouchMode="true"
android:layout_toRightOf="@+id/hour" />
<TextView
- android:text="Minutes"
+ android:text="@string/display_minutes"
android:gravity="center_horizontal"
android:layout_width="70dip"
android:layout_height="wrap_content"
@@ -71,10 +71,10 @@
android:focusableInTouchMode="true"
android:layout_toRightOf="@+id/minute" />
<TextView
- android:text="Seconds"
+ android:text="@string/display_seconds"
android:gravity="center_horizontal"
android:layout_width="70dip"
android:layout_height="wrap_content"
android:layout_below="@+id/second"
android:layout_alignLeft="@+id/second" />
-</RelativeLayout>
\ No newline at end of file
+</RelativeLayout>
diff --git a/ScriptingLayerForAndroid/res/layout/findreplace.xml b/ScriptingLayerForAndroid/res/layout/findreplace.xml
index b3b7e42..64ec004 100644
--- a/ScriptingLayerForAndroid/res/layout/findreplace.xml
+++ b/ScriptingLayerForAndroid/res/layout/findreplace.xml
@@ -4,11 +4,11 @@
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
- <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Find"></TextView>
+ <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/display_find"></TextView>
<EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/searchFind">
<requestFocus></requestFocus>
</EditText>
- <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Replace"></TextView>
+ <TextView android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/display_replace"></TextView>
<EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/searchReplace"></EditText>
<LinearLayout android:id="@+id/linearLayout1" android:layout_width="match_parent" android:layout_height="wrap_content">
</LinearLayout>
@@ -16,14 +16,13 @@
</LinearLayout>
<TableLayout android:id="@+id/tableLayout1" android:layout_width="match_parent" android:layout_height="wrap_content">
<TableRow android:id="@+id/tableRow1" android:layout_width="wrap_content" android:layout_height="wrap_content">
- <CheckBox android:text="Whole Words" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/searchWord"></CheckBox>
- <CheckBox android:text="Case Sensitive" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/searchCase"></CheckBox>
+ <CheckBox android:text="@string/display_whole_words" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/searchWord"></CheckBox>
+ <CheckBox android:text="@string/display_case_sensitive" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/searchCase"></CheckBox>
</TableRow>
<TableRow android:id="@+id/tableRow2" android:layout_width="wrap_content" android:layout_height="wrap_content">
- <CheckBox android:text="Replace All" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/searchAll"></CheckBox>
- <CheckBox android:text="From Start" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/searchStart"></CheckBox>
+ <CheckBox android:text="@string/display_replace_all" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/searchAll"></CheckBox>
+ <CheckBox android:text="@string/display_from_start" android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/searchStart"></CheckBox>
</TableRow>
</TableLayout>
- <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/textView3" android:typeface="normal" android:text="Remember you can use the volume keys to undo mistakes."></TextView>
-
+ <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/textView3" android:typeface="normal" android:text="@string/findreplace_undo_reminder"></TextView>
</LinearLayout>
diff --git a/ScriptingLayerForAndroid/res/layout/interpreter_manager.xml b/ScriptingLayerForAndroid/res/layout/interpreter_manager.xml
index c56183d..6b2afb9 100644
--- a/ScriptingLayerForAndroid/res/layout/interpreter_manager.xml
+++ b/ScriptingLayerForAndroid/res/layout/interpreter_manager.xml
@@ -11,5 +11,5 @@
android:id="@+id/android:empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="No interpreters." />
-</LinearLayout>
\ No newline at end of file
+ android:text="@string/no_interpreters" />
+</LinearLayout>
diff --git a/ScriptingLayerForAndroid/res/layout/logcat_viewer.xml b/ScriptingLayerForAndroid/res/layout/logcat_viewer.xml
index cf667f8..2517432 100644
--- a/ScriptingLayerForAndroid/res/layout/logcat_viewer.xml
+++ b/ScriptingLayerForAndroid/res/layout/logcat_viewer.xml
@@ -11,5 +11,5 @@
android:id="@+id/android:empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="No logcat messages." />
-</LinearLayout>
\ No newline at end of file
+ android:text="@string/no_logcat_msg" />
+</LinearLayout>
diff --git a/ScriptingLayerForAndroid/res/layout/trigger_manager.xml b/ScriptingLayerForAndroid/res/layout/trigger_manager.xml
index 3e8848c..926da9d 100644
--- a/ScriptingLayerForAndroid/res/layout/trigger_manager.xml
+++ b/ScriptingLayerForAndroid/res/layout/trigger_manager.xml
@@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:orientation="vertical">
- <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/btnTriggerCancel" android:onClick="clickCancel" android:text="Cancel All"></Button><ListView
+ <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/btnTriggerCancel" android:onClick="clickCancel" android:text="@string/cancel_all"></Button><ListView
android:id="@+id/android:list"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
@@ -13,4 +13,4 @@
android:layout_height="wrap_content"
android:text="@string/no_triggers_message" />
-</LinearLayout>
\ No newline at end of file
+</LinearLayout>
diff --git a/ScriptingLayerForAndroid/res/values/strings.xml b/ScriptingLayerForAndroid/res/values/strings.xml
index 5c59a42..5397451 100644
--- a/ScriptingLayerForAndroid/res/values/strings.xml
+++ b/ScriptingLayerForAndroid/res/values/strings.xml
@@ -185,5 +185,23 @@
<string name="help_acks">SL4A uses <a href="http://code.google.com/p/connectbot/">ConnectBot</a> terminal.</string>
<string name="help_intro">Please select a topic below for more information on a particular subject.</string>
<string name="enable_auto_close">Enable Auto Close</string>
-
+ <string name="prompt_no">No</string>
+ <string name="prompt_yes">Yes</string>
+ <string name="prompt_finish">Finish</string>
+ <string name="default_width">80</string>
+ <string name="default_height">25</string>
+ <string name="display_days">Days</string>
+ <string name="display_hours">Hours</string>
+ <string name="display_minutes">Minutes</string>
+ <string name="display_seconds">Seconds</string>
+ <string name="display_find">Find</string>
+ <string name="display_replace">Replace</string>
+ <string name="display_whole_words">Whole Words</string>
+ <string name="display_case_sensitive">Case Sensitive</string>
+ <string name="display_replace_all">Replace All</string>
+ <string name="display_from_start">From Start</string>
+ <string name="findreplace_undo_reminder">Remember you can use the volume keys to undo mistakes.</string>
+ <string name="no_interpreters">No interpreters.</string>
+ <string name="no_logcat_msg">No logcat messages.</string>
+ <string name="cancel_all">Cancel All</string>
</resources>