Repository navigation
test: fail when a translation copies an English sentence - #156
Merged
Merged
Conversation
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]>
Contributor
There was a problem hiding this comment.
✅ 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.
gpt-6-luna | 𝕏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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_sentencesfails 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).HomeHeadingintoStrings.de-DE.jsonmakes it reportde-DE:HomeHeading.🤖 Generated with Claude Code