1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-11-26 09:30:52 +02:00
Commit Graph

6 Commits

Author SHA1 Message Date
Andrew Walbran
7eee892195 Start on AP UART driver example. 2023-03-23 15:06:23 +00:00
rastringer
302c93e3fd
Adds latest English changes to pt-BR translation (#396)
* Adds latest English changes to  pt-BR translation

Updating latest changes in English version to pt-BR.po file using the `msgmerge --update po/pt-BR.po po/messages.pot` command.

* Removes all `fuzzy`

Removing all `#, fuzzy` lines so the translation can be live.
2023-02-14 18:43:00 +01:00
Martin Geisler
48ec773052 Add support for translations
This implements a translation pipeline using the industry-standard
Gettext[1] system.

I picked Gettext for the reasons described in [2] and [3]:

* It’s widely used in open source software. This means that there are
  graphical editors which will help you in editing the `.po` files. An
  example is Poedit[4], which is available for all major platforms.

  There are also many online systems for doing translations. An
  example is Pontoon[5], which is used for the Rust website itself. We
  can consider setting up such an instance ourselves.

* It is a light-weight yet structured format. This means that nothing
  changes with regards to how you update the original English text. We
  can still accept fixes and PRs like normal.

  The structure means that translators can see exactly which part of
  the course they need to update after a change. This is completely
  lost if you simply copy over the original text and translate it
  in-place in the Markdown files.

The code here only adds support for translations. They are not yet
tested, published or used for anything. Next steps will be:

* Add support for switching languages via a bit of JavaScript on each
  page.

* Update the speaker notes feature to support translations (right now
  “Speaker Notes” is hard-coded into the generated HTML). I think we
  should turn it into a mdbook preprocessor instead.

* Add testing: We should test that the `.po` files are well-formed. We
  should also run `mdbook test` on each language since the
  translations can alter the embedded code.

Fixes #115.

[1]: https://www.gnu.org/software/gettext/manual/html_node/index.html
[2]: https://github.com/rust-lang/mdBook/pull/1864
[3]:
https://github.com/rust-lang/mdBook/issues/5#issuecomment-1144887806
[4]: https://poedit.net/
[5]: https://pontoon.rust-lang.org/
2023-01-18 16:12:53 +01:00
Martin Geisler
6f49dcf2fe Add Cargo.lock
This captures a set of known-good dependencies for the provided
solutions.
2023-01-03 14:42:33 +01:00
Kian-Meng Ang
54adbe7f55 Misc doc fixes
List of changes:
- fix typos found via `codespell -S target -L crate`
- ignore Cargo.lock
2022-12-23 11:24:51 +08:00
Martin Geisler
c212a473ba Publish Comprehensive Rust 🦀 2022-12-21 16:38:28 +01:00