commit e3da83657bb93a7cb3bf692e87588d8fdfae12cc Author: Nathan Freitas nathan@freitas.net Date: Mon Feb 27 06:50:35 2012 -0500
extrnlz more strings; added ActionBar support --- res/layout-land/layout_main.xml | 2 +- res/layout-xlarge/layout_main.xml | 2 +- res/layout/layout_main.xml | 2 +- res/layout/layout_settings.xml | 2 +- res/menu-v11/main.xml | 91 +++++++++++++++++++++++++++++++++++++ res/menu-v13/main.xml | 91 +++++++++++++++++++++++++++++++++++++ res/values/strings.xml | 3 +- 7 files changed, 188 insertions(+), 5 deletions(-)
diff --git a/res/layout-land/layout_main.xml b/res/layout-land/layout_main.xml index 125f13c..e55fda5 100644 --- a/res/layout-land/layout_main.xml +++ b/res/layout-land/layout_main.xml @@ -23,7 +23,7 @@ <TextView android:id="@+id/radioModeText" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="powered by The Tor Project " + android:text="@string/powered_by" android:layout_marginTop="8px" android:layout_marginRight="0px" android:gravity="right" diff --git a/res/layout-xlarge/layout_main.xml b/res/layout-xlarge/layout_main.xml index ac19112..6e89e2c 100644 --- a/res/layout-xlarge/layout_main.xml +++ b/res/layout-xlarge/layout_main.xml @@ -23,7 +23,7 @@ <TextView android:id="@+id/radioModeText" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="powered by The Tor Project " + android:text="@string/powered_by" android:layout_marginTop="8px" android:layout_marginRight="0px" android:gravity="right" diff --git a/res/layout/layout_main.xml b/res/layout/layout_main.xml index 674e103..6515156 100644 --- a/res/layout/layout_main.xml +++ b/res/layout/layout_main.xml @@ -26,7 +26,7 @@ <TextView android:id="@+id/radioModeText" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="powered by The Tor Project " + android:text="@string/powered_by" android:layout_marginTop="8px" android:layout_marginRight="0px" android:gravity="right" diff --git a/res/layout/layout_settings.xml b/res/layout/layout_settings.xml index ccaa303..f9b6971 100644 --- a/res/layout/layout_settings.xml +++ b/res/layout/layout_settings.xml @@ -21,7 +21,7 @@ <Button android:id="@+id/btnSettingsSave" android:layout_width="fill_parent" android:layout_height="40px" - android:text="Save Settings" + android:text="@string/btn_save_settings" android:layout_margin="0sp"
diff --git a/res/menu-v11/main.xml b/res/menu-v11/main.xml new file mode 100755 index 0000000..89b4d9e --- /dev/null +++ b/res/menu-v11/main.xml @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * Copyright (C) 2008 Esmertec AG. + * Copyright (C) 2008 The Android Open Source Project + * + * 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. + */ +--> +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:id="@+id/menu_start" + android:title="@string/menu_start" + android:icon="@drawable/menu_start" + android:showAsAction="ifRoom" + + /> + + <item android:id="@+id/menu_settings" + android:title="@string/menu_settings" + android:icon="@drawable/menu_settings" + android:showAsAction="always" + /> + + <item android:id="@+id/menu_verify" + android:title="@string/menu_verify" + android:icon="@drawable/ic_menu_check" + android:showAsAction="always" + + /> + + <item android:id="@+id/menu_about" + android:title="@string/menu_about" + android:icon="@drawable/ic_menu_about" + android:showAsAction="ifRoom" + + /> + + <item android:id="@+id/menu_wizard" + android:title="@string/menu_wizard" + android:icon="@drawable/ic_menu_goto" + android:showAsAction="ifRoom" + + /> + + <item android:id="@+id/menu_exit" + android:title="@string/menu_exit" + android:icon="@drawable/ic_menu_exit" + android:showAsAction="ifRoom" + + /> + +</menu> +<!-- + MenuItem mItem = null; + + mItemOnOff = menu.add(0, 1, Menu.NONE, getString(R.string.menu_start)); + mItemOnOff.setIcon(android.R.drawable.ic_media_play); + mItemOnOff.setAlphabeticShortcut('t'); + mItemOnOff.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); + + mItem = menu.add(0, 4, Menu.NONE, getString(R.string.menu_settings)); + mItem.setIcon(R.drawable.ic_menu_settings); + mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); + + mItem = menu.add(0, 7, Menu.NONE, getString(R.string.menu_verify)); + mItem.setIcon(R.drawable.ic_menu_check); + mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); + + mItem = menu.add(0,6, Menu.NONE, getString(R.string.menu_about)); + mItem.setIcon(R.drawable.ic_menu_about); + mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); + + mItem = menu.add(0, 3, Menu.NONE, getString(R.string.menu_wizard)); + mItem.setIcon(R.drawable.ic_menu_goto); + mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); + + mItem = menu.add(0, 8, Menu.NONE, getString(R.string.menu_exit)); + mItem.setIcon(R.drawable.ic_menu_exit); + mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); + --> diff --git a/res/menu-v13/main.xml b/res/menu-v13/main.xml new file mode 100755 index 0000000..89b4d9e --- /dev/null +++ b/res/menu-v13/main.xml @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* + * Copyright (C) 2008 Esmertec AG. + * Copyright (C) 2008 The Android Open Source Project + * + * 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. + */ +--> +<menu xmlns:android="http://schemas.android.com/apk/res/android"> + + <item android:id="@+id/menu_start" + android:title="@string/menu_start" + android:icon="@drawable/menu_start" + android:showAsAction="ifRoom" + + /> + + <item android:id="@+id/menu_settings" + android:title="@string/menu_settings" + android:icon="@drawable/menu_settings" + android:showAsAction="always" + /> + + <item android:id="@+id/menu_verify" + android:title="@string/menu_verify" + android:icon="@drawable/ic_menu_check" + android:showAsAction="always" + + /> + + <item android:id="@+id/menu_about" + android:title="@string/menu_about" + android:icon="@drawable/ic_menu_about" + android:showAsAction="ifRoom" + + /> + + <item android:id="@+id/menu_wizard" + android:title="@string/menu_wizard" + android:icon="@drawable/ic_menu_goto" + android:showAsAction="ifRoom" + + /> + + <item android:id="@+id/menu_exit" + android:title="@string/menu_exit" + android:icon="@drawable/ic_menu_exit" + android:showAsAction="ifRoom" + + /> + +</menu> +<!-- + MenuItem mItem = null; + + mItemOnOff = menu.add(0, 1, Menu.NONE, getString(R.string.menu_start)); + mItemOnOff.setIcon(android.R.drawable.ic_media_play); + mItemOnOff.setAlphabeticShortcut('t'); + mItemOnOff.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); + + mItem = menu.add(0, 4, Menu.NONE, getString(R.string.menu_settings)); + mItem.setIcon(R.drawable.ic_menu_settings); + mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); + + mItem = menu.add(0, 7, Menu.NONE, getString(R.string.menu_verify)); + mItem.setIcon(R.drawable.ic_menu_check); + mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS); + + mItem = menu.add(0,6, Menu.NONE, getString(R.string.menu_about)); + mItem.setIcon(R.drawable.ic_menu_about); + mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); + + mItem = menu.add(0, 3, Menu.NONE, getString(R.string.menu_wizard)); + mItem.setIcon(R.drawable.ic_menu_goto); + mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); + + mItem = menu.add(0, 8, Menu.NONE, getString(R.string.menu_exit)); + mItem.setIcon(R.drawable.ic_menu_exit); + mItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); + --> diff --git a/res/values/strings.xml b/res/values/strings.xml index 2e555c1..57a7fd9 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -41,7 +41,6 @@
<string name="menu_verify">Check</string> <string name="menu_exit">Exit</string> -<string name="powered_by">powered by the Tor Project</string> <string name="press_to_start">- long press to start -</string>
<string name="pref_trans_proxy_group">Transparent Proxying (Requires Root)</string> @@ -266,4 +265,6 @@ <string name="wizard_locale_title">Choose Language</string> <string name="wizard_locale_msg">Leave default or switch the current language</string>
+<string name="powered_by">powered by The Tor Project </string> +<string name="btn_save_settings">Save Settings</string> </resources>
tor-commits@lists.torproject.org