From 4a93551ef97cc116edf6ab50c2e8dec78ec8445a Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Mon, 16 Jun 2025 10:08:01 +0200 Subject: [PATCH] fix wrong plurals implementation - key was duplicated - kotlin handling of plurals was missing Signed-off-by: Marcel Hibbe --- app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt | 5 +++-- app/src/main/res/layout/remainder_to_delete_conversation.xml | 1 - app/src/main/res/values/strings.xml | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt index bffb3136c..5afe97ce0 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt @@ -1245,8 +1245,9 @@ class ChatActivity : val deleteNoticeText = binding.conversationDeleteNotice.findViewById(R.id.deletion_message) viewThemeUtils.material.themeCardView(binding.conversationDeleteNotice) - deleteNoticeText.text = String.format( - resources.getString(R.string.nc_conversation_auto_delete_notice), + deleteNoticeText.text = resources.getQuantityString( + R.plurals.nc_conversation_auto_delete_info, + retentionPeriod, retentionPeriod ) viewThemeUtils.material.colorMaterialButtonPrimaryTonal( diff --git a/app/src/main/res/layout/remainder_to_delete_conversation.xml b/app/src/main/res/layout/remainder_to_delete_conversation.xml index 02629b197..9c94b40d8 100644 --- a/app/src/main/res/layout/remainder_to_delete_conversation.xml +++ b/app/src/main/res/layout/remainder_to_delete_conversation.xml @@ -19,7 +19,6 @@ android:id="@+id/deletion_message" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/nc_conversation_auto_delete_notice" android:textSize="14sp" android:lineSpacingExtra="4dp" android:gravity="center" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 77b035605..222877ce6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -520,12 +520,11 @@ How to translate with transifex: Forward Reply Reply privately - Delete - + This conversation will be automatically deleted for everyone in %1$d day of no activity This conversation will be automatically deleted for everyone in %1$d days of no activity - This conversation will be automatically deleted for everyone in %1$d days of no activity + Delete Delete now Keep Message deleted successfully, but it might have been leaked to other services