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

365 Commits

Author SHA1 Message Date
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
Henri F
696f8e1e58
zh-TW: Day 1 Translations (#1322)
Professional translations for missing day 1 entries #684

---------

Co-authored-by: Victor Hsieh <victorhsieh@gmail.com>
2023-10-22 15:16:04 -07:00
Henri F
9b5bff2133
zh-TW: Day 2 Translations (#1323)
Professional translations for missing day 2 entries #684


---------

Co-authored-by: Martin Geisler <martin@geisler.net>
Co-authored-by: Emma Li <liyu1204@gmail.com>
2023-10-22 15:05:29 -07:00
javad-jafari
09b565f62b
feat:add fa line of tans (#1396)
Co-authored-by: danny <danykhosravi@gmail.com>
Co-authored-by: Martin Geisler <martin@geisler.net>
2023-10-21 12:08:02 +03:30
Henri F
1c7dfb5b49
zh-TW: Day 3 Translations (#1324)
Professional translations for missing day 3 entries #684
2023-10-20 09:52:44 -07:00
liruifengv
e9c61b91c1
zh-CN: Update Index page (#1388) 2023-10-19 14:11:21 +02:00
迷渡
a06d9855ad
zh-CN: fix link (#1387) 2023-10-18 21:41:41 -05:00
Abner Chou
132c960868
zh-CN: Update zh-CN.po (#1378)
Make the day count format consistent.
2023-10-17 16:02:40 -04:00
Rean Fei
01696cee53
zh-CN: Translate some contents into Chinese (Simplified) (#1373)
Made some Chinese translations. Translations might contain errors and
unproper contents.

---------

Co-authored-by: hczh <hczh@google.com>
2023-10-17 18:38:35 +00:00
Hidenori Kobayashi
b096dca04b
ja: refresh po file (#1361)
Refresh the po file for Japanese translation. Part of google#652.

Steps taken:
1. MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot"}}' \
  mdbook build -d po
1. msgmerge --update po/ja.po po/messages.pot
2023-10-16 12:35:24 -07:00
AdrienBaudemont
d8fa84aeee
fr: Complete the translation for the page "Running the Course". (#1211)
Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-10-16 13:54:35 +00:00