Repository navigation
Conversation
Every text of the web and phone app comes from a dictionary in lib/i18n (English is the reference; Polish and Spanish must have every key or the type check fails). Settings has a Language picker, saved per browser; until one is picked the browser's (or phone's) language is used. Warnings, dates, durations and country names follow the language, and the in-app AI buttons ask Claude to answer in it. The MCP server keeps English, so lib functions take the language as an optional parameter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 of 6 tasks
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
TripDeck can now be used in English, Polish or Spanish. Settings has a new 🌐 Language section; the choice is saved per browser, and until one is picked the app follows the browser's language (falling back to English). The phone app follows the phone's language.
How
lib/i18n/– one dictionary per language.en.tsis the reference;pl.tsandes.tsare typed asMessages, so a missing key failstsc. Plurals useIntl.PluralRules(Polish one / few / many).lib/useLang.ts–useLang()/useT()/setLang(), built like the theme store (useSyncExternalStore, localStorage, other tabs follow).lib/i18n/rich.tsx– keeps links and bold text inside translated sentences (<b>…</b>,<a>…</a>).lang, defaulting to English, so the MCP server's output to Claude is unchanged.suggest,tips,optimize,import) acceptlangand ask Claude to write in it.THEME_LABEL,RENTAL_VEHICLE_LABEL,ENTRY_KIND_LABEL).Not translated (on purpose)
MCP tool output, the demo trip's content, server/Google error messages. Money formatting still uses the English format (
€1,307).Tests
lib/i18n/i18n.test.ts: Polish and Spanish use exactly the placeholders and tags English has; plural forms; language detection; durations/dates per language; dive warnings in Polish while English stays the default;rich.bun run checkpasses (typecheck, lint, 333 tests with coverage thresholds, web and mobile builds).🤖 Generated with Claude Code