feat(i18n): add English multilingual support (Phase 1)#69
Merged
calderbuild merged 3 commits intomainfrom Mar 9, 2026
Merged
Conversation
added 3 commits
March 8, 2026 14:48
- Create lightweight JSON i18n system (app/i18n.py) with language detection chain: URL /en/ > Cookie > Accept-Language > default zh - Extract 372 translation keys to locales/zh.json + locales/en.json - Add /en/* routes for all SSR pages (home, about, faq, how-it-works, city) - Add language toggle (EN/中文) in nav with cookie persistence - Add hreflang tags and bilingual sitemap with xhtml:link - Mount /locales/ static route for client-side JS i18n - Update all Jinja2 templates to use translation dict - Update seo_content.py city content generation with lang parameter
- Finder HTML: client-side JS i18n with data-i18n attributes, language
toggle, _t() helper, initI18n() for cookie/Accept-Language detection
- API: localized error messages (quota, rate limit, config errors) via
detect_language() + translation keys
- AI Chat: English system prompt, bilingual preset questions, chat
widget uses template translation variables, sends lang parameter
- City template: venue header uses translation key with {city} placeholder
Deploying meetspot with
|
| Latest commit: |
9903179
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://d0edc241.meetspot.pages.dev |
| Branch Preview URL: | https://feat-i18n-english.meetspot.pages.dev |
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
/en/> Cookielang> Accept-Language header > default Chinese/en/,/en/about,/en/faq,/en/how-it-works,/en/meetspot/{city}data-i18nattributesTest plan
/-- Chinese homepage renders correctly/en/-- English homepage renders correctly/en/about,/en/faq,/en/how-it-works-- English content/public/meetspot_finder.html-- Finder language toggle works/sitemap.xml-- contains English URL variants with hreflanglang=encookie set