From 94f3c644eeceb73efabd9736b02f78df4f8407f4 Mon Sep 17 00:00:00 2001 From: Marcel Hibbe Date: Mon, 23 Nov 2026 10:22:42 +0100 Subject: [PATCH] fix(conv-list): Translate "You:" prefix of attachment previews The author prefix for own attachment, voice, location, poll and deck card messages in the conversation list was a hardcoded English "You:", so it stayed English regardless of the app language while text message previews were translated. Fixes #7083 Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marcel Hibbe --- .../nextcloud/talk/conversationlist/ui/ConversationListItem.kt | 3 ++- app/src/main/res/values/strings.xml | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/talk/conversationlist/ui/ConversationListItem.kt b/app/src/main/java/com/nextcloud/talk/conversationlist/ui/ConversationListItem.kt index d270df13b33..0462a3b41cb 100644 --- a/app/src/main/java/com/nextcloud/talk/conversationlist/ui/ConversationListItem.kt +++ b/app/src/main/java/com/nextcloud/talk/conversationlist/ui/ConversationListItem.kt @@ -863,9 +863,10 @@ private fun mediaMessageLabels(msgType: ChatMessage.MessageType): Pair else -> R.string.nc_sent_a_gif_you to R.string.nc_sent_a_gif } +@Composable private fun authorPrefix(chatMessage: ChatMessage, currentUser: User): String = if (chatMessage.actorId == currentUser.userId) { - "You:" + stringResource(R.string.nc_formatted_message_you_prefix) } else { val name = chatMessage.actorDisplayName if (!name.isNullOrBlank()) "$name:" else "" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 68f4bdd2d51..eadae2d1325 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -550,6 +550,8 @@ How to translate with transifex: Cancel reply You: %1$s + + You: Draft: %1$s Message sent Message read