feat(i18n): multi-language support with header language switcher - #163
Open
Chenghao999 wants to merge 1 commit into
Open
feat(i18n): multi-language support with header language switcher#163Chenghao999 wants to merge 1 commit into
Chenghao999 wants to merge 1 commit into
Conversation
Add full internationalization using react-i18next: - Language switcher in the top-right corner of the header - Fully translated locales: English, Simplified Chinese, Traditional Chinese (Taiwan); Japanese, Korean, French, German, Spanish are selectable placeholders that fall back to English - Docker-configurable default language via the DEFAULT_LANGUAGE environment variable, served from GET /config - Language preference persists in localStorage; browser locale is used when no preference is set - All pages, navigation, tables, charts and shared UI components are translated Also: - Add .gitignore entries for pnpm-generated artifacts (.pnpm-store/, pnpm-lock.yaml, .pytest_cache/) - Add pnpm-workspace.yaml to allow the esbuild postinstall under pnpm 11 Testing: - New pytest suite (server/tests): locale key parity between en/zh-CN/ zh-TW, placeholder locales, and DEFAULT_LANGUAGE in GET /config - tsc --noEmit and vite build pass; live server smoke test passed (login, /config, /api/flights) AI-generated parts: - i18n infrastructure and locale files (client/i18n.ts, client/locales/) - language switcher component and the translation pass across pages and components - DEFAULT_LANGUAGE wiring (server/environment.py, server/main.py, client/api.ts, Dockerfile, README) - locale/config test suite (server/tests/)
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
Add full internationalization using
react-i18next:DEFAULT_LANGUAGEenvironment variable, served fromGET /config.Also:
.gitignoreentries for pnpm-generated artifacts (.pnpm-store/,pnpm-lock.yaml,.pytest_cache/).pnpm-workspace.yamlto allow the esbuild postinstall under pnpm 11.Testing
server/tests/): locale key parity between en/zh-CN/zh-TW, empty placeholder locales, andDEFAULT_LANGUAGEinGET /config.tsc --noEmitandvite buildpass./config,/api/flights, and the built bundle contains all language strings.AI-generated
This branch was developed with AI assistance (Codex): the i18n infrastructure and locale files, the language switcher, the translation pass across pages and components, the
DEFAULT_LANGUAGEwiring, and the test suite were generated by AI.