Skip to content

feat(i18n): full internationalisation — Norwegian, English, Persian/RTL (#128)#131

Merged
ChristopherRotnes merged 3 commits into
masterfrom
claude/issue-128-2vWsM
May 5, 2026
Merged

feat(i18n): full internationalisation — Norwegian, English, Persian/RTL (#128)#131
ChristopherRotnes merged 3 commits into
masterfrom
claude/issue-128-2vWsM

Conversation

@ChristopherRotnes
Copy link
Copy Markdown
Owner

Summary

  • Adds i18next infrastructure with static Vite JSON imports (no HTTP backend)
  • Translation files for Norwegian Bokmål (nb), English (en), and Persian/Farsi (fa) across all 15 components
  • Bundles Vazirmatn font (MIT) for Persian text rendering
  • RTL layout when fa is selected: dir="rtl" on <html>, CSS logical properties (borderInlineStart) on accent strips
  • Language persists to localStorage (wl-lang), defaults to nb
  • Language selector added to Settings (Carbon RadioButtonGroup)
  • AI recommendation tips follow the user's language; exercise names stay Norwegian for DB consistency

Test plan

  • Switch to English in Settings — all UI strings update immediately, no reload needed
  • Switch to Persian — font changes to Vazirmatn, layout flips to RTL
  • Preference survives page reload
  • AI tips in Report come in the selected language
  • No regressions in Norwegian (default)

Closes #128

🤖 Generated with Claude Code

claude and others added 3 commits May 5, 2026 20:18
- Install i18next + react-i18next
- Create translation JSON files for Norwegian (nb), English (en), and Persian/Farsi (fa)
- Create app/src/lib/i18n.js with locale init, localStorage persistence (wl-lang), and RTL dir switching for Persian
- Wire i18n init as first import in main.jsx

Part of issue #128. Component wiring and RTL CSS remain in next steps.

https://claude.ai/code/session_016RYEVLPLXgCaaPciBc3RYt
Phases 2-7 of issue #128:
- Vazirmatn font (Regular/SemiBold/Bold woff2) bundled locally for Persian/RTL
- @font-face + --fa-font CSS var added to carbon-tokens.css
- [dir="rtl"] font override + SectionLabel switched to borderInlineStart in app.css/PageShell
- Settings.jsx: live RadioButtonGroup (nb/en/fa) replacing the "Kommer snart" placeholder
- bodymap.jsx: muscle labels and tooltip strings run through useTranslation
- prompts.js: buildRecommendPrompt + buildPeriodRecommendPrompt accept lang param; tip field now follows user language
- All 15 component files (PageShell, BodyPanel, ExerciseRow, ExerciseForm, LibraryPicker,
  MusclePicker, Login, TemplatePicker, TemplateSessionEditor, Bibliotek, Home, Planlegger,
  History, MuscleMap, Report) wired with useTranslation — hardcoded Norwegian replaced with t()
- MuscleMap and Report pass i18n.language to prompt builders

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 5, 2026

Azure Static Web Apps: Your stage site is ready! Visit it here: https://white-island-090dfd003-131.westeurope.7.azurestaticapps.net

@ChristopherRotnes ChristopherRotnes merged commit 9fcc731 into master May 5, 2026
1 check passed
@ChristopherRotnes ChristopherRotnes deleted the claude/issue-128-2vWsM branch May 8, 2026 08:25
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.

As a user I want the app in my preferred language so I can use it comfortably

2 participants