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 1748 | bat -l patch
```
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
```
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 )
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
```
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.
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!
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.
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!
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.
This splits translated code blocks into individual messages, thus
preserving the translation after #1460.
This removes ~6k unnecessary lines from the PO file.
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.
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!
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>
Part of #671
Summary of changes:
- Translate Part 1,2
- Recheck `#, fuzzy` lines and synced their translations
Co-authored-by: Kaveh <hamidrkp@riseup.net>
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*
Still a long way to go.
Also added a small QoL improvement to the translators instructions.
---------
Co-authored-by: Martin Geisler <martin@geisler.net>
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>