I've taken some work by @fw-immunant and others on the new organization
of the course and condensed it into a form amenable to a text editor and
some computational analysis. You can see the inputs in `course.py` but
the interesting bits are the output: `outline.md` and `slides.md`.
The idea is to break the course into more, smaller segments with
exercises at the ends and breaks in between. So `outline.md` lists the
segments, their duration, and sums those durations up per-day. It shows
we're about an hour too long right now! There are more details of the
segments in `slides.md`, or you can see mostly the same stuff in
`course.py`.
This now contains all of the content from the v1 course, ensuring both
that we've covered everything and that we'll have somewhere to redirect
every page.
Fixes#1082.
Fixes#1465.
---------
Co-authored-by: Nicole LeGare <dlegare.1001@gmail.com>
Co-authored-by: Martin Geisler <mgeisler@google.com>
Part of #671
and #1413
In the code part of content which always is in english and must be
`text-align: left` but with `<html ... dir=rtl >` cuz conflict.
---------
Co-authored-by: Kaveh <hamidrkp@riseup.net>
Graduates the Chinese Traditional translation to the language drop-down
selector.
Part of Chinese (Traditional) translation #684.
File stats (Rust Fundamentals):
```
msggrep -v --location=src/{exercises/,}{android,bare-metal,concurrency,async}{.md,"/*","/*/*","/*/*/*"} po/zh-CN.po | msgfmt -o /dev/null --statistics -
1315 translated messages, 146 fuzzy translations, 149 untranslated messages.
```
This also ports over the latest changes to `book.js` and `index.hbs`.
We probably need to come up with a more systematic way of doing this,
e.g., we could store our changes in a patch and automatically attempt to
apply it onto the latest upstream files.
Initially, I also formatted the templates in `theme/`, but this triggers
https://github.com/prettier/prettier/issues/11834. So I exclude them for
now.
---------
Co-authored-by: Ming-Ying Chung <mych@chromium.org>
This will simplify our mdbook updates since there will be fewer
customizations to copy over when a new mdbook version has changes to the
`index.hbs` template.
This updates our `mdbook` version to the latest version in Git. I copied
the `index.hbs` file from that version and back-ported our changes into
it. I checked English and Danish locally and they both look fine.
The new version has support for right-to-left languages:
https://github.com/rust-lang/mdBook/pull/1641.
We have an in-progress Persian translation. Download the `fa.zip`
artifact after building the PR to check how it looks. I checked Persian
locally and it looks mirrored like I expect (but we will need someone
who can read Persian to actually verify this).
Fixes#1164.
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.
The Danish translation is not yet linked in the language selector
since it is very incomplete. This means that `selectedLang` is `null`
in this case and thus we should not call any methods on it.
The picker is a drop-down menu using the same design as the theme
picker in the top-left.
There doesn’t seem to be an easy way to pass in a list of languages
and descriptions, so for now we’ll have to expand the menu by hand as
we add new languages. A comment has been added to `publish.yml` to
remind us of this.
This replaces a bit of code with the equivalent HTML code.
We also load the script async, which means that the browser won’t
block rendering while waiting for the scripts.
This will allow us to customize the appearance more easily: we can
move the GA logic into the theme (to reduce load times and to simplify
the JS injection logic). We can also add new elements, which is what I
will do next.
The mdbook theme can be added incrementally: if we don’t add a file to
our theme folder, we will get the corresponding file from mdbook.