Skip to content

Commit

Permalink
Merge with french-release
Browse files Browse the repository at this point in the history
  • Loading branch information
joeljpresent committed Nov 11, 2019
2 parents 5a848c3 + b3b2a5c commit ca6993f
Show file tree
Hide file tree
Showing 29 changed files with 1,826 additions and 370 deletions.
23 changes: 21 additions & 2 deletions FRENCH/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ when you need to translate a technicial term.
### Translation of Rust code

In rust code, we should translate :

- comment
- string text
- variable name
Expand Down Expand Up @@ -45,7 +46,7 @@ instead of space on punctuation who need this space before (like `:`, `!`, `?`,
### Translate flow

*NB : the following term `main translate repository` refers to
https://github.com/Jimskapt/rust-book-fr*
<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`.
Expand Down Expand Up @@ -101,7 +102,7 @@ https://github.com/Jimskapt/rust-book-fr*
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
Expand All @@ -113,3 +114,21 @@ It is also the same to update your fork with the main translate repository.
02. Edit the `/FRENCH/src/translation-terms.md` file with your new technical
term translation. Write it in singular and if necessary, specify the gender
of the translation in `Remarques` column.

### Translate figures

Let's suppose you want to translate Figure 42-69.
You need to have the `dot` installed, for instance after typing
`sudo apt install graphviz`.

01. Copy the DOT figure you want to translate (for instance, `trpl42-69.dot`)
from `/dot/` to `/FRENCH/dot/`.
02. Edit `/FRENCH/dot/trpl42-69.dot` and translate the text into French.
You should not translate the names and values of attributes.
03. Run `dot FRENCH/dot/trpl42-69.dot -Tsvg > FRENCH/src/img/trpl42-69.svg`
04. Edit the new file `FRENCH/src/img/trpl42-69.svg`:
- Within the `<svg>` tag, remove the `width` and `height` attributes, and
set the `viewBox` attribute to `0.00 0.00 1000.00 1000.00` or other values
that don't cut off the image.
- Replace every instance of `font-family="Times,serif"` with
`font-family="Times,Liberation Serif,serif"`.
26 changes: 26 additions & 0 deletions FRENCH/dot/trpl04-01.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
digraph {
rankdir=LR;
overlap=false;
dpi=300.0;
node [shape="plaintext"];

table0[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD COLSPAN="2" SIDES="B">s1</TD></TR>
<TR><TD>nom</TD><TD>valeur</TD></TR>
<TR><TD>pointeur</TD><TD PORT="pointer"></TD></TR>
<TR><TD>taille</TD><TD>5</TD></TR>
<TR><TD>capacité</TD><TD>5</TD></TR>
</TABLE>>];
table1[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD>indice</TD><TD>valeur</TD></TR>
<TR><TD PORT="pointee">0</TD><TD>h</TD></TR>
<TR><TD>1</TD><TD>e</TD></TR>
<TR><TD>2</TD><TD>l</TD></TR>
<TR><TD>3</TD><TD>l</TD></TR>
<TR><TD>4</TD><TD>o</TD></TR>
</TABLE>>];

edge[tailclip="false"];
table0:pointer:c -> table1:pointee;
}

35 changes: 35 additions & 0 deletions FRENCH/dot/trpl04-02.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
digraph {
rankdir=LR;
overlap=false;
dpi=300.0;
node [shape="plaintext"];

table0[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD COLSPAN="2" SIDES="B">s1</TD></TR>
<TR><TD>nom</TD><TD>valeur</TD></TR>
<TR><TD>pointeur</TD><TD PORT="pointer"></TD></TR>
<TR><TD>taille</TD><TD>5</TD></TR>
<TR><TD>capacité</TD><TD>5</TD></TR>
</TABLE>>];
table3[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD COLSPAN="2" SIDES="B">s2</TD></TR>
<TR><TD>nom</TD><TD>valeur</TD></TR>
<TR><TD>pointeur</TD><TD PORT="pointer"></TD></TR>
<TR><TD>taille</TD><TD>5</TD></TR>
<TR><TD>capacité</TD><TD>5</TD></TR>
</TABLE>>];

table1[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD>indice</TD><TD>valeur</TD></TR>
<TR><TD PORT="pointee">0</TD><TD>h</TD></TR>
<TR><TD>1</TD><TD>e</TD></TR>
<TR><TD>2</TD><TD>l</TD></TR>
<TR><TD>3</TD><TD>l</TD></TR>
<TR><TD>4</TD><TD>o</TD></TR>
</TABLE>>];

edge[tailclip="false"];
table0:pointer:c -> table1:pointee;
table3:pointer:c -> table1:pointee;
}

44 changes: 44 additions & 0 deletions FRENCH/dot/trpl04-03.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
digraph {
rankdir=LR;
overlap=false;
dpi=300.0;
node [shape="plaintext"];

table0[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD COLSPAN="2" SIDES="B">s2</TD></TR>
<TR><TD>nom</TD><TD>valeur</TD></TR>
<TR><TD>pointeur</TD><TD PORT="pointer"></TD></TR>
<TR><TD>taille</TD><TD>5</TD></TR>
<TR><TD>capacité</TD><TD>5</TD></TR>
</TABLE>>];
table1[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD>indice</TD><TD>valeur</TD></TR>
<TR><TD PORT="pointee">0</TD><TD>h</TD></TR>
<TR><TD>1</TD><TD>e</TD></TR>
<TR><TD>2</TD><TD>l</TD></TR>
<TR><TD>3</TD><TD>l</TD></TR>
<TR><TD>4</TD><TD>o</TD></TR>
</TABLE>>];

table3[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD COLSPAN="2" SIDES="B">s1</TD></TR>
<TR><TD>nom</TD><TD>valeur</TD></TR>
<TR><TD>pointeur</TD><TD PORT="pointer"></TD></TR>
<TR><TD>taille</TD><TD>5</TD></TR>
<TR><TD>capacité</TD><TD>5</TD></TR>
</TABLE>>];
table4[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD>indice</TD><TD>valeur</TD></TR>
<TR><TD PORT="pointee">0</TD><TD>h</TD></TR>
<TR><TD>1</TD><TD>e</TD></TR>
<TR><TD>2</TD><TD>l</TD></TR>
<TR><TD>3</TD><TD>l</TD></TR>
<TR><TD>4</TD><TD>o</TD></TR>
</TABLE>>];


edge[tailclip="false"];
table0:pointer:c -> table1:pointee;
table3:pointer:c -> table4:pointee;
}

35 changes: 35 additions & 0 deletions FRENCH/dot/trpl04-04.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
digraph {
rankdir=LR;
overlap=false;
dpi=300.0;
node [shape="plaintext"];

table0[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0" BGCOLOR="gray">
<TR><TD COLSPAN="2" SIDES="B">s1</TD></TR>
<TR><TD>nom</TD><TD>valeur</TD></TR>
<TR><TD>pointeur</TD><TD PORT="pointer"></TD></TR>
<TR><TD>taille</TD><TD>5</TD></TR>
<TR><TD>capacité</TD><TD>5</TD></TR>
</TABLE>>];
table3[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD COLSPAN="2" SIDES="B">s2</TD></TR>
<TR><TD>nom</TD><TD>valeur</TD></TR>
<TR><TD>pointeur</TD><TD PORT="pointer"></TD></TR>
<TR><TD>taille</TD><TD>5</TD></TR>
<TR><TD>capacité</TD><TD>5</TD></TR>
</TABLE>>];

table1[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD>indice</TD><TD>valeur</TD></TR>
<TR><TD PORT="pointee">0</TD><TD>h</TD></TR>
<TR><TD>1</TD><TD>e</TD></TR>
<TR><TD>2</TD><TD>l</TD></TR>
<TR><TD>3</TD><TD>l</TD></TR>
<TR><TD>4</TD><TD>o</TD></TR>
</TABLE>>];

edge[tailclip="false"];
table0:pointer:c -> table1:pointee;
table3:pointer:c -> table1:pointee;
}

32 changes: 32 additions & 0 deletions FRENCH/dot/trpl04-05.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
digraph {
rankdir=LR;
overlap=false;
dpi=300.0;
node [shape="plaintext"];

table0[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD COLSPAN="2" SIDES="B">s</TD></TR>
<TR><TD>nom</TD><TD>valeur</TD></TR>
<TR><TD>pointeur</TD><TD PORT="borrower"></TD></TR>
</TABLE>>];
table1[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD COLSPAN="2" SIDES="B">s1</TD></TR>
<TR><TD>nom</TD><TD>valeur</TD></TR>
<TR><TD PORT="borrowee">pointeur</TD><TD PORT="pointer"></TD></TR>
<TR><TD>taille</TD><TD>5</TD></TR>
<TR><TD>capacité</TD><TD>5</TD></TR>
</TABLE>>];
table2[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD>indice</TD><TD>valeur</TD></TR>
<TR><TD PORT="pointee">0</TD><TD>h</TD></TR>
<TR><TD>1</TD><TD>e</TD></TR>
<TR><TD>2</TD><TD>l</TD></TR>
<TR><TD>3</TD><TD>l</TD></TR>
<TR><TD>4</TD><TD>o</TD></TR>
</TABLE>>];

edge[tailclip="false"];
table1:pointer:c -> table2:pointee;
table0:borrower:c -> table1:borrowee;
}

41 changes: 41 additions & 0 deletions FRENCH/dot/trpl04-06.dot
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
digraph {
rankdir=LR;
overlap=false;
dpi=300.0;
node [shape="plaintext"];

table0[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD COLSPAN="2" SIDES="B">world</TD></TR>
<TR><TD>nom</TD><TD>valeur</TD></TR>
<TR><TD>pointeur</TD><TD PORT="pointer2"></TD></TR>
<TR><TD>taille</TD><TD>5</TD></TR>
</TABLE>>];

table3[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD COLSPAN="2" SIDES="B">s</TD></TR>
<TR><TD>nom</TD><TD>valeur</TD></TR>
<TR><TD>pointeur</TD><TD PORT="pointer"></TD></TR>
<TR><TD>taille</TD><TD>11</TD></TR>
<TR><TD>capacité</TD><TD>11</TD></TR>
</TABLE>>];
table4[label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
<TR><TD>indice</TD><TD>valeur</TD></TR>
<TR><TD PORT="pointee">0</TD><TD>h</TD></TR>
<TR><TD>1</TD><TD>e</TD></TR>
<TR><TD>2</TD><TD>l</TD></TR>
<TR><TD>3</TD><TD>l</TD></TR>
<TR><TD>4</TD><TD>o</TD></TR>
<TR><TD>5</TD><TD> </TD></TR>
<TR><TD PORT="pointee2">6</TD><TD>w</TD></TR>
<TR><TD>7</TD><TD>o</TD></TR>
<TR><TD>8</TD><TD>r</TD></TR>
<TR><TD>9</TD><TD>l</TD></TR>
<TR><TD>10</TD><TD>d</TD></TR>
</TABLE>>];


edge[tailclip="false"];
table0:pointer2:c -> table4:pointee2;
table3:pointer:c -> table4:pointee;
}

1 change: 1 addition & 0 deletions FRENCH/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

- [Comprendre la possession](ch04-00-understanding-ownership.md)
- [Qu'est-ce que la possession ?](ch04-01-what-is-ownership.md)
- [Les références et l'emprunt](ch04-02-references-and-borrowing.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)
Expand Down
2 changes: 2 additions & 0 deletions FRENCH/src/ch00-00-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,7 @@ il ne compile pas ! Assurez-vous d'avoir lu le texte autour pour savoir si
l'exemple que vous tentez de compiler doit échouer. Ferris va aussi vous aider
à identifier du code qui ne devrait pas fonctionner :

<!-- markdownlint-disable -->
<!--
| Ferris | Meaning |
|------------------------------------------------------------------------|--------------------------------------------------|
Expand All @@ -451,6 +452,7 @@ l'exemple que vous tentez de compiler doit échouer. Ferris va aussi vous aider
| <img src="img/ferris/unsafe.svg" class="ferris-explain"/> | This code block contains unsafe code. |
| <img src="img/ferris/not_desired_behavior.svg" class="ferris-explain"/>| This code does not produce the desired behavior. |
-->
<!-- markdownlint-restore -->

| Ferris | Signification |
|------------------------------------------------------------------------|--------------------------------------------------|
Expand Down
6 changes: 5 additions & 1 deletion FRENCH/src/ch01-01-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,16 @@ pour Visual Studio 2013 ou plus récent. La méthode la plus facile pour obtenir
les outils de compilation est d'installer
[Build Tools pour Visual Studio 2019][visualstudio].

[install]: https://www.rust-lang.org/tools/install
<!-- markdownlint-disable -->
<!--
[install]: https://www.rust-lang.org/tools/install
[visualstudio]: https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2019
FR translation: the website redirects to French version, we lose the "id" link.
Fix is directly below:
-->
<!-- markdownlint-restore -->

[install]: https://www.rust-lang.org/tools/install
[visualstudio]: https://www.visualstudio.com/fr/downloads/#build-tools-for-visual-studio-2019

<!--
Expand Down
1 change: 0 additions & 1 deletion FRENCH/src/ch01-02-hello-world.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ For Windows CMD, enter this:

Avec CMD sous Windows, écrivez ceci :


```cmd
> mkdir "%USERPROFILE%\projects"
> cd /d "%USERPROFILE%\projects"
Expand Down
13 changes: 9 additions & 4 deletions FRENCH/src/ch02-00-guessing-game-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -1529,6 +1529,7 @@ However, the code in Listing 2-4 won’t compile yet. Let’s try it:
Cependant, notre code dans l'encart 2-4 ne compile pas encore. Essayons de le
faire :

<!-- markdownlint-disable -->
<!--
```text
$ cargo build
Expand All @@ -1546,6 +1547,7 @@ error: aborting due to previous error
Could not compile `guessing_game`.
```
-->
<!-- markdownlint-restore -->

```text
$ cargo build
Expand Down Expand Up @@ -1769,7 +1771,8 @@ L'utilisation de `parse` peut facilement mener à une erreur. Si par exemple,
le texte contient `A👍%`, il ne sera pas possible de le convertir en nombre.
Comme elle peut échouer, la méthode `parse` retourne un type `Result`, comme
celui que la méthode `read_line` retourne (comme nous l'avons vu plus tôt dans
[“Gérer les erreurs potentielles avec le type `Result`](#gérer-les-erreurs-potentielles-avec-le-type-result)<!-- ignore-->).
[“Gérer les erreurs potentielles avec le type
`Result`](#gérer-les-erreurs-potentielles-avec-le-type-result)<!-- ignore-->).
Nous allons gérer ce `Result` de la même manière, avec à nouveau la méthode
`expect`. Si `parse` retourne une variante `Err` de `Result` car elle ne peut
pas créer un nombre à partir de la chaîne de caractères, l'appel à
Expand Down Expand Up @@ -1922,11 +1925,12 @@ user can take advantage of that in order to quit, as shown here:
L'utilisateur pourrait quand même interrompre le programme en utilisant le
raccourci clavier <span class="keystroke">ctrl-c</span>.
Mais il y a une autre façon d'échapper à ce monstre insatiable, comme nous
l'avons abordé dans la partie
[“Comparer le nombre saisi au nombre secret”](#comparer-le-nombre-saisi-au-nombre-secret)<!-- ignore --> :
si l'utilisateur saisit quelque chose qui n'est pas un nombre, le programme va
l'avons abordé dans la partie [“Comparer le nombre saisi au nombre
secret”](#comparer-le-nombre-saisi-au-nombre-secret)<!-- ignore --> : si
l'utilisateur saisit quelque chose qui n'est pas un nombre, le programme va
planter. L'utilisateur peut procéder ainsi pour le quitter, comme ci-dessous :

<!-- markdownlint-disable -->
<!--
```text
$ cargo run
Expand Down Expand Up @@ -1954,6 +1958,7 @@ note: Run with `RUST_BACKTRACE=1` for a backtrace.
error: Process didn't exit successfully: `target/debug/guess` (exit code: 101)
```
-->
<!-- markdownlint-restore -->

```text
$ cargo run
Expand Down
4 changes: 2 additions & 2 deletions FRENCH/src/ch03-01-variables-and-mutability.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,8 @@ can shadow a variable by using the same variable’s name and repeating the use
of the `let` keyword as follows:
-->

Comme nous l'avons vu dans la section
[“Comparer le nombre saisi au nombre secret”][comparing-the-guess-to-the-secret-number]<!-- ignore -->
Comme nous l'avons vu dans la section [“Comparer le nombre saisi au nombre
secret”][comparing-the-guess-to-the-secret-number]<!-- ignore -->
du jeu de devinettes au chapitre 2, on peut déclarer une nouvelle variable
avec le même nom qu'une variable précédente, et la nouvelle variable
masquera la première. Les Rustacés disent que la première variable est *masquée*
Expand Down
Loading

0 comments on commit ca6993f

Please sign in to comment.