Skip to content

feat(i18n): Add French language support. - #1889

Merged
Calcium-Ion merged 12 commits into
QuantumNous:mainfrom
comeback01:traduction
Sep 29, 2025
Merged

feat(i18n): Add French language support.#1889
Calcium-Ion merged 12 commits into
QuantumNous:mainfrom
comeback01:traduction

Conversation

@comeback01

@comeback01 comeback01 commented Sep 27, 2025

Copy link
Copy Markdown
Contributor

This pull request introduces complete French language support to the application.

Key Changes:

 New Translation:* Added a full fr.json translation file for the user interface, based on the existing en.json file.
 UI Integration:*
  *   Updated the i18n configuration to recognize and load the French locale.
  *   Modified the language selector in the header to include "Français" as an option, complete with its flag.
 Documentation:*
  *   Included a fully translated French README.fr.md.
  *   Updated the main README.md and README.en.md files to link to the new French documentation.
 Verification:* Added an automated Playwright script to verify that the language can be successfully switched to French.

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

    • Added French (Français) as a selectable language in the UI, including flag and active-state in the language selector.
    • Enabled French translations by integrating fr locale into i18n resources.
    • Introduced a shared “Change Language” string under a common namespace for en/zh.
  • Documentation

    • Added a full French README (README.fr.md).
    • Updated README language links to include Français across English and Chinese versions.

- 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.
@coderabbitai

coderabbitai Bot commented Sep 27, 2025

Copy link
Copy Markdown
Contributor

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (1)
  • web/src/i18n/locales/fr.json

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Adds 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

Cohort / File(s) Summary
Documentation
README.md, README.en.md, README.fr.md
Added Français link to language switch in README files; introduced full French README translation.
UI Language Selector
web/src/components/layout/headerbar/LanguageSelector.jsx
Added Français option with FR flag; updated button label to use t('common.changeLanguage'); mirrors zh/en behavior.
i18n Setup
web/src/i18n/i18n.js
Imported and registered fr locale into i18n resources alongside en and zh.
Locale Files
web/src/i18n/locales/en.json, web/src/i18n/locales/zh.json, web/src/i18n/locales/fr.json
Added top-level common.changeLanguage key to en and zh; introduced fr translations file and resource.

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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A hop, a skip, a “bonjour!” cheer,
I twitch my ears—Français is here! 🐇
Flags unfurl, three tongues in tow,
Click and—voilà!—the words all flow.
In docs and menus, c’est parfait—
I nibble bugs and bound away.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The provided title “feat(i18n): Add French language support” concisely and accurately reflects the main objective of the changeset, which is to introduce French localization across UI, documentation, and configuration for the application. It uses clear, conventional commit styling, highlights the primary feature area (i18n), and avoids extraneous details, making it easy for teammates to understand the pull request’s intent at a glance.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 143a2de and 72177c2.

⛔ Files ignored due to path filters (2)
  • bun_output.log is excluded by !**/*.log
  • package-lock.json is 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)

Comment thread jules-scratch/verification/verify_translation.py Outdated
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.
@comeback01 comeback01 changed the title feat(i18n): Add French language support ✅ feat(i18n): Add French language support. Sep 27, 2025
@comeback01

Copy link
Copy Markdown
Contributor Author

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!

@Calcium-Ion

Copy link
Copy Markdown
Member

jules-scratch/verification/verify_translation.py
this verification script should we remove this directory before merging?

@comeback01

Copy link
Copy Markdown
Contributor Author

jules-scratch/verification/verify_translation.py this verification script should we remove this directory before merging?

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this verification script be deleted?

Comment thread bun_output.log Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is redundant.

x22x22 pushed a commit to x22x22/new-api that referenced this pull request Apr 24, 2026
 feat(i18n): Add French language support.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants