Repository navigation
fix(game): keep a non-breaking space before ? ! : ; in the French copy - #356
Merged
Merged
Conversation
- swap the plain space before ? ! : ; and inside « » for U+00A0 in the fr locale files, so a mark never wraps alone onto a new line - add a unit test that scans every fr string and fails on a plain space there
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.
What and why
French sets
? ! : ;and the inside of « » apart with a space. With a plain space the mark can wrap alone onto the next line (: com…at the start of a line on a 320 px phone). This swaps those spaces for U+00A0 in every fr locale string (109 spaces across bots, common, game, online).Only space characters change: no wording edit, en/de/es untouched. A new unit test scans every fr string and fails on a plain space before
? ! : ;, after « or before », so new copy cannot regress.How to verify
pnpm --filter @repo/game exec vitest run src/i18n/fr-typography.test.tsgit diff -U0shows each removed line equal to its added line once U+00A0 is read as a space./fr/rulesand/fr/strategyat 320 px: no line starts with?,!,:or;(checked per character with Range rects; the same check finds them with the old plain spaces).No
.tsxor CSS touched, so the UI quality gate does not apply.