1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-15 06:20:32 +02:00
comprehensive-rust/third_party
Martin Geisler e2c59ddbb5
Test translations using same source as for publish (#1492)
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.
2024-01-04 17:04:44 +01:00
..
cxx Add Chromium section (#1479) 2023-11-27 18:21:19 +00:00
mdbook Test translations using same source as for publish (#1492) 2024-01-04 17:04:44 +01:00
rust-by-example Updates and minor fixes to Day 2: Morning (#372) 2023-02-09 21:15:47 +00:00
rust-on-exercism More tiny fixes (#1577) 2023-12-11 16:13:54 -05:00
README.md Test translations using same source as for publish (#1492) 2024-01-04 17:04:44 +01:00

Third-party Course Content

The files in this directory are included in the course via the {{#include ..}} syntax. All third-party content must be placed here to clearly indicate its origin.

When we publish a translation of the course, we git restore the src/ and third_party/ directories at the repository root back to the date listed in the POT-Creation-Date header of the translation. It is crucial, that all translatable content lives in those two directories. The other files (such as book.toml and theme/) are not restored and we always use the latest version of them.