-
Notifications
You must be signed in to change notification settings - Fork 115
feat(i18n): implement i18n framework with language detection #638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 8 files
Prompt for AI agents (all issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/i18n/locales/en.json">
<violation number="1" location="packages/i18n/locales/en.json:98">
P3: Typo: space before question mark. English typography does not use a space before punctuation marks. This appears to be a copy-paste from French text or a typo.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| "Anguilla": "Anguilla", | ||
| "Antarctica": "Antarctica", | ||
| "Antigua and Barbuda": "Antigua and Barbuda", | ||
| "Are you sure ?": "Are you sure ?", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: Typo: space before question mark. English typography does not use a space before punctuation marks. This appears to be a copy-paste from French text or a typo.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/i18n/locales/en.json, line 98:
<comment>Typo: space before question mark. English typography does not use a space before punctuation marks. This appears to be a copy-paste from French text or a typo.</comment>
<file context>
@@ -0,0 +1,1529 @@
+ "Anguilla": "Anguilla",
+ "Antarctica": "Antarctica",
+ "Antigua and Barbuda": "Antigua and Barbuda",
+ "Are you sure ?": "Are you sure ?",
+ "Are you sure you want to delete the NDA file?": "Are you sure you want to delete the NDA file?",
+ "Are you sure you want to delete the invitation for %s?": "Are you sure you want to delete the invitation for %s?",
</file context>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine and expected. The string is only being used as the country name.
- Add language detection (browser + localStorage) - Add setLang function for runtime language switching - Extract 1527 translatable strings to en.json - Implement loader with English fallback for missing translations - Add /locales alias in Vite config for clean imports Closes getprobo#519 Signed-off-by: Yash Gupta <[email protected]>
7d6c819 to
d636c3e
Compare
|
@SachaProbo @gearnode, please take a look at this PR at your convenience. |
Closes #519
Summary by cubic
Add a shared i18n framework with browser/localStorage language detection, runtime language switching, and English fallback. Wired both apps to lazy-load locale files via a Vite /locales alias. Closes #519.
New Features
Migration
Written for commit 6af3f3c. Summary will update on new commits.