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

1428 Commits

Author SHA1 Message Date
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
Henri Fontana
c76f96c435
es: Translations - Day 2 Morning (#1170)
Part of #284
2023-09-08 08:45:35 -07:00
AdrienBaudemont
5205fd232e
fr: Update the fr.po file with new English messages (msgmerge). (#1180) 2023-09-08 14:36:13 +02:00
Martin Geisler
67a98bd895
fa: Publish the in-progress Persian translation (#1183)
This serves as a small demo of right-to-left script in mdbook.
2023-09-08 10:48:05 +02:00
Henri Fontana
1b437ead9b
es: Translations - Day 1 Afternoon (#1169)
Part of #284
2023-09-07 09:40:09 +01:00
Henri Fontana
1c0eaa86cb
es : Translations - Final words and solutions (#1181)
Part of #284
2023-09-07 09:39:43 +01:00
Varun Somani
3813d0b6f1
Add test case for invalid non digit cc number (#1182)
Adding this test case to handle case where we have non-numeric cc number
along with a valid cc number. This is discovered when we filter with
is_numeric() instead of !is_whitespace() all test case does pass. To
handle such scenario adding this test case.
2023-09-07 08:30:18 +00: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
Henri Fontana
8bacabbafa
es: Translations - Day 1 morning (#1167)
Part of #284
2023-09-06 14:10:33 -07:00
Qinglin
3aa29c4c8e
zh-CN: translate android/aidl/client.md (#1088)
Part of #324
2023-09-06 14:20:04 +08:00
Antonio Linhart
11087c8411
Add typos to CI (#1158)
Hi all!

This CL fixes #1093:
* Avoids including current false-positives in the checking of typos
* Excludes localization-related files, as `typos` works with
  English words
* Fixes existing typos caught in the repo

Tested this in CI with a typo and it showed up in the list of actions!

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-09-05 20:21:59 +00:00
Md. Rasel Mandol
4c08d2c399
bn: Refresh most strings (#1162)
After PR #1124 , many source strings have been changed. Fixed most of
them.
2023-09-05 18:50:42 +01:00
AdrienBaudemont
661c9bd729
fr: Updates to the "Why Rust?" page, including fixing issue 1074. Fixes google/comprehensive-rust#1074 (#1159)
Updates to the "Why Rust?" page, including fixing issue 1074.
Fixes google/comprehensive-rust#1074
2023-09-05 13:12:21 +02:00
c6c7
5e72cf5687
Bump proc-macro2 from 1.0.50 to 1.0.66 in /src/bare-metal/microcontro… (#1160)
…llers/examples

The proc-macro2 dependency at 1.0.50 results in a build error mentioning
an unknown feature `proc_macro_span_shrink` that no longer exists in
nightly. Per https://github.com/rust-lang/rust/issues/113152, updating
proc-macro2 to the latest version fixes the error.

The build error I saw before updating the proc-macro2 dependency was the
following:

```
> cargo build --bin minimal
   Compiling proc-macro2 v1.0.50
   Compiling bare-metal v0.2.5
   Compiling typenum v1.16.0
   Compiling nrf52833-hal v0.14.1
error[E0635]: unknown feature `proc_macro_span_shrink`
  --> /home/chcl/.cargo/registry/src/index.crates.io-6f17d22bba15001f/proc-macro2-1.0.50/src/lib.rs:92:30
   |
92 |     feature(proc_macro_span, proc_macro_span_shrink)
   |                              ^^^^^^^^^^^^^^^^^^^^^^

   Compiling cortex-m v0.7.7
For more information about this error, try `rustc --explain E0635`.
error: could not compile `proc-macro2` (lib) due to previous error
warning: build failed, waiting for other jobs to finish...
```
2023-09-04 11:50:12 +01:00
Martin Geisler
55f6a8428e
Remove memory management comparison (#1049)
This is a follow-up to #998 and the discussion in #1049. The
comparison page is now gone: like @randomPoison said, it feels
redundant and I also mostly skip over it when teaching the class.

I also took out some duplication in the Rust memory management page. I
would be up for simplifying the whole chapter down to one or two
slides as @djmitche suggests: that would leave us with more time for
covering ownership.
2023-09-01 11:32:48 -04:00
Martin Geisler
c6af2a0d37
Mention how long each course day is (#1155)
Most classes run with 2.5 hours for the morning session and 2.5 hours
for the afternoon session.

I have tried running the course as 2 × 2.5 hours and 2 × 3 hours. My
experience was that people ended up getting really worn out after
spending 6 hours in total on Rust (7 hours including a lunch break).
However, the experience varies from group to group, so this is just a
recommendation.
2023-09-01 14:13:37 +01:00
Martin Geisler
91e87e2da7
Explain that Rust Fundamentals == first 3 days (#1156) 2023-09-01 13:43:20 +01:00
Henri Fontana
4dfb1ba526
es: Refresh .po file after mdbook-i18n-helpers 0.2.2 (#1143)
I'm preparing several PRs to submit the Spanish translation, but I need
first to normalize the existing es.po file, otherwise the PRs will be
humongous.
Part of #330, #282, #284.
2023-09-01 11:23:24 +02:00