From c3b3148a3fb1c1b55377b5d2134b0f150d8999da Mon Sep 17 00:00:00 2001 From: Arne Date: Fri, 29 Nov 2024 16:53:50 +0100 Subject: [PATCH] Add further strings --- .../siacs/conversations/ui/ConversationsActivity.java | 10 +++++----- .../conversations/ui/StartConversationActivity.java | 10 +++++----- src/main/res/layout/dialog_enter_jid.xml | 2 +- src/main/res/values/arrays.xml | 2 -- src/main/res/values/strings.xml | 9 +++++++++ src/main/res/xml/preferences_interface.xml | 2 +- 6 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java index 5a44dab41..8a4758305 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationsActivity.java @@ -807,9 +807,9 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio if (offered > 0) return false; getPreferences().edit().putInt("default_stickers_offered", 1).apply(); - AlertDialog.Builder builder = new AlertDialog.Builder(this); - builder.setTitle("Download Stickers?"); - builder.setMessage("Would you like to download some default sticker packs?"); + MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this); + builder.setTitle(getString(R.string.download_stickers_title)); + builder.setMessage(getString(R.string.download_stickers_text)); builder.setPositiveButton(R.string.yes, (dialog, which) -> { if (hasStoragePermission(REQUEST_DOWNLOAD_STICKERS)) { downloadStickers(); @@ -848,8 +848,8 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio if (fromPrefs.contains("UPGRADE")) return false; - AlertDialog.Builder builder = new AlertDialog.Builder(this); - builder.setTitle("Dialler Integration"); + MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(this); + builder.setTitle(getString(R.string.dialler_integration_title)); builder.setMessage("monocles Android is able to integrate with your system's dialler app to allow dialling calls via your configured gateway " + String.join(", ", pstnGateways) + ".\n\nEnabling this integration will require granting microphone permission to the app. Would you like to enable it now?"); builder.setPositiveButton(R.string.yes, (dialog, which) -> { final String[] permissions; diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java index d6d9b5bb8..8f0330009 100644 --- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java @@ -731,9 +731,9 @@ public class StartConversationActivity extends XmppActivity ft.addToBackStack(null); EnterJidDialog dialog = EnterJidDialog.newInstance( mActivatedAccounts, - "Start Conversation", - getString(R.string.message), - "Call", + getString(R.string.start_chat), + getString(R.string.write), + getString(R.string.call), prefilledJid, invite == null ? null : invite.account, invite == null || !invite.hasFingerprints(), @@ -900,8 +900,8 @@ public class StartConversationActivity extends XmppActivity return; } if (binding.startConversationViewPager.getCurrentItem() == 0) { - mSearchEditText.setHint("Search chats"); - mSearchEditText.setContentDescription("Search chats"); + mSearchEditText.setHint(getString(R.string.search_chats)); + mSearchEditText.setContentDescription(getString(R.string.search_chats)); } else { mSearchEditText.setHint(R.string.search_group_chats); mSearchEditText.setContentDescription(getString(R.string.search_group_chats)); diff --git a/src/main/res/layout/dialog_enter_jid.xml b/src/main/res/layout/dialog_enter_jid.xml index 48eacea89..a1a45e31c 100644 --- a/src/main/res/layout/dialog_enter_jid.xml +++ b/src/main/res/layout/dialog_enter_jid.xml @@ -49,6 +49,6 @@ android:layout_height="wrap_content" android:layout_marginTop="2dp" android:checked="true" - android:text="Save as Contact / Bookmark"/> + android:text="@string/save_as_contact_bookmark"/> diff --git a/src/main/res/values/arrays.xml b/src/main/res/values/arrays.xml index 0d53be7f8..266e4db5b 100644 --- a/src/main/res/values/arrays.xml +++ b/src/main/res/values/arrays.xml @@ -151,6 +151,4 @@ mpeg4 3gpp - Suspected SPAM - Chats from strangers diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 050ffd388..b7d31a019 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -1362,4 +1362,13 @@ Reinstall app and load chat backup New message Fix + Download stickers? + Would you like to download some default sticker packs? + Dialler integration + Call + Write + Search chats + Save as contact / bookmark + Suspected SPAM + Chats from strangers \ No newline at end of file diff --git a/src/main/res/xml/preferences_interface.xml b/src/main/res/xml/preferences_interface.xml index 1a4bbbcb0..2b5b1d46e 100644 --- a/src/main/res/xml/preferences_interface.xml +++ b/src/main/res/xml/preferences_interface.xml @@ -1,7 +1,7 @@ - +