1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-07-14 10:04:19 +02:00
Commit Graph

26 Commits

Author SHA1 Message Date
af6dff53c2 update to mdbook-0.4.44 and sync book.js and index.hbs (#2610)
mdbook in CI pipeline is updated to mdbook-0.4.44
  - reran mdbook init --theme
  - keep playground improvements
- keep language selector and suggest edit / edit to translation button
text
  - improvement: toc is in separate js file, makes html file way smaller
  - additionally updated to mdbook-i18n-helpers-0.3.5

relevant upstream changes that are used:
- https://github.com/rust-lang/mdBook/pull/2414
- https://github.com/rust-lang/mdBook/pull/2421
- https://github.com/rust-lang/mdBook/pull/2454
- https://github.com/rust-lang/mdBook/pull/2463
2025-02-07 10:07:41 +01:00
957c404ad0 Revert "Fix a few accessibility violations" (#2564)
Reverts google/comprehensive-rust#2547
2025-01-17 01:53:58 -05:00
f95c28f9a7 Fix a few accessibility violations (#2547)
* Add chrome.css and general.css to override default css file. This is
necessary to fix links without underline (hyperlinks relying only on
color).
* Fix pop-out button without id and wrong ARIA-ROLE
* Speaker's notes now at correct heading sequence (H3)
2025-01-15 19:11:19 -08:00
28b5b559b3 fa: Adds Farsi to the language selector (#2436)
Adds Farsi to the drop-down language selector and minor rearrangement on
Translation page
#671
2024-10-15 22:17:55 -07:00
a20b8754a5 Publish Ukrainian translation to language selector (#2183)
Closes #836
2024-07-03 14:04:54 -07:00
b201f2233e Fix language dropdown for Japanese (#2184)
Fix an issue from #2182
2024-07-02 17:31:07 -04:00
1a1480ea04 Publish Japanese translation to language selector (#2182)
#1463 #652
2024-07-01 10:31:25 -07:00
d2f8fc4ac5 Fix: Click anywhere on the language switch menu to switch the language (#2144)
close: https://github.com/google/comprehensive-rust/issues/2132
2024-06-13 12:17:26 -04:00
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
ce27799096 Fixes drop-down link to the correct zh-TW translation (#1416) 2023-10-23 19:34:50 +02:00
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
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
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
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
19f679f8a7 Standardize language menu format and adds Spanish (#1196)
Spanish translation #284
2023-09-11 09:45:20 -04:00
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
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
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
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
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
eb57ba9e51 Publish Korean translation (#428)
* Publish Korean translation

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

* Add translator names for the Korean translation
2023-02-17 17:58:33 +09:00
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
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
be5263010a Use .po file as target for edit link on translations (#394) 2023-02-13 17:42:45 +01:00
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
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