Skip to content

feat: provide i18n resources for French and Spanish#690

Merged
tbouffard merged 2 commits intomainfrom
feat/352_provide_18n_resources_es_and_fr
Feb 25, 2025
Merged

feat: provide i18n resources for French and Spanish#690
tbouffard merged 2 commits intomainfrom
feat/352_provide_18n_resources_es_and_fr

Conversation

@tbouffard
Copy link
Member

@tbouffard tbouffard commented Feb 24, 2025

Notes

Closes #352

Summary by CodeRabbit

  • New Features

    • Added Spanish and French localization for both editor and graph interfaces, enhancing user prompts, labels, and feedback messages.
  • Documentation

    • Updated internationalization documentation to clearly list support for Chinese, English, French, German, and Spanish, providing better clarity on available languages.

@tbouffard tbouffard added the enhancement New feature or request label Feb 24, 2025
@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2025

Warning

Rate limit exceeded

@tbouffard has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 43 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 870141d and 4bd055a.

📒 Files selected for processing (2)
  • packages/core/i18n/graph_fr.txt (1 hunks)
  • packages/html/public/i18n/graph_fr.txt (1 hunks)

Walkthrough

This pull request introduces new localization files for Spanish and French across both the core and HTML public directories. The change adds translation files for two different interfaces—editor and graph—covering key UI elements such as zoom prompts, properties, outlines, tasks, help, connection status, validation messages, and dialog buttons. Additionally, the documentation is updated to explicitly list supported languages (Chinese, English, French, German, and Spanish) with improved formatting for clarity.

Changes

Files Change Summary
packages/core/i18n/editor_es.txt, packages/core/i18n/editor_fr.txt Added new editor UI translation files with Spanish and French key-value pairs for askZoom, properties, outline, tasks, and help.
packages/core/i18n/graph_es.txt, packages/core/i18n/graph_fr.txt Added new graph UI translation files with Spanish and French entries covering connection messages, validation errors, update notifications, and common dialog actions.
packages/html/public/i18n/editor_es.txt, packages/html/public/i18n/editor_fr.txt Added new editor UI translation files in the HTML public directory for Spanish and French.
packages/html/public/i18n/graph_es.txt, packages/html/public/i18n/graph_fr.txt Added new graph UI translation files in the HTML public directory with entries similar to the core translations.
packages/website/docs/usage/i18n.md Updated the documentation to list the five supported languages and reformatted the presentation of the i18n resource files.

Possibly related PRs

Suggested labels

documentation


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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.
    • Generate unit testing code for this file.
    • 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. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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.

@tbouffard tbouffard force-pushed the feat/352_provide_18n_resources_es_and_fr branch from 239f69b to 870141d Compare February 24, 2025 18:20
@tbouffard tbouffard marked this pull request as ready for review February 24, 2025 18:22
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

🔭 Outside diff range comments (2)
packages/html/public/i18n/graph_es.txt (1)

1-12: 🛠️ Refactor suggestion

Spanish Localization File Quality Check

The Spanish localization entries are clear and maintain consistency with the French version. Please consider the following improvements:

  • Punctuation Style: On lines 3 and 4, the strings read:
    • updatingDocument=Actualizando Documento. Por favor espere...
    • updatingSelection=Actualizando Selección. Por favor espere...
      Static analysis hints at a possible missing comma. Evaluate whether a formulation like “Actualizando Documento, por favor espere...” might enhance readability and align with your punctuation standards.
  • Terminology Correction: On line 6, change “Doble click para cambiar orientación” to “Doble clic para cambiar orientación” for a correct Spanish adaptation of the anglicism.

Below is a suggested diff for line 6:

-doubleClickOrientation=Doble click para cambiar orientación
+doubleClickOrientation=Doble clic para cambiar orientación
🧰 Tools
🪛 LanguageTool

[uncategorized] ~3-~3: Probablemente falta una coma.
Context: ...pdatingDocument=Actualizando Documento. Por favor espere... updatingSelection=Actualizand...

(POR_FAVOR)


[uncategorized] ~4-~4: Probablemente falta una coma.
Context: ...datingSelection=Actualizando Selección. Por favor espere... collapse-expand=Colapsar/Expa...

(POR_FAVOR)


[misspelling] ~6-~6: La adaptación adecuada de este anglicismo es «clic».
Context: ...r/Expandir doubleClickOrientation=Doble click para cambiar orientación close=Cerrar e...

(CLICK_CLIC)

packages/core/i18n/graph_es.txt (1)

1-12: 🛠️ Refactor suggestion

Core Spanish i18n File Review

This core Spanish localization file provides translations for the graph module and is consistent with the public i18n file. Consider the following refinements:

  • Punctuation Consideration: For lines 3 and 4, re-assess whether using a comma (e.g., “Actualizando Documento, por favor espere...”) might be preferable over the period, in line with your styling guidelines.
  • Terminology Update: On line 6, update “Doble click para cambiar orientación” to “Doble clic para cambiar orientación” to conform to standard Spanish usage.

