I have created PRs to normalize all PO files to the new version of
mdbook-i18n-helpers. Simultaneously, we need to update the version used
to publish the course.
This is indirectly part of #330.
I also updated `book.js` and `index.hbs` to the latest versions while
keeping our local modifications.
I tested this locally with `mdbook serve` for both English and
Brazilian Portuguese and everything seems to work fine.
* Run builds on both Mac OS and Linux
This would have helped us catch #570.
* Fix MacOS CI (#848)
* Revert unnecessary changes
The changes might be good, but I want to keep this PR small and
focused. If we end up with the extra `cfg` statements, we should
include a comment to let students know what they do: we’re targeting
people new to Rust, so we need to be careful with explanations.
---------
Co-authored-by: Dominik Maier <domenukk@gmail.com>
These translations all have more than 200 translated messages and
they’ve been updated in the last month.
I suggest we update the list here every few weeks based on input from
the translators: we don’t need a super strict rule here, we just need
interested translators who would like to see their work celebrated.
I suggest we only link completed translations in the language picker
since we have limited space there to differentiate the different
levels of completeness.
The dprint formatter is a flexible system which will use sandboxed
WebAssembly formatters to format our code (mostly: it calls out to
`rustfmt` for Rust code).
A particularly interesting feature is that dprint can format Rust code
blocks in the Markdown files. However, before we turn that on, we need
to have a way to normalize the Markdown text as it is extracted[1].
That is so that the word put into the translations is kept after the
reformatting.
[1]: https://github.com/google/mdbook-i18n-helpers/issues/19
This makes the translation available on the official site. It's not linked yet, but having it available there should make it easier to review the state.
This requires us to run a nightly Rust for our formatting check[1]. Other
users will see a warning when invoking `rustfmt`:
Warning: can't set `imports_granularity = Module`, unstable features
are only available in nightly channel.
This should be harmless overall and help us ensure better consistency
in our import formatting.
[1]: https://rust-lang.github.io/rustfmt/?version=v1.5.1&search=#imports_granularity
* Remove unnecessary jobs names
They are inconsistent with the rest of the jobs and they overflow the
horizontal space in the GitHub UI.
* Remove unnecessary toolchain action
The GitHub runners include rustup and a recent stable Rust. We only
need to add the necessary target and we’re good to go.
This removes a lot of warnings because the action used an outdated
GitHub API: https://github.com/actions-rs/toolchain/issues/219
* Simplify job name
The job is testing a single translation, so it should be singular.
* Test English source with translations
This simplifies the workflow a little and ensures that we get
artifacts uploaded of the English version for every PR.
* Avoid shell command chain
GitHub actions supports setting the working directory directly.
* Upload only the book artifact
Right now, the artifacts all contain the same two top-level folders:
html/ and exerciser/. The former is what we actually deploy, the
second is a side-effect of the exerciser plugin.
With this change, we only upload the HTML and we ensure the zip file
for the xx language has a top-level comprehensive-rust-xx/ folder.
This makes it much nicer to use the generated artifacts.