Skip to content

Commit

Permalink
Merge pull request rust-lang#114 from joeljpresent/FR-ch04-03
Browse files Browse the repository at this point in the history
Proofread ch04-03
  • Loading branch information
Jimskapt authored Nov 14, 2019
2 parents e50cfb0 + 193fa29 commit 3eec83e
Show file tree
Hide file tree
Showing 91 changed files with 8,869 additions and 590 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.

87 changes: 60 additions & 27 deletions FRENCH/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,69 @@ 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 :

All the remaining code (and terminal outputs) should stay in English (variables,
methods/functions, instructions, ...).
- 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 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
https://github.com/Jimskapt/rust-book-fr*
*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 +80,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 +91,44 @@ 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.

### 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;
}

Loading

0 comments on commit 3eec83e

Please sign in to comment.