A sample diff for the terminology update is:

-doubleClickOrientation=Doble click para cambiar orientación
+doubleClickOrientation=Doble clic para cambiar orientación
🧰 Tools
🪛 LanguageTool

[uncategorized] ~3-~3: Probablemente falta una coma.
Context: ...pdatingDocument=Actualizando Documento. Por favor espere... updatingSelection=Actualizand...

(POR_FAVOR)


[uncategorized] ~4-~4: Probablemente falta una coma.
Context: ...datingSelection=Actualizando Selección. Por favor espere... collapse-expand=Colapsar/Expa...

(POR_FAVOR)


[misspelling] ~6-~6: La adaptación adecuada de este anglicismo es «clic».
Context: ...r/Expandir doubleClickOrientation=Doble click para cambiar orientación close=Cerrar e...

(CLICK_CLIC)

🧹 Nitpick comments (2)
packages/core/i18n/graph_fr.txt (1)

1-11: French Localization File Verification

The new French file correctly provides localized UI strings. Overall, the translations are clear and consistent.
However, please review the following stylistic points raised by static analysis:

  • Typographical Consistency: The static analysis suggests that “noeuds” might be better rendered as “nœuds” to align with French typographical norms. Verify what your style guide mandates.
  • Key Naming Conventions: The key collapse-expand is flagged due to its hyphen. Ensure that using a hyphen is consistent with other i18n keys in your project.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~1-~1: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: alreadyConnected=Les noeuds sont déjà connectés contains...

(MOTS_COLLES)


[typographical] ~1-~1: Variante typographique déconseillée de « nœuds ».
Context: alreadyConnected=Les noeuds sont déjà connectés containsValidationE...

(OE)


[uncategorized] ~1-~1: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: ...onnected=Les noeuds sont déjà connectés containsValidationErrors=Contient des erreurs de validation upda...

(MOTS_COLLES)


[uncategorized] ~2-~2: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: ...rors=Contient des erreurs de validation updatingDocument=Mise à jour du Document. Merci de patie...

(MOTS_COLLES)


[uncategorized] ~3-~3: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: ...jour du Document. Merci de patienter... updatingSelection=Mise à jour de la Sélection. Merci de p...

(MOTS_COLLES)


[uncategorized] ~4-~4: Le trait d’union doit être supprimé.
Context: ... de la Sélection. Merci de patienter... collapse-expand=Réduire/Développer doubleClickOrientati...

(MOT_TRAIT_MOT)

packages/html/public/i18n/graph_fr.txt (1)

1-11: French Public i18n File – Consistency Check

This file mirrors the core French localization entries, ensuring consistency across modules. A couple of points to consider:

  • Double-click Terminology: The value on line 6 uses “Doubleclick”. In French, the more standard term is “double-clic”. Consider updating if consistency with regional usage is desired.
  • Stylistic Concerns: Similar to the core file, verify that the use of hyphens (e.g., in collapse-expand) aligns with your internal naming conventions.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~1-~1: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: alreadyConnected=Les noeuds sont déjà connectés contains...

(MOTS_COLLES)


[typographical] ~1-~1: Variante typographique déconseillée de « nœuds ».
Context: alreadyConnected=Les noeuds sont déjà connectés containsValidationE...

(OE)


[uncategorized] ~1-~1: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: ...onnected=Les noeuds sont déjà connectés containsValidationErrors=Contient des erreurs de validation upda...

(MOTS_COLLES)


[uncategorized] ~2-~2: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: ...rors=Contient des erreurs de validation updatingDocument=Mise à jour du Document. Merci de patie...

(MOTS_COLLES)


[uncategorized] ~3-~3: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: ...jour du Document. Merci de patienter... updatingSelection=Mise à jour de la Sélection. Merci de p...

(MOTS_COLLES)


[uncategorized] ~4-~4: Le trait d’union doit être supprimé.
Context: ... de la Sélection. Merci de patienter... collapse-expand=Réduire/Développer doubleClickOrientati...

(MOT_TRAIT_MOT)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9f18fba and 870141d.

📒 Files selected for processing (9)
  • packages/core/i18n/editor_es.txt (1 hunks)
  • packages/core/i18n/editor_fr.txt (1 hunks)
  • packages/core/i18n/graph_es.txt (1 hunks)
  • packages/core/i18n/graph_fr.txt (1 hunks)
  • packages/html/public/i18n/editor_es.txt (1 hunks)
  • packages/html/public/i18n/editor_fr.txt (1 hunks)
  • packages/html/public/i18n/graph_es.txt (1 hunks)
  • packages/html/public/i18n/graph_fr.txt (1 hunks)
  • packages/website/docs/usage/i18n.md (1 hunks)
