1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-14 22:15:54 +02:00
Commit Graph

375 Commits

Author SHA1 Message Date
Martin Geisler
767f1400e8
uk: refresh translation for January 2024 (#1749)
This is a clean refresh, requires only a syntaxtical review.

You can skim this PR with the [GitHub CLI](https://cli.github.com/):

```
gh pr diff 1749 | bat -l patch
```
2024-01-24 13:27:15 +00:00
Martin Geisler
dd48150ce2
it: refresh translation for January 2024 (#1738)
This is a clean refresh, requires only a syntactical review.
2024-01-24 13:10:45 +01:00
Martin Geisler
08af38a63e
es: refresh translation for January 2024 (#1746)
This is a clean refresh, requires only a syntaxtical review.
2024-01-24 13:01:05 +01:00
Andriy Redko
ca93a26758
uk: Day 1: afternoon (#1735)
uk: Day 1: afternoon
2024-01-23 10:46:45 +00:00
Kanta Yamaoka (山岡幹太)
9b8e4b3586
ja: Translate Chapter 60 (Shared State) (#1690)
Hi, ja translation team (#652 ). Here's an MR for the chapter "Shared
States." Could you review the translations? any feedback would be
appreciated. Thank you 😄

cc: @keiichiw , @chikoski , @HidenoriKobayashi , @ternbusty 
(Retrieved translaftion draft #1636 Chapter 60 draft, after recent
`ja.po` file refresh #1676 )
2024-01-18 20:32:44 +09:00
Andriy Redko
594d8bef36
uk: Day 1: morning (#1692)
uk: Day 1: morning

Signed-off-by: Andriy Redko <drreta@gmail.com>
2024-01-15 11:02:30 +00:00
Kanta Yamaoka (山岡幹太)
dfa00b5b09
ja: refresh ja.po file (#1676)
Hi, ja-translators, #652 ! I've refreshed `ja.po` file as of today, Jan
8th 2024.
I used the following procedures. Could you review the diff? Thanks 😊 

```
MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot"}}' \
  mdbook build -d po
```

```
msgmerge --update po/ja.po po/messages.pot
```
2024-01-10 21:15:02 +09:00
Andriy Redko
bdac84a966
uk: setting up and getting ready (Rust v2) (#1679)
Setting up and getting ready sections
2024-01-10 11:11:59 +00:00
Andriy Redko
981676d811
uk: Instructor notes (Rust v2) (#1652)
Instructor notes, running the course,  minor cleanups
2024-01-05 10:14:43 +00:00
Martin Geisler
e2c59ddbb5
Test translations using same source as for publish (#1492)
Before we would run `mdbook test` using the current Markdown sources.
This is subtly wrong: we publish the course using back-dated sources,
so we should therefore also run the tests using the same sources (this
ensures that the code snippets actually work).

After this commit, all translatable content lives in exactly two
directories:

- `src/`
- `third_party/`

We need to restore both directories when testing and when publishing.
This ensures consistency in the Markdown text and in the included
source code.

A new `.github/workflows/build.sh` script takes care of preparing the
two directories according to the date in the PO file (if any).

To ensure we can restore all of `third_party/` to an old commit, the
non-changing `third_party/mdbook/book.js` file has been moved to
`theme/book.js`. The file is generated by `mdbook init --theme`,
making it suitable for modification by the user (us). Symlinks have
been added to `third_party/mdbook/` to indicate that the files
ultimately came from upstream.
2024-01-04 17:04:44 +01:00
Kanta Yamaoka (山岡幹太)
b1f6851bec
ja: Translate Chapter 25 (Traits) (#1436)
Konnichiwa, JP translation folks #652. Here's a MR for **Traits**
chapter. I'm open to suggestions and feedback :) Could you take a look
at it? Thank you!
2024-01-04 16:38:34 +09:00
Martin Geisler
c9f66fd425
Format all Markdown files with dprint (#1157)
This is the result of running `dprint fmt` after removing `src/` from
the list of excluded directories.

This also reformats the Rust code: we might want to tweak this a bit in
the future since some of the changes removes the hand-formatting. Of
course, this formatting can be seen as a mis-feature, so maybe this is
good overall.

Thanks to mdbook-i18n-helpers 0.2, the POT file is nearly unchanged
after this, meaning that all existing translations remain valid! A few
messages were changed because of stray whitespace characters:

     msgid ""
     "Slices always borrow from another object. In this example, `a` has to remain "
    -"'alive' (in scope) for at least as long as our slice. "
    +"'alive' (in scope) for at least as long as our slice."
     msgstr ""

The formatting is enforced in CI and we will have to see how annoying
this is in practice for the many contributors. If it becomes annoying,
we should look into fixing dprint/check#11 so that `dprint` can annotate
the lines that need fixing directly, then I think we can consider more
strict formatting checks.

I added more customization to `rustfmt.toml`. This is to better emulate
the dense style used in the course:

- `max_width = 85` allows lines to take up the full width available in
our code blocks (when taking margins and the line numbers into account).
- `wrap_comments = true` ensures that we don't show very long comments
in the code examples. I edited some comments to shorten them and avoid
unnecessary line breaks — please trim other unnecessarily long comments
when you see them! Remember we're writing code for slides 😄
- `use_small_heuristics = "Max"` allows for things like struct literals
and if-statements to take up the full line width configured above.

The formatting settings apply to all our Rust code right now — I think
we could improve this with https://github.com/dprint/dprint/issues/711
which lets us add per-directory `dprint` configuration files. However,
the `inherit: true` setting is not yet implemented (as far as I can
tell), so a nested configuration file will have to copy most or all of
the top-level file.
2023-12-31 00:15:07 +01:00
Andriy Redko
f43e72e0ad
uk: Table of content translation (Rust v2) (#1613)
Table of content translation (Rust v2)

Signed-off-by: Andriy Redko <drreta@gmail.com>
2023-12-27 12:01:24 +00:00
ompugao
897c13ad84
ja: Fix a typo in ja.po (#1612)
Fix a typo in ja.po: "完結" -> "簡潔"
2023-12-25 20:05:07 +09:00
Martin Geisler
6c84b0aaf4
da: Translations for the other resources page (#1488) 2023-12-21 13:36:59 +00:00
Andriy Redko
75145070de
uk: Regenerate translation for Comprehensive Rust v2 (#1598)
uk: Regenerate translation for Comprehensive Rust v2

Signed-off-by: Andriy Redko <drreta@gmail.com>
2023-12-19 13:19:22 +00:00
Amin Sharifi
9a6a16e4ee
fa: Translate Part 6.x, 7, .., 15.x, 16.1 , .. , 16.5 (#1453)
Part of #671
- Translate Part  `6.x`, `7`, `..`, `15.x`, `16.1` , `..` , `16.5`
2023-12-17 14:14:53 +03:30
Hidenori Kobayashi
9c5865d8ca
ja: translate Ch. 54 (#1573)
Part of #652.
2023-12-12 21:33:08 +09:00
AdrienBaudemont
395d58d7ce
fr: running msgmerge on fr.po (update from the English main text). (#1435)
fr: running msgmerge on fr.po (update from the English main text).
2023-12-11 09:44:32 -05:00
ternbusty
45a8ec4e78
ja: Normalize by running through mdbook-i18n-normalize 0.3.0 (#1482)
Hello, JA translation team!
(https://github.com/google/comprehensive-rust/issues/652)

As part of #1460, I normalized ja.po using mdbook-i18n-normalize 0.3.0.

Steps taken: `mdbook-i18n-normalize`.

I'm open to any feedback or suggestions. Thank you in advance!
2023-12-07 17:23:23 +01:00
Hidenori Kobayashi
857511a763
ja: translate Ch. 43 and 44 (#1442) (#1497)
Part of #652.
2023-12-07 02:04:50 +09:00
Martin Geisler
42019dd5bf
da: Refresh all strings (#1535)
This incorporates the new Chromium material from #1479 as well as the
reshuffle and rewrite from #1073.

This is a clean update without any additional changes. I’ll un-fuzzy the
string later.
2023-12-02 06:25:36 -08:00
Andriy Redko
dc92a2b9ba
uk: Cleaning up Ukrainian cloud-translate translations (day 1) (#1494)
uk: Cleaning up Ukrainian cloud-translate translations (day 1)

Signed-off-by: Andriy Redko <drreta@gmail.com>
2023-11-30 14:27:42 +00:00
Martin Geisler
6de9413ac3
da: translate a number of tiny/trivial messages (#1489) 2023-11-28 19:45:24 +01:00
Andriy Redko
5a7b4d568b
uk: Cleaning up Ukrainian cloud-translate translations (intro section) (#1478)
Covers the intro section (part of
https://github.com/google/comprehensive-rust/issues/836)

Signed-off-by: Andriy Redko <drreta@gmail.com>
2023-11-21 11:22:40 +00:00
Martin Geisler
13c4963fab
da: Run through mdbook-i18n-normalize 0.3.0 (#1461)
This splits translated code blocks into individual messages, thus
preserving the translation after #1460.

This removes ~6k unnecessary lines from the PO file.
2023-11-16 11:45:52 +00:00
Martin Geisler
35beb8d916
pt-BR: remove translated variable names (#1472)
With #1460 merged, we took away the possibility of translating variable,
struct, and function names in the code snippets.

This broke the Brazilian Portuguese translation because it _does_
translate those things quite frequently! This PR reverts the
translations back to the English original.

I tried to also update the surrounding messages to use the English
words: so when a slide talked about a `nome` variable before, it now
uses `name` instead. We don’t have automated tests for this, so I hope I
did this correctly.
2023-11-13 11:31:37 +01:00
RazvanSt
32060afdd1
Adding Romanian translation (#1449)
Initial commit for the Romanian translation.

Part of #1451.
2023-11-12 14:28:26 +01:00
Enes Aydın
0cceaae872
tr: Translating titles and introductory texts into Turkish (#1423)
Turkish Translation.

Part of #500
2023-11-12 14:10:37 +01:00
Qinglin
c8470ea6ba
zh-CN: Fix wrong anchors for zh-CN pages (#1456) 2023-11-11 16:25:06 +01:00
Henri F
25c8bb0135
pt-BR: Normalize .po file with mdbook-i18n-helpers 0.3.0 (#1467)
#317 #1460
2023-11-10 11:45:13 -08:00
ternbusty
0dfd087538
ja: added translation for control-flow (#1445)
Hello, JA translation team! (#652) I've just included some translations
for the "control-flow" section (chapter 8). I'm open to any feedback or
suggestions. Thank you in advance!
2023-11-08 10:35:02 +09:00
JChaooo
f78ecd317b
Update zh-CN.po (修正25.5 impl Trait中形参实参使用错误) (#1448)
25.5 impl Trait中,
“与特征边界类似,impl Trait 语法可以在函数实参 和返回值中使用”
更正为
“与特征边界类似,impl Trait 语法可以在函数形参 和返回值中使用”
2023-11-06 23:46:05 -05:00
Hidenori Kobayashi
2827063fda
ja: translate Ch. 41 and 42 (#1442)
Japanese translation for Ch. 41 & 42.

Part of #652.
2023-11-07 10:20:00 +09:00
Amin Sharifi
9ddc51a945
fa: Translate Part 3 , 4 , 5 ,6.1, 6.2, 6.3 (#1439)
Part of #671 
- Translate Part `3` , `4` , `5` ,`6.1`, `6.2`, `6.3`

---------

Co-authored-by: Hamid R. K. Pisghadam <kaveh@riseup.net>
Co-authored-by: Kaveh <hamidrkp@riseup.net>
2023-11-04 17:41:07 +03:30
King
99e60e35bf
zh-CN: Fix miss htts for https (#1443)
htts => https
2023-11-03 10:34:19 +00:00
Phosphorus Moscu
890ae517d8
es: fix some problems with the Spanish translation (#1333)
Hi! I was checking the book and I found little things to fix.
2023-10-31 11:46:58 +00:00
blkcor
9f56149181
zh-CN: fix typo (#1437)
There is a typo in `while let` loops chapter
2023-10-29 22:06:08 +00:00
Amin Sharifi
77ab1ab6c4
fa: Add transltion of Part 1,2 of Book (#1432)
Part of #671
Summary of changes:

- Translate Part 1,2
- Recheck `#, fuzzy` lines and synced their translations

Co-authored-by: Kaveh <hamidrkp@riseup.net>
2023-10-27 01:06:45 +03:30
Amin Sharifi
629a5c322c
fa: Adding Persian translations for sidebar items (#1427)
Part of #671
**Summary of changes:** 
- Persian version of book messages synced to original book
- Translate sidebar menu
* I just translate and double check until `# src/SUMMARY.md:333` part*
2023-10-25 17:41:54 +03:30
Alex Leoshko
7bb7a48b0b
uk: adding cloud-translate translations to speed up Ukrainian translation (#1425)
Updated translated version of `uk.po` file using `cloud-translate`, for
further editing
2023-10-25 13:43:57 +01:00
Ivan De Marino
0e8aeabe8a
Refreshed existing IT translations, and added a few more (#1391)
Still a long way to go.

Also added a small QoL improvement to the translators instructions.

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-10-25 10:30:58 +01:00
Qinglin
1cf0a86676
zh-CN: translate android/interoperability/with-c.md (#1399)
Part of #324
2023-10-24 22:11:45 -07:00
Qinglin
33867c5752
zh-CN: translate android/interoperability/with-c/bindgen.md (#1400)
Part of #324
2023-10-24 22:11:35 -07:00
Qinglin
dd16f8755c
zh-CN: translate android/interoperability/with-c/rust.md (#1401)
Part of #324


**The translation of "mangling" refers to the Chinese translation on
Wikipedia (https://en.wikipedia.org/wiki/Name_mangling#Rust).**
2023-10-24 22:08:13 -07:00
Rean Fei
42c210b240
zh-CN: Fix usage errors of some punctuations and translate some texts (#1402)
I formatted the translation file on WSL. Worried about being failed
again, so I just improved some translations.

Update: Things seems very nice and I will continue my translating work.
Translation contributors who use Windows OS must use WSL instead of
using `dprint fmt` command on Windows itself, until the resolution that
can make the experience on Windows equal to Linux emerged.

To learn more about that, see this issue: #1394 .

---------

Co-authored-by: Emma Li <liyu1204@gmail.com>
2023-10-24 22:07:41 -07:00
Qinglin
b604828e2a
zh-CN: translate android/interoperability/cpp.md (#1406)
Part of #324
2023-10-24 22:07:13 -07:00
Qinglin
8ec6ff3298
zh-CN: translate exercises/android/morning.md (#1407)
Part of #324
2023-10-24 22:05:53 -07:00
Qinglin
fd3c8f2f81
zh-CN: translate android/interoperability/java.md (#1408)
Part of #324
2023-10-24 22:05:20 -07:00
AdrienBaudemont
266a3d5c9f
fr: translation of the "course structure" page and minor edits. (#1398)
fr: translation of the "course structure" page and minor edits.
2023-10-23 09:13:31 -04:00