Skip to content

fix(game): keep a non-breaking space before ? ! : ; in the French copy - #356

Merged
arrzdev merged 1 commit into
mainfrom
fix/fr-typography
Nov 17, 2026
Merged

arrzdev merged 1 commit into
mainfrom
fix/fr-typography

Conversation

@arrzdev

@arrzdev arrzdev commented Nov 17, 2026

Copy link
Copy Markdown
Owner

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.ts
  • git diff -U0 shows each removed line equal to its added line once U+00A0 is read as a space.
  • /fr/rules and /fr/strategy at 320 px: no line starts with ?, !, : or ; (checked per character with Range rects; the same check finds them with the old plain spaces).

No .tsx or CSS touched, so the UI quality gate does not apply.

- 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
@arrzdev
arrzdev merged commit 2d7e4c4 into main Nov 17, 2026
5 checks passed
@arrzdev
arrzdev deleted the fix/fr-typography branch November 17, 2026 08:27
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