Update notification content

This commit is contained in:
Benoit Marty 2025-11-14 15:25:04 +01:00
parent 1d7d00e4bb
commit 017a259f1c
18 changed files with 15 additions and 16 deletions

View file

@ -360,14 +360,11 @@ class DefaultNotificationCreator(
notificationAccountParams: NotificationAccountParams,
): Notification {
val userId = notificationAccountParams.user.userId
val text = if (notificationAccountParams.showSessionId) {
// TODO i18n
"$userId will not receive notifications anymore."
} else {
// TODO i18n
"You will not receive notifications anymore."
}
val text = stringProvider.getString(R.string.notification_error_unified_push_unregistered_android)
return NotificationCompat.Builder(context, notificationChannels.getChannelIdForTest())
.setSubText(userId.value)
// The text is long and can be truncated so use BigTextStyle.
.setStyle(NotificationCompat.BigTextStyle().bigText(text))
.setContentTitle(stringProvider.getString(CommonStrings.dialog_title_warning))
.setContentText(text)
.configureWith(notificationAccountParams)
@ -479,7 +476,7 @@ class DefaultNotificationCreator(
.build()
).also {
it.conversationTitle = if (isThread) {
stringProvider.getString(CommonStrings.notification_thread_in_room, roomName)
stringProvider.getString(R.string.notification_thread_in_room, roomName)
} else {
roomName
}

View file

@ -42,6 +42,7 @@
<string name="notification_sender_me">"Já"</string>
<string name="notification_sender_mention_reply">"%1$s zmínil(a) nebo odpověděl(a)"</string>
<string name="notification_test_push_notification_content">"Prohlížíte si oznámení! Klikněte na mě!"</string>
<string name="notification_thread_in_room">"Vlákno v %1$s"</string>
<string name="notification_ticker_text_dm">"%1$s: %2$s"</string>
<string name="notification_ticker_text_group">"%1$s: %2$s %3$s"</string>
<plurals name="notification_unread_notified_messages">

View file

@ -38,6 +38,7 @@
<string name="notification_sender_me">"Mig"</string>
<string name="notification_sender_mention_reply">"%1$s nævnt eller besvaret"</string>
<string name="notification_test_push_notification_content">"Du ser notifikationen! Klik på mig!"</string>
<string name="notification_thread_in_room">"Tråd i %1$s"</string>
<string name="notification_ticker_text_dm">"%1$s: %2$s"</string>
<string name="notification_ticker_text_group">"%1$s: %2$s %3$s"</string>
<plurals name="notification_unread_notified_messages">

View file

@ -38,6 +38,7 @@
<string name="notification_sender_me">"Ich"</string>
<string name="notification_sender_mention_reply">"%1$s hat Dich erwähnt oder geantwortet"</string>
<string name="notification_test_push_notification_content">"Du siehst dir die Benachrichtigung an! Klicke hier!"</string>
<string name="notification_thread_in_room">"Thread in %1$s"</string>
<string name="notification_ticker_text_dm">"%1$s: %2$s"</string>
<string name="notification_ticker_text_group">"%1$s: %2$s %3$s"</string>
<plurals name="notification_unread_notified_messages">

View file

@ -38,6 +38,7 @@
<string name="notification_sender_me">"Mina"</string>
<string name="notification_sender_mention_reply">"%1$s mainis või vastas"</string>
<string name="notification_test_push_notification_content">"See ongi teavitus! Klõpsi mind!"</string>
<string name="notification_thread_in_room">"Jutulõng „%1$s“ jututoas"</string>
<string name="notification_ticker_text_dm">"%1$s: %2$s"</string>
<string name="notification_ticker_text_group">"%1$s: %2$s %3$s"</string>
<plurals name="notification_unread_notified_messages">

View file

@ -38,6 +38,7 @@
<string name="notification_sender_me">"Moi"</string>
<string name="notification_sender_mention_reply">"%1$s mentionné ou en réponse"</string>
<string name="notification_test_push_notification_content">"Vous êtes en train de voir la notification ! Cliquez-moi !"</string>
<string name="notification_thread_in_room">"Discussion dans %1$s"</string>
<string name="notification_ticker_text_dm">"%1$s : %2$s"</string>
<string name="notification_ticker_text_group">"%1$s : %2$s %3$s"</string>
<plurals name="notification_unread_notified_messages">

View file

@ -42,6 +42,7 @@
<string name="notification_sender_me">"Ja"</string>
<string name="notification_sender_mention_reply">"%1$s spomenul/a alebo odpovedal/a"</string>
<string name="notification_test_push_notification_content">"Prezeráte si oznámenie! Kliknite na mňa!"</string>
<string name="notification_thread_in_room">"Vlákno v %1$s"</string>
<string name="notification_ticker_text_dm">"%1$s: %2$s"</string>
<string name="notification_ticker_text_group">"%1$s: %2$s %3$s"</string>
<plurals name="notification_unread_notified_messages">

View file

@ -34,6 +34,7 @@
<string name="notification_sender_me">"我"</string>
<string name="notification_sender_mention_reply">"%1$s 提及或回覆"</string>
<string name="notification_test_push_notification_content">"您正在查看通知!點我!"</string>
<string name="notification_thread_in_room">"在 %1$s 的討論串"</string>
<string name="notification_ticker_text_dm">"%1$s%2$s"</string>
<string name="notification_ticker_text_group">"%1$s%2$s %3$s"</string>
<plurals name="notification_unread_notified_messages">

View file

@ -13,6 +13,7 @@
<item quantity="one">"%d notification"</item>
<item quantity="other">"%d notifications"</item>
</plurals>
<string name="notification_error_unified_push_unregistered_android">"The UnifiedPush notification distributor couldn\'t be registered, so you will not receive notifications anymore. Please check the notifications settings of the app and the status of the push distributor."</string>
<string name="notification_fallback_content">"You have new messages."</string>
<string name="notification_incoming_call">"📹 Incoming call"</string>
<string name="notification_inline_reply_failed">"** Failed to send - please open room"</string>
@ -38,6 +39,7 @@
<string name="notification_sender_me">"Me"</string>
<string name="notification_sender_mention_reply">"%1$s mentioned or replied"</string>
<string name="notification_test_push_notification_content">"You are viewing the notification! Click me!"</string>
<string name="notification_thread_in_room">"Thread in %1$s"</string>
<string name="notification_ticker_text_dm">"%1$s: %2$s"</string>
<string name="notification_ticker_text_group">"%1$s: %2$s %3$s"</string>
<plurals name="notification_unread_notified_messages">