Skip to content

Commit

Permalink
Merge from french-release
Browse files Browse the repository at this point in the history
  • Loading branch information
joeljpresent committed Nov 7, 2019
2 parents e50cfb0 + 0e643ce commit 5a848c3
Show file tree
Hide file tree
Showing 77 changed files with 7,200 additions and 339 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dist: trusty
language: rust
cache: cargo
rust:
- 1.31.1
- 1.37.0
branches:
only:
- master
Expand Down
20 changes: 18 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
{
"editor.rulers": [80]
}
"editor.rulers": [80],
"markdownlint.config": {
"MD001": false,
"MD002": false,
"MD007": false,
"MD013": {
"headings": false,
"tables": false,
"code_blocks": false
},
"MD014": false,
"MD026": false,
"MD033": {
"allowed_elements": ["img", "span", "sup"]
},
"MD041": false
}
}
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 40 additions & 26 deletions FRENCH/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,68 @@ We need to coordinate us with the main English terms translations.
In this purpose, please refer to the file `/FRENCH/src/translation-terms.md`
when you need to translate a technicial term.

*(PS : see next Process `Add a translation term` on this same page)*
*(PS : see the next process `Add a translation term` on this same page)*

### Translation of Rust code

We should translate only the comments and the string text in the rust code.
In rust code, we should translate :
- comment
- string text
- variable name
- struct name (which is custom, that means it not come from *standard library*
or *external crate*)
- enum name (which is custom, that means it not come from *standard library*
or *external crate*)

All the remaining code (and terminal outputs) should stay in English (variables,
methods/functions, instructions, ...).
All the standard code (and terminal outputs) should stay in English.

### Files

The name of all the files should not be translated, so just keep them in
English.
The name of all the files should not be translated, so just keep them unchanged,
in English.

