feat(i18n): Add French language support. - #1889
Conversation
- Création du fichier de traduction `fr.json` en se basant sur `en.json`. - Mise à jour de la configuration i18n pour inclure la langue française. - Modification du sélecteur de langue pour afficher l'option "Français" avec le drapeau correspondant.
- Création du fichier `README.fr.md` en se basant sur `README.en.md`.
- Added `common.changeLanguage` key to `en.json`, `fr.json`, and `zh.json`. - Updated `LanguageSelector.jsx` to use the new shared key. - Completed `fr.json` with all keys from `en.json` and `zh.json`. - Added translations for `closeSidebar`, `pricing`, and `language`.
- Restructured the `common.changeLanguage` key to be nested under a `common` object in `en.json`, `fr.json`, and `zh.json`. - This change improves the organization of the translation files and aligns with best practices for i18next.
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes. 💤 Files selected but had no reviewable changes (1)
You can disable this status message by setting the WalkthroughAdds French language support across the app: new French README, updated README language links, LanguageSelector now includes Français, i18n wired with fr resources, and new "common.changeLanguage" key added to en/zh locale files. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant LS as LanguageSelector
participant I18N as i18n (en/zh/fr)
participant UI as App UI
U->>LS: Click language menu
LS->>I18N: onLanguageChange('fr')
I18N->>I18N: Set current locale = fr
I18N-->>UI: Provide fr resources
UI-->>U: Re-render with French strings
note right of UI: Uses common.changeLanguage key
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
bun_output.logis excluded by!**/*.logpackage-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (8)
README.en.md(1 hunks)README.fr.md(1 hunks)README.md(1 hunks)jules-scratch/verification/verify_translation.py(1 hunks)web/src/components/layout/headerbar/LanguageSelector.jsx(2 hunks)web/src/i18n/i18n.js(2 hunks)web/src/i18n/locales/en.json(1 hunks)web/src/i18n/locales/zh.json(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
web/src/components/layout/headerbar/LanguageSelector.jsx (1)
web/src/hooks/common/useHeaderBar.js (1)
currentLang(39-39)
This addresses feedback from CodeRabbitAI by using a regular expression for the language button's aria-label. This ensures the test can run regardless of the browser's default language.
|
Hi, I've just updated this branch with the latest changes from main. It should now be up-to-date and ready for review. Thanks! |
|
jules-scratch/verification/verify_translation.py |
# Conflicts: # web/src/i18n/locales/zh.json
Hi @Calcium-Ion, Thanks for the suggestion. I've removed the jules-scratch verification directory as you recommended. Additionally, I have updated this branch with the latest changes from main and added the missing French translation for the new keys that were included in the update. The pull request should now be up-to-date and ready for another review. Thanks |
There was a problem hiding this comment.
Can this verification script be deleted?
feat(i18n): Add French language support.
This pull request introduces complete French language support to the application.
Key Changes:
This branch has been updated with the latest changes from the main branch to ensure there are no conflicts. The previous pull request can be closed.
Summary by CodeRabbit
New Features
Documentation