1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-15 22:37:28 +02:00
Commit Graph

1395 Commits

Author SHA1 Message Date
Martin Geisler
ca424b90e0
Revert "Update boot-library.md" (#1235)
Reverts google/comprehensive-rust#225. We normally include links at the
start of each exercise blocks — but we don't include links in the
individual exercises.

If we want to add such links, we should do it consistently across the
entire course.
2023-09-25 09:39:37 -04:00
Emma Li
0f48230b32
Update CODEOWNERS (#1250)
Update my username
2023-09-25 05:47:47 -07:00
Martin Geisler
ca966f304c
Sync src/ with date in PO file when publishing (#1243)
Before, we always used the latest English source files when
publishing. This means that translations become outdated as soon as
anything is changed in the source.

This PR changes will instead freeze translations in place: they will
keep using the same English source files until a new POT file is
merged into the translation. We do this by relying on the
POT-Creation-Date field in the PO files.

We still use up-to-date versions of all other files: this allows us to
fix things in the theme, for example. So the assumption here is that
never versions of our infrastructure remains compatible with old
versions of the Markdown files.

This approach has a problem: when files are moved, the English
translation will link to the new name. This name will not exist in the
old translations. We might be able to disable these links somehow.

Part of google/mdbook-i18n-helpers#16. The
logic here should eventually be moved to somewhere in
mdbook-i18n-helpers, most likely to the renderer that @sakex is
building in google/mdbook-i18n-helpers#84.
2023-09-25 09:52:39 +02:00
Daniel Fernández Núñez
9d21fe159a
Fix bad link in speaker notes Day 2 exercises (#1244) 2023-09-25 07:01:40 +00:00
Hidenori Kobayashi
f6e128b4ad
ja: Translations - bare-metal.md (#1197)
Part of google#652.
2023-09-25 02:58:25 +00:00
Kanta Yamaoka (山岡幹太)
a9183eb305
ja: Translate Chapter 50, Send and Sync (#1161)
Hi, JA translation folks (#652), here's a MR for the chapter "Send and
Sync". This chapter is particularly interesting and contains very
rust-specific concepts which seems unfamiliar to me. Any feedback and
suggestions are welcome :)
2023-09-24 12:07:55 +09:00
Martin Geisler
187fc20007
Fix solution for Storing Books exercise (#1237)
As pointed out by @njr0 in #1233, we were making the exercise confusing
by showing people code that cannot work — and then expecting the course
participants to somehow fix this, without setting clear boundaries for
what can and cannot be modified.

This PR should align the exercise with the other exercises in the course
and avoid the “brain teaser” here.

This also has the advantage of having a full working solution, with no
commented code which will bit-rot over time.
2023-09-22 11:22:51 -04:00
Dustin J. Mitchell
c4a821d43d
Add a pattern-matching exercise (#1231)
This adds a second day-1 afternoon exercise, drawn from the v2 work. It
illustrates general use of an enum and also previews `Result`.

Fixes #1228.
2023-09-22 13:36:57 +02:00
Hatim Nalawala
cc0a78ed9a
Move CSS files into theme/ folder (#1229)
Hi all,
This PR fixes https://github.com/google/comprehensive-rust/issues/1226:

* Moved CSS files to `theme/css`
* Moved speaker-notes.js to `theme/`
* Updated paths in book.toml
2023-09-21 11:00:27 +02:00
Dustin J. Mitchell
4815264e2d
Add mdbook-course to handle parsing frontmatter (#1224)
In v2 of the course, I'd like to include an estimate of the time to be
spent on each segment in the Markdown file. I think a good place for
such metadata is in the frontmatter.

For review purposes, though, I just want to display that information.
So, this is a start at a new mdbook preprocessor that just separates out
the frontmatter and includes it in a `<pre>` block. Eventually, I'd like
to parse it and put the time in the speaker notes.

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-09-20 10:01:53 -04:00
Martin Geisler
ddc9ea1fa6
Replace binary_search example with try_into (#1213)
I don't think `binary_search` is the best example of using `Result` — it
should actually use an `Either` type instead.
2023-09-20 15:52:10 +02:00
Martin Geisler
38557b142a
Use latest mdbook-i18n-helpers in action.yml (#1221)
The new release will allow us to skip untranslatable text in the course,
thus reducing the amount of work and churn for our translators.
2023-09-20 10:38:15 +02:00
Yarema Mazuryk
9ca8d5e286
uk: Continued Translation - Finished 1-200, Continued with 201-400 (#1208)
part of #836
2023-09-19 16:03:00 +01:00
Martin Geisler
ad6ea690aa
de: Refresh PO file (#1223)
This is a clean `msgmerge --update po/de.po po/messages.pot`.
2023-09-19 14:57:05 +02:00
Igor Petruk
0b8ec0ca3e
Update drop.md (#246)
Adding speaker notes about more details when people might want to call
`drop`.

It is not about a `Drop` trait per-se, but if this is to be mentioned in
the course, this is a reasonable place.

---------

Co-authored-by: Martin Geisler <mgeisler@google.com>
Co-authored-by: Martin Geisler <martin@geisler.net>
2023-09-19 10:29:53 +00:00
Ivan De Marino
c5231fc38a
it: Refresh translation (#1222)
As per
https://github.com/google/comprehensive-rust/blob/main/TRANSLATIONS.md#refreshing-an-existing-translation.

There is a bunch of stuff to correct, but I wanted to start by
submitting this as it contains plenty of changes already.
2023-09-19 11:27:07 +01:00
Qinglin
7d321262c4
Fix link in translations.md (#1220) 2023-09-19 07:30:23 +02:00
Henri Fontana
b666356642
Link incomplete zh-CN and zh-TW in translations.md (#1219)
Co-authored-by: Martin Geisler <martin@geisler.net>
2023-09-18 09:47:27 -07:00
Martin Geisler
3121bff251
Consolidate editor recommendations in main text (#1217)
This streamlines the text about editors by simply mentioning them.
RustRover is mentioned last since it's new and I don't have any
experience with it yet.
2023-09-18 18:37:59 +02:00
Henri Fontana
aba8bf3449
Publish (incomplete) zh-CN and zh-TW translations (#1218)
Part of #684 and #324.
2023-09-18 18:17:40 +02:00
Qinglin
4946146eaf
zh-CN: translate android/logging.md (#1186)
Part of #324.
2023-09-18 09:02:04 -07:00
Martin Geisler
991c437986
Trim off licenses when showing solutions (#1212)
The licenses end up in the PO files, causing extra unnecessary for work
our translators. We save about 300 lines from each PO file with this.

This also solves another small problem: when a file is included with an
anchor, other anchors are automatically stripped away. This removes some
confusing `// ANCHOR: foo` and `// ANCHOR_END: foo` lines in the
solutions.
2023-09-18 11:56:55 +02:00
Markus Zoppelt
fd0678f38e
Add JetBrains' RustRover IDE as IDE suggestion (#1215)
Since JetBrains [announced RustRover as their new Rust IDE
(preview)](https://www.jetbrains.com/rust/), I updated the details with
a suggestion for RR in `Using Cargo`.
2023-09-18 01:27:42 +00:00
Yohann Coppel
cb880fb50b
fr: removing references to Rust (as in... "iron oxide", "rouille" in French) (#1214)
Plus a few more things I saw on the way.

Related to French translation #323

---------

Co-authored-by: Alexandre Senges <alexandre@senges.ch>
2023-09-17 19:29:26 +00: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
Yohann Coppel
e3f52b31c8
fr: Pass on the first 611 lines (up to SUMMARY.md:187) (#1206)
Following rust-book French transations at
https://jimskapt.github.io/rust-book-fr/translation-terms.html to keep
things consistent.

Part of French translation #323
2023-09-12 23:25:24 +02:00
AdrienBaudemont
f9e3be1665
fr: Update the translation for the landing page (#1201)
fr: Update the translation for the landing page (the translation of that
page is now complete).
2023-09-12 23:20:43 +02:00
Yarema Mazuryk
5e22b4b394
uk: new translations for ID Range 1-200 (#1207)
Part of #836
2023-09-12 21:28:02 +01:00
Henri Fontana
c5c3a6bb35
Update translations.md with Spanish translation available (#1202)
#284
2023-09-12 08:59:53 -07:00
Yarema Mazuryk
cf7eea93ff
uk: Update Ukrainian PO file (#1204)
Most recent update to Ukrainian translation
2023-09-12 13:15:27 +00:00
Frances Wingerter
d2e0c62303
exercises/day-2/book-library: Fix typo (#1171) 2023-09-12 09:04:08 +02:00
Henri Fontana
78d9b35d67
es: Fix a few untranslated messages on intro page. (#1199)
Part of Spanish translation #284

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-09-11 11:18:59 -07:00
Martin Geisler
b7a6ccd63c
da: Fix all fuzzy entries (#1122)
Part of #286.
2023-09-11 16:42:56 +02:00
Martin Geisler
5bf99115fe
Update double-free-modern-cpp.md (#1192)
From a discussion in #1122 where I realized that the heading is hard to
translate.

I added a bit of commentary as part of #1083.
2023-09-11 16:38:49 +02:00
Muhammad Mahmood
354f3afa7c
Corrected Luhn's Algorithm Step 3 (#1194)
In the exercise guideline for the Luhn's algorithm (Day 1, Afternoon
exercise), I made a correction to step 3 to provide a more accurate
explanation. Instead of stating that doubling 7 becomes 14, I clarified
that doubling 7 results in 14, and we should sum the individual digits
of 14 to get the correct value of 5.
2023-09-11 14:24:05 +00:00
Jens Reidel
fb95f779d2
Update dependencies in chat-app exercise (#1195)
Hello there 👋 I'm the author of the `tokio-websockets` crate and
today we published version `0.4.0` of the crate, which finally makes the
public API consistent and aligns it with expectations.

`WebsocketStream` now implements the `Stream` trait, so calling `next()`
has to be done via `StreamExt` now. `connect()` returns a tuple of
`(WebsocketStream, Response)`, so that has to be deconstructed now. And
finally, `as_text()` now returns an `Option<&str>` instead of
`Result<&str, Error>`.

And, *very* importantly: The old `WebsocketStream::next` was **not**
cancellation safe, the new `Stream` implementation is. The exercise uses
`select!`, which very well might have caused misbehavior.

Since we also emptied the default features, I've added the very minimal
ones required to compile the exercise.

This is my first contribution here, so feel free to point me to some
things if I'm missing anything. I wasn't really sure what to do about
the translations, I guess I should leave them as is and they'll be
updated by translators in other PRs?

Signed-off-by: Jens Reidel <adrian@travitia.xyz>
2023-09-11 10:19:13 -04:00
Martin Geisler
df5e021a9c
Sort language codes in publish.yml (#1193) 2023-09-11 10:15:04 -04:00
Henri Fontana
19f679f8a7
Standardize language menu format and adds Spanish (#1196)
Spanish translation #284
2023-09-11 09:45:20 -04:00
Henri Fontana
50964b03b7
es: Refresh PO file with latest messages.pot (#1191)
Part of Spanish translation #284
2023-09-10 09:19:10 -07:00
Henri Fontana
059e06356e
Publish Spanish translation (#1188)
Spanish translation was just finished and now we need to publish it.
#284
2023-09-10 11:37:57 +02:00
Martin Geisler
7d68a0869f
da: copy mostly trivial code blocks (#1123)
Most of these code blocks don't have strings or comments to translate
(but a few do).

Part of #286.
2023-09-10 08:14:07 +00:00
Kanta Yamaoka (山岡幹太)
619f8be87b
typo: removed duplicate "seconds" after 500ms (#1190)
Hi, this is a very tiny fix: `take 500ms seconds.` -> `take 500ms.`, but
could you merge if it looks okay? Thank you!
2023-09-09 23:13:59 -07:00
Henri Fontana
4479023b44
es: Translations - Concurrency (#1178)
Part of #284
2023-09-09 12:59:23 -07:00
Henri Fontana
ef3124b394
es: Translations - Day 3 Afternoon (#1175)
Part of #284
2023-09-09 12:58:51 -07:00
Henri Fontana
b8a01241ad
es: Translations - Day 3 Morning (#1174)
Part of #284
2023-09-09 12:58:33 -07:00
Henri Fontana
b4fa57f426
es: Translations - Bare Metal (#1177)
Part of Spanish translation #284
2023-09-09 11:22:55 -07:00
Henri Fontana
dfbc4add25
es: Translations - Android (#1176)
Part of #284
2023-09-09 11:09:48 -07:00
Henri Fontana
5e18033708
es: Translations - Day 2 Afternoon (#1173)
Part of #284
2023-09-09 10:58:16 -07:00
Makarevich
91c4df3644
ru: day 2, afternoon; more control loops translation (#1095) 2023-09-08 17:18:17 +00:00
Henri Fontana
43dc4018f1
es: Translations - introduction (ch.1 and 2) (#1144)
Part of #282 and #284
2023-09-08 09:00:06 -07:00