Please limit each line of Markdown file to 80 characters (including spaces). You
can write your file as you want, but it would be nice to use a tool like
[https://www.dcode.fr/text-splitter](https://www.dcode.fr/text-splitter) on your
translated paragraphs before commiting.

### Punctuation

Please use a [non-breaking space](https://en.wikipedia.org/wiki/Non-breaking_space)
instead of space on punctuation who need this space before (like `:`, `!`, `?`,
...).

## Processes

### Translate flow

*NB : the following `main translate repository` refers to
*NB : the following term `main translate repository` refers to
https://github.com/Jimskapt/rust-book-fr*

01. Open or edit an GitHub issue in the *main translate repository* to report to
other that you are working on `ch00-00-introduction`.
- if someone has reported to work on the same page you want to translate :
- if its works is *active* : you should work on another page.
- else : you can fork its repo in the following step 02 (instead of the
*main translate repository*), please mention it in the existing issue.
- else : you can fork his/her repo in the following step 02 (instead of
the *main translate repository*), and please mention this in the
existing issue.
- else : just follow the next instructions.
02. Fork the *main translate repository* in GitHub (in your account)
02. Fork the *main translate repository* in GitHub (on your account)
03. `git clone https://github.com/<your_fork>.git`
(copy your fork on your hard-disk). You should be on the `french-release`
branch by default.
04. `cd <your_fork>` (go inside your fork folder)
04. `cd <your_fork>` (go inside your fork folder your previously downloaded)
05. `git checkout -b <your_new_working_branch_name>` (create your new working
branch)
06. Copy the file you want to translate : `/src/ch00-00-introduction.md` into
`/FRENCH/src/ch00-00-introduction.md`
`/FRENCH/src/ch00-00-introduction.md`. Tip : you can use a tool like
[Castor Whispers](https://github.com/Jimskapt/castor_whispers) in order to
copy and mass-comment each paragraphs of this file.
07. Add the text for the link to this file in the `/FRENCH/src/SUMMARY.md`.
08. Comment each English paragraphs of this file. The goal is to keep an
*invisible* version of the English book, in order to easily reflect the
changes of the English source (english-book) when they occur later, and to
translate them.
easily translate them.
09. Write each of your translated paragraph under each commented English
paragraph.
- Please quickly read following `Guidelines` currently on this page.
Expand All @@ -64,9 +79,9 @@ https://github.com/Jimskapt/rust-book-fr*
tool like
[https://www.dcode.fr/text-splitter](https://www.dcode.fr/text-splitter).
11. (optionnal) `cd FRENCH && mdbook build && cd ..` (build the book in
`/FRENCH/book`). Open its index.html file, and check its correctness. It
also should help you for next task.
12. (optionnal) proofreading you work thanks to services like
`/FRENCH/book`). Open its index.html file in your browser, and check its
correctness. It also should help you for next task.
12. (optionnal) self-proofreading your work thank to services like
[bonpatron.fr](https://bonpatron.com).
13. `git add -A && git commit -m "<Description of your work>"` (committing your
work)
Expand All @@ -75,27 +90,26 @@ https://github.com/Jimskapt/rust-book-fr*
15. `git push origin` (pushing your work on your fork)
16. In GitHub, create a new pull request from your fork to the main translation
repository, in order to mark your work ready for a proofreading.
17. After proofreading (and eventualy some edits from others), it would be
17. After someone proofreading it (and eventualy some edits), it would be
merged on `french-release` branch.

### Update from English book
### Update your fork with another fork

01. `git remote add --track master english-book https://github.com/rust-lang/book.git`
01. `git remote add english-book https://github.com/rust-lang/book.git`
(Add source of the *English main repository*)
02. `git fetch english-book` (fetching the latest changes from the *English main
repository*)
03. `git merge english-book/master` (merging latest changes from *English main
repository* on current branch)

It is also the same to update your fork with the main translate repository.

### Add a translation term

*(PS : see previous Guideline `Translation terms` on this same page)*

01. `git checkout -b <your_new_working_branch_name>` (create your new working
branch)
01. Check if you are one your working branch, or create it (see `Translate flow`
process)
02. Edit the `/FRENCH/src/translation-terms.md` file with your new technical
term translation.
03. Then do a *Push Request (PR)* in order discuss it with the team.
04. While PR is being accepted and merged, you would better use the English word
in your work instead of your translation, and then edit it when the team is
OK with the translation.
term translation. Write it in singular and if necessary, specify the gender
of the translation in `Remarques` column.
14 changes: 13 additions & 1 deletion FRENCH/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,16 @@

- [Programmer un jeu de devinettes](ch02-00-guessing-game-tutorial.md)

- [Le type de découpage](ch04-03-slices.md)
- [Les concepts courants de programmation](ch03-00-common-programming-concepts.md)
- [Les variables et la mutabilité](ch03-01-variables-and-mutability.md)
- [Les types de données](ch03-02-data-types.md)
- [Les fonctions](ch03-03-how-functions-work.md)
- [Les commentaires](ch03-04-comments.md)
- [Les structures de contrôle](ch03-05-control-flow.md)

- [Comprendre la possession](ch04-00-understanding-ownership.md)
- [Qu'est-ce que la possession ?](ch04-01-what-is-ownership.md)

- [Utiliser les structures pour structurer des données apparentées](ch05-00-structs.md)
- [Définir et instancier des structures](ch05-01-defining-structs.md)
- [Un exemple de programme qui utilise des structures](ch05-02-example-structs.md)
2 changes: 1 addition & 1 deletion FRENCH/src/ch00-00-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ avez appris précédemment. Les chapitres 2, 12 et 20 sont des chapitres de
projet ; les autres sont des chapitres théoriques.

<!--
Chapter 1 explains how to install Rust, how to write a Hello, world! program,
Chapter 1 explains how to install Rust, how to write a Hello, world! program,
and how to use Cargo, Rust’s package manager and build tool. Chapter 2 is a
hands-on introduction to the Rust language. Here we cover concepts at a high
level, and later chapters will provide additional detail. If you want to get
Expand Down
12 changes: 6 additions & 6 deletions FRENCH/src/ch01-01-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,14 @@ sont [le forum d'utilisateurs][users] et [Stack Overflow][stackoverflow].
### Documentation en local

<!--
The installer also includes a copy of the documentation locally, so you can
read it offline. Run `rustup doc` to open the local documentation in your
browser.
The installation of Rust also includes a copy of the documentation locally, so
you can read it offline. Run `rustup doc` to open the local documentation in
your browser.
-->

L'installateur embarque aussi une copie de la documentation en local pour que
vous puissiez la lire hors ligne. Lancez `rustup doc` afin
d'ouvrir la documentation locale dans votre navigateur.
L'installation de Rust embarque aussi une copie de la documentation en local
pour que vous puissiez la lire hors ligne. Lancez `rustup doc` afin d'ouvrir la
documentation locale dans votre navigateur.

<!--
Any time a type or function is provided by the standard library and you’re not
Expand Down
12 changes: 6 additions & 6 deletions FRENCH/src/ch01-02-hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ votre dossier utilisateur et de ranger tous vos projets là-dedans.

<!--
Open a terminal and enter the following commands to make a *projects* directory
and a directory for the Hello, world! project within the *projects* directory.
and a directory for the Hello, world! project within the *projects* directory.
-->

Ouvrez un terminal et écrivez les commandes suivantes pour créer un
dossier *projects* et un dossier pour le projet *Hello, world!* à l'intérieur
dossier *projects* et un dossier pour le projet Hello, world! à l'intérieur
de ce dossier *projects*.

<!--
Expand Down Expand Up @@ -186,11 +186,11 @@ programme Rust. Cela fait de vous un développeur Rust — bienvenue !
### Structure d'un programme Rust

<!--
Let’s review in detail what just happened in your Hello, world! program.
Let’s review in detail what just happened in your Hello, world! program.
Here’s the first piece of the puzzle:
-->

Regardons en détail ce qui s'est passé dans votre programme *Hello, world!*.
Regardons en détail ce qui s'est passé dans votre programme Hello, world!.
Voici le premier morceau du puzzle :

```rust
Expand Down Expand Up @@ -394,11 +394,11 @@ $ ./main # ou .\main.exe sous Windows
```

<!--
If *main.rs* was your Hello, world! program, this line would print `Hello,
If *main.rs* was your Hello, world! program, this line would print `Hello,
world!` to your terminal.
-->

Si *main.rs* était votre programme *Hello, world!*, cette ligne devrait afficher
Si *main.rs* était votre programme Hello, world!, cette ligne devrait afficher
`Hello, world!` dans votre terminal.

<!--
Expand Down
36 changes: 18 additions & 18 deletions FRENCH/src/ch01-03-hello-cargo.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ appelle *dépendance* une bibliothèque nécessaire pour votre code.)

<!--
The simplest Rust programs, like the one we’ve written so far, don’t have any
dependencies. So if we had built the Hello, world! project with Cargo, it would
only use the part of Cargo that handles building your code. As you write more
complex Rust programs, you’ll add dependencies, and if you start a project
dependencies. So if we had built the Hello, world! project with Cargo, it
would only use the part of Cargo that handles building your code. As you write
more complex Rust programs, you’ll add dependencies, and if you start a project
using Cargo, adding dependencies will be much easier to do.
-->

Des programmes Rust très simples, comme le petit que nous avons précédemment,
n'ont pas de dépendance. Donc si nous avions compilé le projet *Hello, world!*
n'ont pas de dépendance. Donc si nous avions compilé le projet Hello, world!
avec Cargo, cela n'aurait fait appel qu'à la fonctionnalité de Cargo qui
s'occupe de la compilation de votre code. Quand vous écrirez des programmes Rust
plus complexes, vous ajouterez des dépendances, et si vous créez un projet en
Expand Down Expand Up @@ -71,13 +71,13 @@ séparément Cargo.

<!--
Let’s create a new project using Cargo and look at how it differs from our
original Hello, world! project. Navigate back to your *projects* directory (or
original Hello, world! project. Navigate back to your *projects* directory (or
wherever you decided to store your code). Then, on any operating system, run
the following:
-->

Créons un nouveau projet en utilisant Cargo et analysons les différences avec
notre projet initial *Hello, world!*. Retournez dans votre dossier *projects*
notre projet initial Hello, world!. Retournez dans votre dossier *projects*
(ou là où vous avez décidé d'enregistrer votre code). Ensuite, sur n'importe
quel système d'exploitation, lancez les commandes suivantes :

Expand Down Expand Up @@ -220,13 +220,13 @@ fn main() {
```

<!--
Cargo has generated a Hello, world! program for you, just like the one we wrote
in Listing 1-1! So far, the differences between our previous project and the
project Cargo generates are that Cargo placed the code in the *src* directory,
and we have a *Cargo.toml* configuration file in the top directory.
Cargo has generated a Hello, world! program for you, just like the one we
wrote in Listing 1-1! So far, the differences between our previous project and
the project Cargo generates are that Cargo placed the code in the *src*
directory, and we have a *Cargo.toml* configuration file in the top directory.
-->

Cargo a généré un programme *Hello, world!* pour vous, exactement comme celui
Cargo a généré un programme Hello, world! pour vous, exactement comme celui
que nous avons écrit dans l'encart 1-1 ! Pour le moment, les seules différences
entre notre projet précédent et le projet que Cargo a généré sont que Cargo a
placé le code dans le dossier *src*, et que nous avons un fichier de
Expand All @@ -247,14 +247,14 @@ pas directement relié à votre code. Utiliser Cargo vous aide à structurer vos
projets. Il y a un endroit pour tout, et tout est à sa place.

<!--
If you started a project that doesn’t use Cargo, as we did with the Hello,
world! project, you can convert it to a project that does use Cargo. Move the
If you started a project that doesn’t use Cargo, as we did with the Hello,
world! project, you can convert it to a project that does use Cargo. Move the
project code into the *src* directory and create an appropriate *Cargo.toml*
file.
-->

Si vous commencez un projet sans utiliser Cargo, comme nous l'avons fait avec
le projet *Hello, world!*, vous pouvez le transformer en projet qui
le projet Hello, world!, vous pouvez le transformer en projet qui
utilise Cargo. Déplacez le code de votre projet dans un dossier *src* et créez
un fichier *Cargo.toml* adéquat.

Expand All @@ -265,13 +265,13 @@ un fichier *Cargo.toml* adéquat.
### Compiler et exécuter un projet Cargo

<!--
Now let’s look at what’s different when we build and run the Hello, world!
Now let’s look at what’s different when we build and run the Hello, world!
program with Cargo! From your *hello_cargo* directory, build your project by
entering the following command:
-->

Maintenant, regardons ce qu'il y a de différent quand nous compilons et
exécutons le programme *Hello, world!* avec Cargo ! À l'intérieur de votre
exécutons le programme Hello, world! avec Cargo ! À l'intérieur de votre
dossier *hello_cargo*, compilez votre projet en utilisant la commande suivante :

```text
Expand Down Expand Up @@ -524,14 +524,14 @@ avez appris comment :
* Install the latest stable version of Rust using `rustup`
* Update to a newer Rust version
* Open locally installed documentation
* Write and run a Hello, world! program using `rustc` directly
* Write and run a Hello, world! program using `rustc` directly
* Create and run a new project using the conventions of Cargo
-->

* Installer la dernière version stable de Rust en utilisant `rustup`
* Mettre à jour Rust vers une nouvelle version
* Ouvrir la documentation installée en local
* Écrire et exécuter un programme *Hello, world!* en utilisant directement
* Écrire et exécuter un programme Hello, world! en utilisant directement
`rustc`
* Créer et exécuter un nouveau projet en utilisant les conventions de Cargo

Expand Down
Loading

0 comments on commit 5a848c3

Please sign in to comment.