From 31f49a0816bdd6669916eaf346c0d5b2e2973e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud@savoirfairelinux.com> Date: Wed, 16 Dec 2015 16:46:46 -0500 Subject: [PATCH] i18n: translate preferences Tuleap: #18 Change-Id: I2f4c3ca2ced9fa07edce6346beb5eba7b1c2c65f --- .tx/config | 6 ++++++ .../cx/ring/client/ConversationActivity.java | 3 ++- .../app/src/main/res/values/strings.xml | 15 ++------------ .../src/main/res/values/strings_account.xml | 13 +----------- .../main/res/values/strings_preferences.xml | 12 +++++++++++ .../app/src/main/res/xml/preferences.xml | 20 +++++++++---------- 6 files changed, 33 insertions(+), 36 deletions(-) create mode 100644 ring-android/app/src/main/res/values/strings_preferences.xml diff --git a/.tx/config b/.tx/config index 233d79797..ea136e354 100644 --- a/.tx/config +++ b/.tx/config @@ -20,3 +20,9 @@ source_file = ring-android/app/src/main/res/values/strings_content_description.x source_lang = en type = ANDROID +[ring.android-preferences] +file_filter = ring-android/app/src/main/res/values-<lang>/strings_preferences.xml +source_file = ring-android/app/src/main/res/values/strings_preferences.xml +source_lang = en +type = ANDROID + diff --git a/ring-android/app/src/main/java/cx/ring/client/ConversationActivity.java b/ring-android/app/src/main/java/cx/ring/client/ConversationActivity.java index 8b5100f85..ff024cc1f 100644 --- a/ring-android/app/src/main/java/cx/ring/client/ConversationActivity.java +++ b/ring-android/app/src/main/java/cx/ring/client/ConversationActivity.java @@ -460,7 +460,8 @@ public class ConversationActivity extends AppCompatActivity { txtEntry.setVisibility(View.GONE); txtEntryRight.setVisibility(View.GONE); msgTxt.setText(""); - histTxt.setText((txt.call.isIncoming() ? "Incoming" : "Outgoing") + " call with " + txt.call.getNumber()); + histTxt.setText(txt.call.isIncoming() ? getString(R.string.notif_incoming_call_title, txt.call.getNumber()) + : getString(R.string.notif_outgoing_call_title, txt.call.getNumber())); histDetailTxt.setText(DateFormat.getDateTimeInstance().format(txt.call.getStartDate())); } diff --git a/ring-android/app/src/main/res/values/strings.xml b/ring-android/app/src/main/res/values/strings.xml index a4796ab87..bc5487dcb 100644 --- a/ring-android/app/src/main/res/values/strings.xml +++ b/ring-android/app/src/main/res/values/strings.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?><!-- -Copyright (C) 2004-2014 Savoir-Faire Linux Inc. +Copyright (C) 2004-2015 Savoir-faire Linux Inc. Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com> Author: Adrien BĂ©raud <adrien.beraud@savoirfairelinux.com> @@ -17,17 +17,6 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Additional permission under GNU GPL version 3 section 7: - -If you modify this program, or any covered work, by linking or -combining it with the OpenSSL project's OpenSSL library (or a -modified version of that library), containing parts covered by the -terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc. -grants you additional permission to convey the resulting work. -Corresponding Source for a non-source form of such a combination -shall include the source code for the parts of OpenSSL used as well -as that of the covered work. --> <resources> @@ -121,7 +110,7 @@ as that of the covered work. <string name="action_call_hold">Hold</string> <string name="action_call_hangup">Hang up</string> <string name="action_settings">Settings</string> - <string name="copyright">Copyright \u00A9 2004–2015 Savoir-Faire Linux Inc.</string> + <string name="copyright">Copyright \u00A9 2004–2016 Savoir-faire Linux Inc.</string> <string name="web_site">Website</string> <string name="help_gestures"> This view will help users with different interactions during calls. Different actions will be described; Long press, fling, swype etc.</string> <string name="send_message">Send message</string> diff --git a/ring-android/app/src/main/res/values/strings_account.xml b/ring-android/app/src/main/res/values/strings_account.xml index 1530db4fe..100f02066 100644 --- a/ring-android/app/src/main/res/values/strings_account.xml +++ b/ring-android/app/src/main/res/values/strings_account.xml @@ -1,5 +1,5 @@ <!-- -Copyright (C) 2004-2014 Savoir-Faire Linux Inc. +Copyright (C) 2004-2015 Savoir-faire Linux Inc. Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com> @@ -16,17 +16,6 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Additional permission under GNU GPL version 3 section 7: - -If you modify this program, or any covered work, by linking or -combining it with the OpenSSL project's OpenSSL library (or a -modified version of that library), containing parts covered by the -terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc. -grants you additional permission to convey the resulting work. -Corresponding Source for a non-source form of such a combination -shall include the source code for the parts of OpenSSL used as well -as that of the covered work. --> <resources> diff --git a/ring-android/app/src/main/res/values/strings_preferences.xml b/ring-android/app/src/main/res/values/strings_preferences.xml new file mode 100644 index 000000000..cab7c0100 --- /dev/null +++ b/ring-android/app/src/main/res/values/strings_preferences.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <string name="pref_category_network">Network</string> + <string name="pref_mobileData_title">Mobile data</string> + <string name="pref_mobileData_summary">Allow Ring on 3G/LTE networks additionally to Wi-Fi</string> + + <string name="pref_category_contacts">Contacts</string> + <string name="pref_systemContacts_title">Use system contacts</string> + <string name="pref_systemContacts_summary">Use system contacts to show caller details.</string> + +</resources> \ No newline at end of file diff --git a/ring-android/app/src/main/res/xml/preferences.xml b/ring-android/app/src/main/res/xml/preferences.xml index cc8be1ba0..abaed1cb2 100644 --- a/ring-android/app/src/main/res/xml/preferences.xml +++ b/ring-android/app/src/main/res/xml/preferences.xml @@ -1,22 +1,22 @@ <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> - <PreferenceCategory android:title="Network"> + <PreferenceCategory android:title="@string/pref_category_network"> <android.support.v14.preference.SwitchPreference - android:key="pref_mobileData" - android:title="Mobile data" - android:summary="Allow Ring on 3G/LTE networks additionally to Wi-Fi" android:defaultValue="false" - android:icon="@drawable/ic_perm_data_setting_black_24dp"/> + android:icon="@drawable/ic_perm_data_setting_black_24dp" + android:key="pref_mobileData" + android:summary="@string/pref_mobileData_summary" + android:title="@string/pref_mobileData_title" /> </PreferenceCategory> - <PreferenceCategory android:title="Contacts"> + <PreferenceCategory android:title="@string/pref_category_contacts"> <android.support.v14.preference.SwitchPreference - android:key="pref_systemContacts" - android:title="Use system contacts" - android:summary="Use system contacts to show caller details." android:defaultValue="true" - android:icon="@drawable/ic_group_black_24dp"/> + android:icon="@drawable/ic_group_black_24dp" + android:key="pref_systemContacts" + android:summary="@string/pref_systemContacts_summary" + android:title="@string/pref_systemContacts_title" /> </PreferenceCategory> -- GitLab