Changing new messages separator text

This commit is contained in:
Leandro Borges Ferreira
2023-01-27 12:32:03 +01:00
parent 201f569c51
commit f94430b202
15 changed files with 17 additions and 84 deletions
@@ -81,7 +81,7 @@ abstract class Translations {
/// The text for showing the unread messages count
/// in the [StreamMessageListView]
String unreadMessagesSeparatorText(int unreadCount);
String unreadMessagesSeparatorText();
/// The label for "connected" in [StreamConnectionStatusBuilder]
String get connectedLabel;
@@ -797,12 +797,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() => 'New messages';
@override
String get enableFileAccessMessage => 'Please enable access to files'
@@ -24,9 +24,7 @@ class UnreadMessagesSeparator extends StatelessWidget {
child: Padding(
padding: const EdgeInsets.all(8),
child: Text(
context.translations.unreadMessagesSeparatorText(
unreadCount,
),
context.translations.unreadMessagesSeparatorText(),
textAlign: TextAlign.center,
style: StreamChannelHeaderTheme.of(context).subtitleStyle,
),
@@ -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() => 'New messages';
@override
String get enableFileAccessMessage => 'Enable file access to continue';
@@ -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() => 'Missatges nous';
@override
String get enableFileAccessMessage => "Habilita l'accés als fitxers"
@@ -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() => 'Neue Nachrichten';
@override
String get enableFileAccessMessage =>
@@ -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() => 'New messages';
@override
String get enableFileAccessMessage => 'Please enable access to files'
@@ -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() => 'Nuevos mensajes';
@override
String get enableFileAccessMessage => 'Habilite el acceso a los archivos'
@@ -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() => "Nouveaux messages";
@override
String get enableFileAccessMessage =>
@@ -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() => 'नए संदेश।';
@override
String get enableFileAccessMessage => 'कृपया फ़ाइलों तक पहुंच सक्षम करें ताकि'
@@ -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() => "Nouveaux messages";
@override
String get enableFileAccessMessage => "Per favore attiva l'accesso ai file"
@@ -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() => '新しいメッセージ。';
@override
String get enableFileAccessMessage =>
@@ -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() => '새 메시지.';
@override
String get enableFileAccessMessage => '친구와 공유할 수 있도록 파일에 대한 액세스를 허용하세요.';
@@ -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() => 'Nye meldinger.';
@override
String get couldNotReadBytesFromFileError =>
@@ -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() => "Novas mensagens";
@override
String get enableFileAccessMessage =>
@@ -195,7 +195,7 @@ void main() {
localizations.toggleMuteUnmuteUserQuestion(isMuted: true), isNotNull);
expect(localizations.toggleMuteUnmuteUserText(isMuted: true), isNotNull);
expect(localizations.viewLibrary, isNotNull);
expect(localizations.unreadMessagesSeparatorText(2), isNotNull);
expect(localizations.unreadMessagesSeparatorText(), isNotNull);
expect(localizations.enableFileAccessMessage, isNotNull);
expect(localizations.allowFileAccessMessage, isNotNull);
});