diff --git a/packages/stream_chat_flutter/lib/src/localization/translations.dart b/packages/stream_chat_flutter/lib/src/localization/translations.dart index b7436d4b..71254e73 100644 --- a/packages/stream_chat_flutter/lib/src/localization/translations.dart +++ b/packages/stream_chat_flutter/lib/src/localization/translations.dart @@ -81,7 +81,10 @@ abstract class Translations { /// The text for showing the unread messages count /// in the [StreamMessageListView] - String unreadMessagesSeparatorText(int unreadCount); + String unreadMessagesSeparatorText( + @Deprecated('unreadCount is not used anymore and will be removed ') + int unreadCount, + ); /// The label for "connected" in [StreamConnectionStatusBuilder] String get connectedLabel; @@ -797,12 +800,7 @@ Attachment limit exceeded: it's not possible to add more than $limit attachments String get linkDisabledError => 'Links are disabled'; @override - String unreadMessagesSeparatorText(int unreadCount) { - if (unreadCount == 1) { - return '1 unread message'; - } - return '$unreadCount unread messages'; - } + String unreadMessagesSeparatorText(int unreadCount) => 'New messages'; @override String get enableFileAccessMessage => 'Please enable access to files' diff --git a/packages/stream_chat_flutter/lib/src/message_list_view/unread_messages_separator.dart b/packages/stream_chat_flutter/lib/src/message_list_view/unread_messages_separator.dart index 5449cdc9..57e9257c 100644 --- a/packages/stream_chat_flutter/lib/src/message_list_view/unread_messages_separator.dart +++ b/packages/stream_chat_flutter/lib/src/message_list_view/unread_messages_separator.dart @@ -24,9 +24,7 @@ class UnreadMessagesSeparator extends StatelessWidget { child: Padding( padding: const EdgeInsets.all(8), child: Text( - context.translations.unreadMessagesSeparatorText( - unreadCount, - ), + context.translations.unreadMessagesSeparatorText(unreadCount), textAlign: TextAlign.center, style: StreamChannelHeaderTheme.of(context).subtitleStyle, ), diff --git a/packages/stream_chat_localizations/CHANGELOG.md b/packages/stream_chat_localizations/CHANGELOG.md index 87947c78..20fd8458 100644 --- a/packages/stream_chat_localizations/CHANGELOG.md +++ b/packages/stream_chat_localizations/CHANGELOG.md @@ -4,6 +4,7 @@ * Added support for [Catalan](https://github.com/GetStream/stream-chat-flutter/blob/master/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ca.dart) locale. * Added translations for new `noPhotoOrVideoLabel` label. +* Changed text in New messages separator. Now is doesn't count the new messages and only shows "New messages". All the translations were updated. 🔄 Changed diff --git a/packages/stream_chat_localizations/example/lib/add_new_lang.dart b/packages/stream_chat_localizations/example/lib/add_new_lang.dart index f71d4e1b..3f3b5bdb 100644 --- a/packages/stream_chat_localizations/example/lib/add_new_lang.dart +++ b/packages/stream_chat_localizations/example/lib/add_new_lang.dart @@ -459,12 +459,7 @@ class NnStreamChatLocalizations extends GlobalStreamChatLocalizations { String get viewLibrary => 'View library'; @override - String unreadMessagesSeparatorText(int unreadCount) { - if (unreadCount == 1) { - return '1 unread message'; - } - return '$unreadCount unread messages'; - } + String unreadMessagesSeparatorText(int unreadCount) => 'New messages'; @override String get enableFileAccessMessage => 'Enable file access to continue'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ca.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ca.dart index 58970090..3c471e05 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ca.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ca.dart @@ -438,12 +438,7 @@ class StreamChatLocalizationsCa extends GlobalStreamChatLocalizations { String get linkDisabledError => 'Els enllaços estan deshabilitats'; @override - String unreadMessagesSeparatorText(int unreadCount) { - if (unreadCount == 1) { - return '1 missatge no llegit'; - } - return '$unreadCount missatges no llegits'; - } + String unreadMessagesSeparatorText(int unreadCount) => 'Missatges nous'; @override String get enableFileAccessMessage => "Habilita l'accés als fitxers" diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_de.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_de.dart index 88d7c596..df2a7766 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_de.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_de.dart @@ -15,7 +15,7 @@ class StreamChatLocalizationsDe extends GlobalStreamChatLocalizations { String get noUsersLabel => 'Derzeit gibt es keine User'; @override - String get noPhotoOrVideoLabel => 'Es gibt keine Foto oder Video'; + String get noPhotoOrVideoLabel => 'Es gibt kein Foto oder Video'; @override String get retryLabel => 'Erneut versuchen'; @@ -431,12 +431,7 @@ class StreamChatLocalizationsDe extends GlobalStreamChatLocalizations { String get viewLibrary => 'Bibliothek öffnen'; @override - String unreadMessagesSeparatorText(int unreadCount) { - if (unreadCount == 1) { - return '1 ungelesene Nachricht'; - } - return '$unreadCount ungelesene Nachrichten'; - } + String unreadMessagesSeparatorText(int unreadCount) => 'Neue Nachrichten'; @override String get enableFileAccessMessage => diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_en.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_en.dart index 70bab06d..c55bbf49 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_en.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_en.dart @@ -435,12 +435,7 @@ class StreamChatLocalizationsEn extends GlobalStreamChatLocalizations { String get viewLibrary => 'View library'; @override - String unreadMessagesSeparatorText(int unreadCount) { - if (unreadCount == 1) { - return '1 unread message'; - } - return '$unreadCount unread messages'; - } + String unreadMessagesSeparatorText(int unreadCount) => 'New messages'; @override String get enableFileAccessMessage => 'Please enable access to files' diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart index 1e77071e..107e2616 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_es.dart @@ -440,12 +440,7 @@ No es posible añadir más de $limit archivos adjuntos String get linkDisabledError => 'Los enlaces están deshabilitados'; @override - String unreadMessagesSeparatorText(int unreadCount) { - if (unreadCount == 1) { - return '1 mensaje no leído'; - } - return '$unreadCount mensajes no leídos'; - } + String unreadMessagesSeparatorText(int unreadCount) => 'Nuevos mensajes'; @override String get enableFileAccessMessage => 'Habilite el acceso a los archivos' diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart index 75f5cd4f..8b501184 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_fr.dart @@ -439,12 +439,7 @@ Limite de pièces jointes dépassée : il n'est pas possible d'ajouter plus de $ String get linkDisabledError => 'Les liens sont désactivés'; @override - String unreadMessagesSeparatorText(int unreadCount) { - if (unreadCount == 1) { - return '1 message non lu'; - } - return '$unreadCount messages non lus'; - } + String unreadMessagesSeparatorText(int unreadCount) => 'Nouveaux messages'; @override String get enableFileAccessMessage => diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart index c00ab269..4f27717a 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_hi.dart @@ -433,12 +433,7 @@ class StreamChatLocalizationsHi extends GlobalStreamChatLocalizations { String get linkDisabledError => 'लिंक भेजना प्रतिबंधित'; @override - String unreadMessagesSeparatorText(int unreadCount) { - if (unreadCount == 1) { - return '1 अपठित संदेश'; - } - return '$unreadCount अपठित संदेश'; - } + String unreadMessagesSeparatorText(int unreadCount) => 'नए संदेश।'; @override String get enableFileAccessMessage => 'कृपया फ़ाइलों तक पहुंच सक्षम करें ताकि' diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart index b79e2a6d..b407629d 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_it.dart @@ -442,12 +442,7 @@ Attenzione: il limite massimo di $limit file è stato superato. String get linkDisabledError => 'I links sono disattivati'; @override - String unreadMessagesSeparatorText(int unreadCount) { - if (unreadCount == 1) { - return '1 messaggio non letto'; - } - return '$unreadCount messaggi non letti'; - } + String unreadMessagesSeparatorText(int unreadCount) => 'Nouveaux messages'; @override String get enableFileAccessMessage => "Per favore attiva l'accesso ai file" diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart index f26d8f85..26a5e8b3 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ja.dart @@ -418,12 +418,7 @@ class StreamChatLocalizationsJa extends GlobalStreamChatLocalizations { String get linkDisabledError => 'リンクが無効になっています'; @override - String unreadMessagesSeparatorText(int unreadCount) { - if (unreadCount == 1) { - return '未読メッセージ1通'; - } - return '$unreadCountつの未読メッセージ'; - } + String unreadMessagesSeparatorText(int unreadCount) => '新しいメッセージ。'; @override String get enableFileAccessMessage => diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart index 7dac84a5..7b907584 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_ko.dart @@ -419,12 +419,7 @@ class StreamChatLocalizationsKo extends GlobalStreamChatLocalizations { String get linkDisabledError => '링크가 비활성화되었습니다.'; @override - String unreadMessagesSeparatorText(int unreadCount) { - if (unreadCount == 1) { - return '읽지 않은 메시지 1개'; - } - return '읽지 않은 메시지 $unreadCount개'; - } + String unreadMessagesSeparatorText(int unreadCount) => '새 메시지.'; @override String get enableFileAccessMessage => '친구와 공유할 수 있도록 파일에 대한 액세스를 허용하세요.'; diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_no.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_no.dart index 4a18fd6b..88350979 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_no.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_no.dart @@ -383,12 +383,7 @@ class StreamChatLocalizationsNo extends GlobalStreamChatLocalizations { String get viewLibrary => 'Se bibliotek'; @override - String unreadMessagesSeparatorText(int unreadCount) { - if (unreadCount == 1) { - return '1 ulest melding'; - } - return '$unreadCount uleste meldinger'; - } + String unreadMessagesSeparatorText(int unreadCount) => 'Nye meldinger.'; @override String get couldNotReadBytesFromFileError => diff --git a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_pt.dart b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_pt.dart index 3613e91c..874eb118 100644 --- a/packages/stream_chat_localizations/lib/src/stream_chat_localizations_pt.dart +++ b/packages/stream_chat_localizations/lib/src/stream_chat_localizations_pt.dart @@ -438,12 +438,7 @@ Não é possível adicionar mais de $limit arquivos de uma vez String get viewLibrary => 'Ver biblioteca'; @override - String unreadMessagesSeparatorText(int unreadCount) { - if (unreadCount == 1) { - return '1 mensagem não lida'; - } - return '$unreadCount mensagens não lidas'; - } + String unreadMessagesSeparatorText(int unreadCount) => 'Novas mensagens'; @override String get enableFileAccessMessage =>