1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-14 14:10:05 +02:00
Commit Graph

18 Commits

Author SHA1 Message Date
Martin Geisler
0e8d3e77c2
Update mdbook and mdbook-i18n-helpers (#1658)
This also ports over the `mdbook` theme changes between version 0.4.35
and 0.4.36.
2024-01-05 15:56:18 +01:00
Henri F
ce27799096
Fixes drop-down link to the correct zh-TW translation (#1416) 2023-10-23 19:34:50 +02:00
Henri F
88edcd02e7
Adds Chinese Traditional to the language drop-down (#1411)
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.
```
2023-10-23 09:20:15 -07:00
Martin Geisler
5fafa4842c
Update mdbook to version 0.4.35 (#1302)
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.
2023-10-13 16:40:40 +02:00
Henri F
c2e9a45d49
Adds Chinese Simplified to the language drop-down (#1357)
Graduates the Chinese Simplified translation to the language drop-down
selector. Part of #324
2023-10-13 09:15:00 +02:00
Martin Geisler
0d566ce042
Move JavaScript code to head template (#1210)
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.
2023-09-15 09:52:22 +00:00
Henri Fontana
19f679f8a7
Standardize language menu format and adds Spanish (#1196)
Spanish translation #284
2023-09-11 09:45:20 -04:00
Martin Geisler
09d1265cbb
Add support for right-to-left languages (#1165)
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.
2023-09-07 09:50:44 +02:00
Martin Geisler
8b1bed7db9
Insert <link rel="canonical"> elements (#1140)
This prevents duplicate search results in case copies of the material is
being left visible on the web. See the Search Central
documentation[1] for details.

The implementation here should mostly go away when
https://github.com/google/mdbook-i18n-helpers/issues/70 is implemented.

[1]: https://developers.google.com/search/docs/crawling-indexing/consolidate-duplicate-urls
2023-08-30 22:28:34 +02:00
Martin Geisler
2e92da7acd
Update mdbook to 0.4.34 (#1066)
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.
2023-08-11 15:40:01 +02:00
Martin Geisler
5d71f8a326
Open GitHub edit links in new tabs (#856)
I find this nicer since you don't lose your location in the book then.
2023-06-22 09:50:20 -04:00
Martin Geisler
66247b698e
Fix language selector on unpublished languages (#695)
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.
2023-05-26 16:23:57 +02:00
Jiyong Park
eb57ba9e51
Publish Korean translation (#428)
* Publish Korean translation

* 한국어 -> 한국어 (Korean)

* Add translator names for the Korean translation
2023-02-17 17:58:33 +09:00
Martin Geisler
14b5e86579
Fix links in language picker (#417)
When the current page is not `en`, we need to add an additional `../`
to the path to reach the top of the site.
2023-02-15 18:59:58 +01:00
Martin Geisler
3b7123d21a
Add language picker menu (#411)
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.
2023-02-15 15:10:16 +01:00
Martin Geisler
be5263010a
Use .po file as target for edit link on translations (#394) 2023-02-13 17:42:45 +01:00
Martin Geisler
4409f330c5
Move GA code directly into main page (#289)
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.
2023-01-27 14:37:17 +01:00
Martin Geisler
438c16607d
Add theme generated with mdbook init --theme (#189)
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.
2023-01-25 21:31:22 +01:00