Skip to content

Ajout de la traduction française (fr-FR) #2722

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SimonBaeckelant
Copy link

Hello,

This PR adds a French translation of the Comprehensive Rust course under src/translations/fr-FR/.

All .md files have been translated, following the original structure, formatting, and tone.

The SUMMARY.md file contains translated titles but keeps original file paths, as required by mdBook.

The translation uses official terminology from the Rust community (e.g., ownership, borrow checker, traits, etc.).

Thanks a lot for this amazing learning resource 🦀
I'm happy to apply any suggestions or corrections you may have!

Copy link

google-cla bot commented Apr 23, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@SimonBaeckelant
Copy link
Author

👋 Hello,

I just wanted to leave a quick note to mention that I had initially forgotten to sign the CLA, but that's now been done ✅

This PR adds a full French translation of the course under src/translations/fr-FR.

It looks like the checks are still pending approval before the workflows can run — no rush at all, just wanted to confirm everything is now in order on my end.

Thanks again for this great resource and your time maintaining it! 🦀🇫🇷

– Simon Baeckelant

@mgeisler
Copy link
Collaborator

mgeisler commented May 5, 2025

Hi @SimonBaeckelant, bonjour! 😃

Nice to meet you and wow, thanks for all the work here! I won't be able to merge this as-is since we actually have a full translation system configured. Please see TRANSLATIONS to get started.

In short, the system requires you to take each bit of French text and match it with the corresponding English text. This happens in the (outdated fr.po file.

A first good step would be to refresh the translation. Then you and others can edit the fr.po file afterwards using something like Poedit. You can also edit the fr.po file using a regular text editor, up to you.

Translating the Markdown files in this PR automatically back to a fr.po file is a features request: google/mdbook-i18n-helpers#30 — it should be possible to automate perhaps 80% of this. But the code for this is unfortunately not written yet.

@SimonBaeckelant SimonBaeckelant requested a review from sakex as a code owner May 8, 2025 09:37
@SimonBaeckelant
Copy link
Author

Hi again! 👋

I've completed the translation of fr.po using Poedit, and removed all manually translated .md files as requested. The translation now follows the official gettext workflow with fr.po only.

Let me know if any adjustments are needed — thanks again for your guidance and for maintaining this project! 🙏

Copy link
Collaborator

@mgeisler mgeisler left a comment

Choose a reason for hiding this comment

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

Wow, that was quick. Amazing!

Just a small request: please delete the src/translations/fr-FR/fr.po file since it won't be used by our publishing process.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please remove this file, it won't be used by the translation infrastructure.

@mgeisler
Copy link
Collaborator

mgeisler commented May 12, 2025

Hmm, the test fails here in a third-party library we use.

Could you make sure to include a MIME-Version line in the PO metadata section? Concretely, the first diff to fr.po should be:

--- a/po/fr.po
+++ b/po/fr.po
@@ -1,16 +1,15 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: Comprehensive Rust 🦀\n"
-"POT-Creation-Date: 2024-04-05T16:37:18-04:00\n"
-"PO-Revision-Date: 2024-05-24 15:14-0400\n"
-"Last-Translator: Olivier Charrez <olivier.charrez@hotmail.com>\n"
-"Language-Team: French <traduc@traduc.org>\n"
-"Language: fr\n"
-"MIME-Version: 1.0\n"
+"POT-Creation-Date: 2025-05-08T11:23:04-04:00\n"
+"PO-Revision-Date: \n"
+"Last-Translator: Simon Baeckelant <simonbaeckelant@gmail.com>\n"
+"Language-Team: French <traduc@traduc.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-"X-Generator: Poedit 3.4.2\n"
+"X-Generator: Poedit 3.6\n"

The problem is the missing \n in a few of the new lines. The latest unreleased version of the polib library fixes this, but for now, we need the \n at the end of each line.

@mgeisler
Copy link
Collaborator

A little tip for PRs like this:

gh pr diff 2722 | bat -l patch

make it possible to view the diff, despite it being huge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants