Skip to content

fix(localization): translate the German mute strings and name both mute states - #3107

Open
RaphaelFakhri wants to merge 2 commits into
GetStream:masterfrom
RaphaelFakhri:fix/de-mute-translations
Open

RaphaelFakhri wants to merge 2 commits into
GetStream:masterfrom
RaphaelFakhri:fix/de-mute-translations

Conversation

@RaphaelFakhri

@RaphaelFakhri RaphaelFakhri commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Submit a pull request

Linear: FLU-

Github Issue: #3106

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request

The German translations returned Dutch text for the mute strings and for couldNotReadBytesFromFileError. toggleMuteUnmuteUserText also ignored isMuted. It labels the mute action in the message actions menu, so a German user saw Gebruiker dempen for both muting and unmuting someone.

This PR replaces those strings with German. The wording follows the existing German strings: the formal "Sie" questions, stummgeschaltet, and Benutzer blockieren / Blockierung aufheben. toggleMuteUnmuteUserText now returns Stummschaltung aufheben when the user is muted and Benutzer stummschalten otherwise.

A new test in translations_test.dart checks, for every supported locale, that each mute and block toggle returns different text for its two states. Before the fix, it fails for de on toggleMuteUnmuteUserText.

To test:

cd packages/stream_chat_localizations
flutter test test/translations_test.dart

Screenshots / Videos

Before After
Message actions on another user's message in de: Gebruiker dempen (also when the user is already muted) Benutzer stummschalten, or Stummschaltung aufheben when the user is muted

Summary by CodeRabbit

  • Bug Fixes
    • Corrected German translations for file-read errors, mute and unmute actions, and group or user confirmation prompts.
    • German mute actions now display “unmute” when the user is already muted.
  • Documentation
    • Added an upcoming changelog entry describing the German localization fixes.

@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8673c6c2-5940-4a2e-9db5-07f93aa7034c
Commits

Reviewing files that changed from the base of the PR and between d0ec185 and 1f08d16.

Files selected for processing: 2
  • packages/stream_chat_localizations/CHANGELOG.md
  • packages/stream_chat_localizations/test/translations_test.dart
Files skipped from review as they are similar to previous changes: 2
  • packages/stream_chat_localizations/CHANGELOG.md
  • packages/stream_chat_localizations/test/translations_test.dart

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

The German localization now uses German text for the file-read error and mute-related actions and prompts. The user mute action returns an unmute label when the user is muted. Tests compare mute and block toggle text across supported languages.

Changes: Mute localization

Layer / File(s) Summary
German mute strings and toggle validation
packages/stream_chat_localizations/lib/src/stream_chat_localizations_de.dart, packages/stream_chat_localizations/test/translations_test.dart, packages/stream_chat_localizations/CHANGELOG.md
The German localization now uses German text for the file-read error and mute-related actions and prompts. The user mute action returns an unmute label when muted. Tests check that both variants differ across supported languages. The changelog records the fixes.

Priority: Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

Suggested reviewers: velikovpetar

Merge Risk: Minimal · up to 1f08d

The German translations correctly distinguish mute and unmute actions, with regression assertions covering every supported language. The change is ready to merge subject to normal test checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main changes: translating the German mute strings and correcting the mute-state labels.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.44%. Comparing base (018b487) to head (1f08d16).
⚠️ Report is 13 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3107      +/-   ##
==========================================
+ Coverage   80.28%   80.44%   +0.16%     
==========================================
  Files         455      455              
  Lines       29614    29637      +23     
==========================================
+ Hits        23775    23842      +67     
+ Misses       5839     5795      -44     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@xsahil03x xsahil03x left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. The German strings read well and follow the file's existing wording (the formal "Sind Sie sicher, dass Sie … wollen?" form, stummgeschaltet, and the same short form as Blockierung aufheben / Benutzer blockieren). The new test would have caught the bug on master.

Approving. The two inline comments are nits: the changelog line should say the fix is German-only, and the test should use the same variable name as the rest of the file.

Before we can merge, please sign the CLA and tick the box in the description.


🐞 Fixed

- Fixed the German mute strings showing Dutch text, and the message action showing "mute" for a user who is already muted.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As written, the second half of this line sounds like it applies to every language, but only German was affected. Suggest naming German in both halves:

Suggested change
- 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in 1f08d16.

Comment on lines +576 to +606
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');
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the rest of this file calls the loaded object localizations, so l stands out. I've also reworded the test name so it states the expected result. That way a failure in the flutter test output explains itself, which the testing guide asks for.

Suggested change
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');
}
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': (
localizations.toggleMuteUnmuteAction(isMuted: true),
localizations.toggleMuteUnmuteAction(isMuted: false),
),
'toggleMuteUnmuteGroupQuestion': (
localizations.toggleMuteUnmuteGroupQuestion(isMuted: true),
localizations.toggleMuteUnmuteGroupQuestion(isMuted: false),
),
'toggleMuteUnmuteGroupText': (
localizations.toggleMuteUnmuteGroupText(isMuted: true),
localizations.toggleMuteUnmuteGroupText(isMuted: false),
),
'toggleMuteUnmuteUserQuestion': (
localizations.toggleMuteUnmuteUserQuestion(isMuted: true),
localizations.toggleMuteUnmuteUserQuestion(isMuted: false),
),
'toggleMuteUnmuteUserText': (
localizations.toggleMuteUnmuteUserText(isMuted: true),
localizations.toggleMuteUnmuteUserText(isMuted: false),
),
'toggleBlockUnblockUserText': (
localizations.toggleBlockUnblockUserText(isBlocked: true),
localizations.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');
}
});

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied in 1f08d16.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

German mute strings are in Dutch, and "mute user" never changes to "unmute"

2 participants