fix(i18n): move lang/dict to module scope and translate coords button - #17
Merged
Merged
Conversation
- Extract `lang`, `labels`, and `dict` from inside `applyFenToBoard()` to module scope so `initCoordsToggle()` (and any future function) can access the active locale without re-detecting it. - `initCoordsToggle()` now sets the button text from `dict.coords` instead of leaving the hardcoded "Coords" string. - Add `coords` key to every language entry in both front and back templates (fr/Coords, de/Koord., es‑it‑pt/Coord., nl/Koord., ru/Коорд., zh/坐标, ja/座標, pl‑tr/Koord., en/Coords). - Fix inconsistent indentation of the `labels` block in front.html (was at column 0 inside the function body). - Sync back.html labels to match front.html structure (same languages, same property ordering). https://claude.ai/code/session_01W4q82SG7ivHr15HiowDczK
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.
Summary
lang,labelsetdictétaient définis à l'intérieur deapplyFenToBoard(), les rendant inaccessibles aux autres fonctions (notammentinitCoordsToggle()). Ils sont maintenant au niveau module, détectés une seule fois et partagés par toutes les fonctions.initCoordsToggle()applique désormaisdict.coordsau texte du bouton. Traductions ajoutées pour les 12 langues supportées (fr/Coords, de/Koord., es‑it‑pt/Coord., nl/Koord., ru/Коорд., zh/坐标, ja/座標, pl‑tr/Koord., en/Coords).labelsdansfront.htmlétait à colonne 0 à l'intérieur d'une fonction — corrigé.back.htmladopte la même structure delabelsquefront.html(mêmes langues, même ordre de propriétés).Test plan
https://claude.ai/code/session_01W4q82SG7ivHr15HiowDczK
Generated by Claude Code