Skip to content

test: fail when a translation copies an English sentence - #156

Merged
lippdev merged 1 commit into
mainfrom
test/untranslated-strings
Oct 19, 2026
Merged

lippdev merged 1 commit into
mainfrom
test/untranslated-strings

Conversation

@lippdev

@lippdev lippdev commented Oct 19, 2026

Copy link
Copy Markdown
Owner

Why

The localization tests already check that every catalog has the English keys and the same {0} placeholders, but a value left in English still passed. That is how the minimize-to-tray strings shipped untranslated in German, French and Russian until a follow-up commit in #151.

What

Translations_do_not_copy_english_sentences fails when a non-English catalog holds exactly the English value of a phrase with three or more words. Single words that read the same in many languages (Volume, Desktop, FPS, Session) are fine, and product names (Brand, ShortcutName, LaunchSteam, FpsOverlayShowApi) are allowed explicitly.

The failure lists every offender as language:key, e.g. Untranslated (same as en-US): de-DE:HomeHeading.

Testing

  • dotnet test tests/ConsoleMode.Tests/ConsoleMode.Tests.csproj: 412 passed (the current catalogs are clean).
  • Checked that it fails: pasting the English HomeHeading into Strings.de-DE.json makes it report de-DE:HomeHeading.
  • Test-only change, no app code touched; the Windows build is left to CI.

🤖 Generated with Claude Code

Key parity and placeholders were already checked, but a value pasted in English
(as the minimize-to-tray strings were before #151) passed. Phrases of three or
more words that match en-US now fail; single words and product names are allowed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes This review covers the localization regression test added in tests/ConsoleMode.Tests/LocalizationTests.cs.

  • Copied-string detection: Checks each non-English catalog for exact matches to en-US phrases with at least three letter-words, excluding the listed product and shortcut names.

Pullfrog  | View workflow run | Using gpt-6-luna | 𝕏

@lippdev
lippdev merged commit f3c260d into main Oct 19, 2026
5 checks passed
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.

1 participant