Skip to content

Conversation

@Pomdap
Copy link

@Pomdap Pomdap commented Aug 27, 2025

Add translation for French

Summary by CodeRabbit

  • New Features
    • Added French language support for the search experience.
    • Localized search bar labels, “see all” actions, and “no results” messages.
    • Improved context-aware prompts (e.g., viewing results within or outside a category).
    • Localized search results titles and pluralized result counts.
    • Added French text for searching across the entire site.
    • Enhances usability for French-speaking users across SearchBar and SearchPage.

@netlify
Copy link

netlify bot commented Aug 27, 2025

Deploy Preview for easyops-cn-docusaurus-search-local ready!

Name Link
🔨 Latest commit 04f9c46
🔍 Latest deploy log https://app.netlify.com/projects/easyops-cn-docusaurus-search-local/deploys/68af1374af270c000871102f
😎 Deploy Preview https://deploy-preview-540--easyops-cn-docusaurus-search-local.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link

coderabbitai bot commented Aug 27, 2025

Walkthrough

Adds a new French locale JSON file for the Docusaurus search plugin, introducing French translations for SearchBar and SearchPage i18n keys.

Changes

Cohort / File(s) Summary
Locale addition (FR)
docusaurus-search-local/locales/fr.json
New French translations for search-related i18n keys: SearchBar labels, context-related messages ("{context}"), SearchPage titles/messages including pluralization ("{count}").

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
docusaurus-search-local/locales/fr.json (3)

3-3: Prefer “Voir tous les résultats”.

More idiomatic and closer to the English intent of “see all results.”

Apply:

-  "theme.SearchBar.seeAll": "Voir les résultats",
+  "theme.SearchBar.seeAll": "Voir tous les résultats",

5-7: Minor phrasing and French quotes.

  • “dans la catégorie” reads more natural than “pour la catégorie”.
  • Consider French guillemets around placeholders; it’s common in FR UI strings.

Apply:

-  "theme.SearchBar.searchInContext": "Voir les résultats pour la catégorie \"{context}\"",
-  "theme.SearchBar.seeAllOutsideContext": "Voir les résultats en dehors de la catégorie \"{context}\"",
-  "theme.SearchPage.existingResultsTitle": "Résultats pour la recherche \"{query}\"",
+  "theme.SearchBar.searchInContext": "Voir les résultats dans la catégorie « {context} »",
+  "theme.SearchBar.seeAllOutsideContext": "Voir tous les résultats hors de la catégorie « {context} »",
+  "theme.SearchPage.existingResultsTitle": "Résultats pour « {query} »",

10-10: Style consistency.

Consider “Aucun résultat trouvé” to align with shorter SearchBar text, unless other locales prefer the full past-tense phrasing.

Apply:

-  "theme.SearchPage.noResultsText": "Aucun résultat n'a été trouvé",
+  "theme.SearchPage.noResultsText": "Aucun résultat trouvé",
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge Base: Disabled due to data retention organization setting

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between c326329 and 04f9c46.

📒 Files selected for processing (1)
  • docusaurus-search-local/locales/fr.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Redirect rules - easyops-cn-docusaurus-search-local
  • GitHub Check: Header rules - easyops-cn-docusaurus-search-local
  • GitHub Check: Pages changed - easyops-cn-docusaurus-search-local
🔇 Additional comments (3)
docusaurus-search-local/locales/fr.json (3)

1-12: LGTM overall — solid FR locale addition.

Keys and placeholders look consistent; JSON is valid.


2-12: Parity check with other locales.

Ensure no keys are missing vs en.json (e.g., potential “cancel”, “loading”, etc., if they exist upstream).

If the script above reports missing keys, I can propose a follow-up patch.


9-9: Pluralization format is consistent—no action required

Verified that the French entry in docusaurus-search-local/locales/fr.json (line 9) uses the same pipe-separated singular|plural format as German (de.json) and matches the plugin’s handling of theme.SearchPage.documentsFound.plurals. No other locale files use a two-form pipe pattern because they require only a single message. The current FR string aligns with the repository convention.

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.

1 participant