Skip to content

feat: add french - #1355

Merged
dguyen merged 3 commits into
mainfrom
feat/add-french
Sep 19, 2024
Merged

dguyen merged 3 commits into
mainfrom
feat/add-french

Conversation

@dguyen

@dguyen dguyen commented Sep 19, 2024 •

Copy link
Copy Markdown
Collaborator

Description

Add initial French translations

Summary by CodeRabbit

  • New Features

    • Added support for the French language, enhancing accessibility for French-speaking users.
    • Introduced localized French messages for various application functionalities, improving user experience.
  • Bug Fixes

    • Minor formatting updates in French translation files to remove extraneous newline characters.
  • Chores

    • Updated line references in French translation files to maintain alignment with code changes.

@vercel

vercel Bot commented Sep 19, 2024 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
prd-app 🔄 Building (Inspect) Visit Preview 💬 Add feedback Sep 19, 2024 9:39am
prd-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2024 9:39am
prd-marketing 🔄 Building (Inspect) Visit Preview 💬 Add feedback Sep 19, 2024 9:39am
stg-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2024 9:39am
stg-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2024 9:39am
stg-marketing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 19, 2024 9:39am

@coderabbitai

coderabbitai Bot commented Sep 19, 2024 •

Copy link
Copy Markdown
Contributor

Walkthrough

The changes in this pull request introduce support for the French language within the application. This includes updating language codes and details in the i18n.ts file, adding new French translation files for common phrases, marketing content, and user interface messages. Minor formatting adjustments were also made to existing translation files. Overall, these modifications enhance the application's internationalization capabilities by accommodating French-speaking users.

Changes

File Path Change Summary
packages/lib/constants/i18n.ts Added French language code ('fr') to SUPPORTED_LANGUAGE_CODES and updated SUPPORTED_LANGUAGES with French details.
packages/lib/translations/fr/common.po Removed an empty line after a translation entry; no content changes.
packages/lib/translations/fr/marketing.js Introduced a new file with localized French messages for marketing and user interactions.
packages/lib/translations/fr/marketing.po Removed an extraneous newline character; no content changes.
packages/lib/translations/fr/web.js Introduced a new file with French translations for user interface messages, supporting pluralization and dynamic content.
packages/lib/translations/fr/web.po Updated line references for various messages; no content changes.

Possibly related PRs

  • chore: add translations #1327: This PR adds translations, which is directly related to the main PR's updates to support the French language in the application.
  • feat: add language switcher #1337: This PR introduces a language switcher, enhancing the internationalization capabilities of the application, which aligns with the main PR's focus on adding French language support.

Suggested labels

pkg: ee changes, apps: marketing, apps: web

Suggested reviewers

  • Mythie

🐰 In a world of words, we hop and play,
Adding French to brighten the day.
With messages clear, for all to see,
Our app now speaks, "Bienvenue, c'est ici!"
So let’s sign and share, in every way,
A joyful leap, hip-hip-hooray! 🎉


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

@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

Commits

Files that changed from the base of the PR and between 0070a8c and 47a434b.

Files selected for processing (4)
  • packages/lib/translations/fr/common.po (1 hunks)
  • packages/lib/translations/fr/marketing.po (1 hunks)
  • packages/lib/translations/fr/web.js (1 hunks)
  • packages/lib/translations/fr/web.po (39 hunks)
Files skipped from review as they are similar to previous changes (3)
  • packages/lib/translations/fr/common.po
  • packages/lib/translations/fr/marketing.po
  • packages/lib/translations/fr/web.js
Additional comments not posted (7)
packages/lib/translations/fr/web.po (7)

11-11: LGTM!

The revision date has been updated correctly.


591-591: LGTM!

The French translation "Avatar mis à jour" looks good for "Avatar Updated".


612-612: Looks good!

The French translation "Code de sauvegarde" accurately conveys "Backup Code".


622-622: Translation approved.

The French translation "Bannière mise à jour" looks good for "Banner Updated".


581-581: Translation approved, verify line reference.

The French translation "Authentification requise" accurately translates "Authentication required". However, ensure the line reference change from 57 to 52 is valid.

Verify the line reference:

#!/bin/bash 
rg -F $'Authentication required' -g '*.tsx' -A 5 -B 5

599-599: Translation approved, but check line reference.

The French translation "Retour" is correct for "Back". However, please verify that the line reference change from 497 to 509 is accurate.

Verify the new line reference:

#!/bin/bash
rg -F $'Back' -g '*.tsx' -A 5 -B 5  

624-624: Translation looks good, verify line reference.

The French translation "Détails de base" accurately translates "Basic details". However, please verify that the line reference change from 460 to 472 is valid.

Verify the new line reference:

#!/bin/bash
rg -F $'Basic details' -g '*.tsx' -A 5 -B 5

msgstr "Permet d'authentifier en utilisant des biométries, des gestionnaires de mots de passe, des clés matérielles, etc."

#: apps/web/src/components/forms/v2/signup.tsx:411
#: apps/web/src/components/forms/v2/signup.tsx:423

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.

Tip

Codebase Verification

Translation is correct, but line reference needs updating

The French translation for "Already have an account? <0>Sign in instead</0>" is accurate and preserves the HTML tags. However, the line reference (423) in the .po file doesn't match the actual location in the code.

The text is found in the file apps/web/src/components/forms/v2/signup.tsx, but not at line 423. It's part of a larger component using the <Trans> tag for internationalization.

Action items:

  • Update the line reference in the .po file to match the current location in the signup.tsx file.
  • Consider using a more robust method for tracking translations that doesn't rely on exact line numbers, as these can change frequently during development.
Analysis chain

Translation looks good, but verify the line reference change.

The French translation accurately conveys the meaning and preserves the HTML tags. However, the line reference has changed from 411 to 423.

Verify that the line reference change is valid:

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if the English text exists at the new line number
rg -F $'Already have an account\? <0>Sign in instead</0>' -g '*.tsx' -A 5 -B 5

Length of output: 1097


Script:

#!/bin/bash
# Search for a partial match of the text
rg -i "already have an account" --type tsx

# Search with a more flexible pattern
rg -i "account.*sign in" --type tsx

# List all .tsx files in the apps/web/src/components/forms/v2/ directory
fd . apps/web/src/components/forms/v2/ -e tsx

# Check the content of the signup.tsx file
cat apps/web/src/components/forms/v2/signup.tsx

Length of output: 18458

This branch was successfully deployed

4 active and 1 inactive (outdated) deployments
Preview – stg-docs — 47a434b1 Deployed Sep 19, 2024 by vercel[bot]
Preview – stg-marketing — 47a434b1 Deployed Sep 19, 2024 by vercel[bot]
Preview – prd-docs — 47a434b1 Deployed Sep 19, 2024 by vercel[bot]
Preview – stg-app — 47a434b1 Deployed Sep 19, 2024 by vercel[bot]
Translations — 0070a8c1 Deployed Sep 19, 2024 by dguyen
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