From d0ec1851c661a465f5a23237aa8e7c8b8d08c43f Mon Sep 17 00:00:00 2001 From: Raphael Fakhri <153192858+RaphaelFakhri@users.noreply.github.com> Date: Sat, 24 Oct 2026 15:52:40 +0000 Subject: [PATCH 1/2] fix(localization): translate the German mute strings and name both mute states --- .../stream_chat_localizations/CHANGELOG.md | 6 ++++ .../lib/src/stream_chat_localizations_de.dart | 21 +++++------ .../test/translations_test.dart | 35 +++++++++++++++++++ 3 files changed, 52 insertions(+), 10 deletions(-) diff --git a/packages/stream_chat_localizations/CHANGELOG.md b/packages/stream_chat_localizations/CHANGELOG.md index a50700f651..e9a805227b 100644 --- a/packages/stream_chat_localizations/CHANGELOG.md +++ b/packages/stream_chat_localizations/CHANGELOG.md @@ -1,3 +1,9 @@ +## Upcoming + +🐞 Fixed + +- Fixed the German mute strings showing Dutch text, and the message action showing "mute" for a user who is already muted. + ## 10.6.0 - Updated `stream_chat_flutter` dependency to [`10.6.0`](https://pub.dev/packages/stream_chat_flutter/changelog). 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 9227465dd3..114538603e 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 @@ -434,7 +434,7 @@ class StreamChatLocalizationsDe extends GlobalStreamChatLocalizations { String get sendMessagePermissionError => 'Sie sind nicht berechtigt Nachrichten zu senden'; @override - String get couldNotReadBytesFromFileError => 'Kan bytes niet uit bestand lezen.'; + String get couldNotReadBytesFromFileError => 'Bytes konnten nicht aus der Datei gelesen werden.'; @override String get downloadLabel => 'Downloaden'; @@ -442,42 +442,43 @@ class StreamChatLocalizationsDe extends GlobalStreamChatLocalizations { @override String toggleMuteUnmuteAction({required bool isMuted}) { if (isMuted) { - return 'UNMUTE'; + return 'STUMMSCHALTUNG AUFHEBEN'; } else { - return 'STOM'; + return 'STUMMSCHALTEN'; } } @override String toggleMuteUnmuteGroupQuestion({required bool isMuted}) { if (isMuted) { - return 'Weet je zeker dat je het dempen van deze groep wilt opheffen?'; + return 'Sind Sie sicher, dass Sie die Stummschaltung dieser Gruppe aufheben wollen?'; } else { - return 'Weet je zeker dat je deze groep wilt dempen?'; + return 'Sind Sie sicher, dass Sie diese Gruppe stummschalten wollen?'; } } @override String toggleMuteUnmuteGroupText({required bool isMuted}) { if (isMuted) { - return 'Dempen groep opheffen'; + return 'Stummschaltung der Gruppe aufheben'; } else { - return 'Groep dempen'; + return 'Gruppe stummschalten'; } } @override String toggleMuteUnmuteUserQuestion({required bool isMuted}) { if (isMuted) { - return '''Weet je zeker dat je het dempen van deze gebruiker wilt opheffen?'''; + return 'Sind Sie sicher, dass Sie die Stummschaltung dieses Benutzers aufheben wollen?'; } else { - return 'Weet u zeker dat u deze gebruiker wilt dempen?'; + return 'Sind Sie sicher, dass Sie diesen Benutzer stummschalten wollen?'; } } @override String toggleMuteUnmuteUserText({required bool isMuted}) { - return 'Gebruiker dempen'; + if (isMuted) return 'Stummschaltung aufheben'; + return 'Benutzer stummschalten'; } @override diff --git a/packages/stream_chat_localizations/test/translations_test.dart b/packages/stream_chat_localizations/test/translations_test.dart index 9bcbc082f2..5151666c19 100644 --- a/packages/stream_chat_localizations/test/translations_test.dart +++ b/packages/stream_chat_localizations/test/translations_test.dart @@ -572,6 +572,41 @@ void main() { } } + for (final language in kStreamChatSupportedLanguages) { + test('mute and block toggles name both states in $language', () async { + final l = await GlobalStreamChatLocalizations.delegate.load(Locale(language)); + + // Each toggle labels an action that flips state, so its two strings must differ. + final toggles = { + 'toggleMuteUnmuteAction': (l.toggleMuteUnmuteAction(isMuted: true), l.toggleMuteUnmuteAction(isMuted: false)), + 'toggleMuteUnmuteGroupQuestion': ( + l.toggleMuteUnmuteGroupQuestion(isMuted: true), + l.toggleMuteUnmuteGroupQuestion(isMuted: false), + ), + 'toggleMuteUnmuteGroupText': ( + l.toggleMuteUnmuteGroupText(isMuted: true), + l.toggleMuteUnmuteGroupText(isMuted: false), + ), + 'toggleMuteUnmuteUserQuestion': ( + l.toggleMuteUnmuteUserQuestion(isMuted: true), + l.toggleMuteUnmuteUserQuestion(isMuted: false), + ), + 'toggleMuteUnmuteUserText': ( + l.toggleMuteUnmuteUserText(isMuted: true), + l.toggleMuteUnmuteUserText(isMuted: false), + ), + 'toggleBlockUnblockUserText': ( + l.toggleBlockUnblockUserText(isBlocked: true), + l.toggleBlockUnblockUserText(isBlocked: false), + ), + }; + + for (final MapEntry(key: name, value: (on, off)) in toggles.entries) { + expect(on, isNot(off), reason: '$name should differ between its two states'); + } + }); + } + for (final language in kStreamChatSupportedLanguages) { test('every translation language has a display name in $language', () async { final localizations = await GlobalStreamChatLocalizations.delegate.load(Locale(language)); From 1f08d16bacd2094a1cb7c9c342ef695b53e5ef36 Mon Sep 17 00:00:00 2001 From: Raphael Fakhri <153192858+RaphaelFakhri@users.noreply.github.com> Date: Wed, 28 Oct 2026 14:37:23 +0000 Subject: [PATCH 2/2] Name German in the changelog entry and rename the toggle test --- .../stream_chat_localizations/CHANGELOG.md | 2 +- .../test/translations_test.dart | 29 ++++++++++--------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/packages/stream_chat_localizations/CHANGELOG.md b/packages/stream_chat_localizations/CHANGELOG.md index e9a805227b..fc1a969745 100644 --- a/packages/stream_chat_localizations/CHANGELOG.md +++ b/packages/stream_chat_localizations/CHANGELOG.md @@ -2,7 +2,7 @@ 🐞 Fixed -- Fixed the German mute strings showing Dutch text, and the message action showing "mute" for a user who is already muted. +- Fixed German mute strings showing Dutch text, and the German "Mute user" action not switching to "unmute" for an already-muted user. ## 10.6.0 diff --git a/packages/stream_chat_localizations/test/translations_test.dart b/packages/stream_chat_localizations/test/translations_test.dart index 5151666c19..253f105ff7 100644 --- a/packages/stream_chat_localizations/test/translations_test.dart +++ b/packages/stream_chat_localizations/test/translations_test.dart @@ -573,31 +573,34 @@ void main() { } for (final language in kStreamChatSupportedLanguages) { - test('mute and block toggles name both states in $language', () async { - final l = await GlobalStreamChatLocalizations.delegate.load(Locale(language)); + test('mute and block toggles return different text for each state in $language', () async { + final localizations = await GlobalStreamChatLocalizations.delegate.load(Locale(language)); // Each toggle labels an action that flips state, so its two strings must differ. final toggles = { - 'toggleMuteUnmuteAction': (l.toggleMuteUnmuteAction(isMuted: true), l.toggleMuteUnmuteAction(isMuted: false)), + 'toggleMuteUnmuteAction': ( + localizations.toggleMuteUnmuteAction(isMuted: true), + localizations.toggleMuteUnmuteAction(isMuted: false), + ), 'toggleMuteUnmuteGroupQuestion': ( - l.toggleMuteUnmuteGroupQuestion(isMuted: true), - l.toggleMuteUnmuteGroupQuestion(isMuted: false), + localizations.toggleMuteUnmuteGroupQuestion(isMuted: true), + localizations.toggleMuteUnmuteGroupQuestion(isMuted: false), ), 'toggleMuteUnmuteGroupText': ( - l.toggleMuteUnmuteGroupText(isMuted: true), - l.toggleMuteUnmuteGroupText(isMuted: false), + localizations.toggleMuteUnmuteGroupText(isMuted: true), + localizations.toggleMuteUnmuteGroupText(isMuted: false), ), 'toggleMuteUnmuteUserQuestion': ( - l.toggleMuteUnmuteUserQuestion(isMuted: true), - l.toggleMuteUnmuteUserQuestion(isMuted: false), + localizations.toggleMuteUnmuteUserQuestion(isMuted: true), + localizations.toggleMuteUnmuteUserQuestion(isMuted: false), ), 'toggleMuteUnmuteUserText': ( - l.toggleMuteUnmuteUserText(isMuted: true), - l.toggleMuteUnmuteUserText(isMuted: false), + localizations.toggleMuteUnmuteUserText(isMuted: true), + localizations.toggleMuteUnmuteUserText(isMuted: false), ), 'toggleBlockUnblockUserText': ( - l.toggleBlockUnblockUserText(isBlocked: true), - l.toggleBlockUnblockUserText(isBlocked: false), + localizations.toggleBlockUnblockUserText(isBlocked: true), + localizations.toggleBlockUnblockUserText(isBlocked: false), ), };