✅ Files skipped from review due to trivial changes (4)
  • packages/core/i18n/editor_es.txt
  • packages/html/public/i18n/editor_fr.txt
  • packages/core/i18n/editor_fr.txt
  • packages/html/public/i18n/editor_es.txt
🧰 Additional context used
🪛 LanguageTool
packages/core/i18n/graph_es.txt

[uncategorized] ~3-~3: Probablemente falta una coma.
Context: ...pdatingDocument=Actualizando Documento. Por favor espere... updatingSelection=Actualizand...

(POR_FAVOR)


[uncategorized] ~4-~4: Probablemente falta una coma.
Context: ...datingSelection=Actualizando Selección. Por favor espere... collapse-expand=Colapsar/Expa...

(POR_FAVOR)


[misspelling] ~6-~6: La adaptación adecuada de este anglicismo es «clic».
Context: ...r/Expandir doubleClickOrientation=Doble click para cambiar orientación close=Cerrar e...

(CLICK_CLIC)

packages/core/i18n/graph_fr.txt

[uncategorized] ~1-~1: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: alreadyConnected=Les noeuds sont déjà connectés contains...

(MOTS_COLLES)


[typographical] ~1-~1: Variante typographique déconseillée de « nœuds ».
Context: alreadyConnected=Les noeuds sont déjà connectés containsValidationE...

(OE)


[uncategorized] ~1-~1: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: ...onnected=Les noeuds sont déjà connectés containsValidationErrors=Contient des erreurs de validation upda...

(MOTS_COLLES)


[uncategorized] ~2-~2: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: ...rors=Contient des erreurs de validation updatingDocument=Mise à jour du Document. Merci de patie...

(MOTS_COLLES)


[uncategorized] ~3-~3: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: ...jour du Document. Merci de patienter... updatingSelection=Mise à jour de la Sélection. Merci de p...

(MOTS_COLLES)


[uncategorized] ~4-~4: Le trait d’union doit être supprimé.
Context: ... de la Sélection. Merci de patienter... collapse-expand=Réduire/Développer doubleClickOrientati...

(MOT_TRAIT_MOT)

packages/html/public/i18n/graph_es.txt

[uncategorized] ~3-~3: Probablemente falta una coma.
Context: ...pdatingDocument=Actualizando Documento. Por favor espere... updatingSelection=Actualizand...

(POR_FAVOR)


[uncategorized] ~4-~4: Probablemente falta una coma.
Context: ...datingSelection=Actualizando Selección. Por favor espere... collapse-expand=Colapsar/Expa...

(POR_FAVOR)


[misspelling] ~6-~6: La adaptación adecuada de este anglicismo es «clic».
Context: ...r/Expandir doubleClickOrientation=Doble click para cambiar orientación close=Cerrar e...

(CLICK_CLIC)

packages/html/public/i18n/graph_fr.txt

[uncategorized] ~1-~1: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: alreadyConnected=Les noeuds sont déjà connectés contains...

(MOTS_COLLES)


[typographical] ~1-~1: Variante typographique déconseillée de « nœuds ».
Context: alreadyConnected=Les noeuds sont déjà connectés containsValidationE...

(OE)


[uncategorized] ~1-~1: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: ...onnected=Les noeuds sont déjà connectés containsValidationErrors=Contient des erreurs de validation upda...

(MOTS_COLLES)


[uncategorized] ~2-~2: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: ...rors=Contient des erreurs de validation updatingDocument=Mise à jour du Document. Merci de patie...

(MOTS_COLLES)


[uncategorized] ~3-~3: Une espace doit être ajoutée entre ces deux mots ou intégrez ce nouveau mot à votre dictionnaire personnel.
Context: ...jour du Document. Merci de patienter... updatingSelection=Mise à jour de la Sélection. Merci de p...

(MOTS_COLLES)


[uncategorized] ~4-~4: Le trait d’union doit être supprimé.
Context: ... de la Sélection. Merci de patienter... collapse-expand=Réduire/Développer doubleClickOrientati...

(MOT_TRAIT_MOT)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build (windows-2022)
🔇 Additional comments (1)
packages/website/docs/usage/i18n.md (1)

17-23: Enhanced i18n Documentation Overview

The documentation update now clearly lists the supported languages (Chinese, English, French, German, and Spanish) on separate lines. This improves readability and provides a comprehensive overview of the available translations. Make sure the listed resource paths (e.g., resources/editor*.txt and resources/graph*.txt) reflect the current project structure.

@sonarqubecloud
Copy link

@tbouffard tbouffard merged commit 5f10dd2 into main Feb 25, 2025
7 checks passed
@tbouffard tbouffard deleted the feat/352_provide_18n_resources_es_and_fr branch February 25, 2025 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Translation of resources/editor.txt and resources/graph.txt into spanish

1 participant