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

1323 Commits

Author SHA1 Message Date
Martin Geisler
1357f7ac57
Add comments and license text to prevent-msgid.py (#1364) 2023-10-19 09:31:06 +00:00
迷渡
a06d9855ad
zh-CN: fix link (#1387) 2023-10-18 21:41:41 -05:00
dependabot[bot]
dd4460af06
Bump rustix from 0.38.15 to 0.38.19 (#1384)
Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.38.15
to 0.38.19.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3a53dfe16c"><code>3a53dfe</code></a>
chore: Release rustix version 0.38.19</li>
<li><a
href="55cbe8839c"><code>55cbe88</code></a>
Fixes for <code>Dir</code> on macOS, FreeBSD, and WASI.</li>
<li><a
href="31fd98ca72"><code>31fd98c</code></a>
Merge pull request from GHSA-c827-hfw6-qwvm</li>
<li><a
href="4bb2f4bbcd"><code>4bb2f4b</code></a>
Add <code>mlockall</code> and <code>munlockall</code> (<a
href="https://redirect.github.com/bytecodealliance/rustix/issues/872">#872</a>)</li>
<li><a
href="d012bcf896"><code>d012bcf</code></a>
Fixes needed by io_uring. (<a
href="https://redirect.github.com/bytecodealliance/rustix/issues/873">#873</a>)</li>
<li><a
href="5e5c0460cc"><code>5e5c046</code></a>
Add a test for <code>get_socket_nosigpipe</code>. (<a
href="https://redirect.github.com/bytecodealliance/rustix/issues/874">#874</a>)</li>
<li><a
href="1a9d12963d"><code>1a9d129</code></a>
chore: Release rustix version 0.38.18</li>
<li><a
href="112c268cd7"><code>112c268</code></a>
io-uring API updates. (<a
href="https://redirect.github.com/bytecodealliance/rustix/issues/871">#871</a>)</li>
<li><a
href="0c227041a7"><code>0c22704</code></a>
Provide {get,set}_socket_nosigpipe on NetBSD and DragonFly BSD (<a
href="https://redirect.github.com/bytecodealliance/rustix/issues/870">#870</a>)</li>
<li><a
href="a00dbd0f53"><code>a00dbd0</code></a>
chore: Release rustix version 0.38.17</li>
<li>Additional commits viewable in <a
href="https://github.com/bytecodealliance/rustix/compare/v0.38.15...v0.38.19">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=rustix&package-manager=cargo&previous-version=0.38.15&new-version=0.38.19)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/google/comprehensive-rust/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-18 16:49:15 -04:00
Martin Geisler
c4ce2ab8a9
Format Python files with YAPF (#1360) 2023-10-18 13:56:05 -04:00
justanotheranonymoususer
0022898ada
Update pattern-matching.md (#1374)
Typo
2023-10-18 08:40:13 +02:00
justanotheranonymoususer
b8b274165c
Update luhn.rs (#1376)
Fix semicolon

I'm only learning Rust but I think it makes more sense
2023-10-18 03:53:14 +00:00
Abner Chou
e0546608d5
Update dprint link in TRANSLATIONS.md (#1377)
Fix the `dprint` official link in the TRANSLATIONS.md file.
2023-10-17 16:02:56 -04:00
Abner Chou
132c960868
zh-CN: Update zh-CN.po (#1378)
Make the day count format consistent.
2023-10-17 16:02:40 -04:00
Rean Fei
01696cee53
zh-CN: Translate some contents into Chinese (Simplified) (#1373)
Made some Chinese translations. Translations might contain errors and
unproper contents.

---------

Co-authored-by: hczh <hczh@google.com>
2023-10-17 18:38:35 +00:00
M1DOR1
c01b5ca6ed
Simplify solution to Luhn exercise (#1296)
Maybe we can use bool double and make the code easier to read and
comprehend
2023-10-17 13:35:34 +00:00
Henri F
0e32756795
Update TRANSLATIONS.md with details on installation and dprint usage (#1372)
Related to #1359
2023-10-16 13:02:38 -07:00
Hidenori Kobayashi
b096dca04b
ja: refresh po file (#1361)
Refresh the po file for Japanese translation. Part of google#652.

Steps taken:
1. MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot"}}' \
  mdbook build -d po
1. msgmerge --update po/ja.po po/messages.pot
2023-10-16 12:35:24 -07:00
AdrienBaudemont
d8fa84aeee
fr: Complete the translation for the page "Running the Course". (#1211)
Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-10-16 13:54:35 +00:00
Martin Geisler
f94daaea73
Add “More to Explore” sections (#1369)
From a discussion in #1313.
2023-10-16 15:42:07 +02:00
Oscar
29c121cb54
fr: add missing translation & correct a typo (#1370)
Found an inconsistency in `fr.po` file, this PR corrects it.

See line 165 & 169 in `fr.po`.

---------

Signed-off-by: Oscar <71343264+0scvr@users.noreply.github.com>
2023-10-16 14:25:05 +02:00
Martin Geisler
15d3172a31
da: refresh translation and fix fuzzy entries (#1264)
There are two commits, I hope they're individually small enough that
GitHub will show them.
2023-10-16 10:12:53 +02:00
Martin Geisler
4560ee8484
Format all PO files with dprint (#1359)
This enforces a consistent formatting for the PO files. The goal of this
is to avoid large diffs due to random and unnecessary reformatting.

We use the format of `msgcat`: this is also waht `msgmerge` produces and
it’s easy to replicate for people by installing Gettext and running
`dprint fmt`.

This is a follow-up to #1351 which started enforcing that the `msgid`
fields don’t change due to reformatting in a PR.

If this turns out to be cumbersome, then we can disable it again.
2023-10-14 12:53:18 +02: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
Fabian Bornhofen
a0bb5f30d0
Add trait bound to example for MutexGuard that is !Send + Sync (#1358)
This example only makes sense (and is therefore easier to understand
logically :) ) if T is Sync. See
https://github.com/rust-lang/rust/issues/41622 - this used to be a bug
initially.
2023-10-12 22:29:37 +02:00
Martin Geisler
692e4b09c8
Update dprint config (#1354)
The new version of the Markdown plugin has the fix for
https://github.com/dprint/dprint-plugin-markdown/issues/87.

Fixes #1308.
2023-10-12 21:30:49 +02:00
Manish Kumar
358d7da22c
Update catch_unwind example (#1356)
Fixes #1352.

---------

Co-authored-by: Martin Geisler <martin@geisler.net>
2023-10-12 15:27:45 +00:00
Seth Paydar
de0e8e6b6d
fix: typo in mark_visited fn docstring (#1355)
Fixes a typo in the `mark_visited` function docstring.

See [`HashSet.insert`
documentation](https://doc.rust-lang.org/stable/std/collections/struct.HashSet.html#method.insert)
2023-10-12 09:42:56 +00:00
Noam Zaks
b1cd19ed20
Added action to prevent changing msgid (#1351)
See discussion in #1344.

This checks that all `.po` files changed in pull requests either contain
changes in POT-Creation-Date (i.e. are run by the specific tool which
should change msgid's), or don't change msgid's (by checking that each
line changed is NOT between msgid and msgstr)

I have tested this on my fork, see [valid
changes](https://github.com/noamzaks/comprehensive-rust/pull/1/files)
where the action passes, and [invalid
changes](https://github.com/noamzaks/comprehensive-rust/pull/2/files)
where it doesn't.

The action also has output for failing/passing:

[passing](https://github.com/noamzaks/comprehensive-rust/actions/runs/6488171290/job/17620037473?pr=1)

[failing](https://github.com/noamzaks/comprehensive-rust/actions/runs/6488175171/job/17620050716?pr=2)
2023-10-11 23:31:51 +02:00
Henri F
a46c6c19df
Adds SketchK credit as a zh-CN translator (#1338) 2023-10-11 11:16:24 -05:00
Martin Geisler
98f5f9a88f
Revert "Fix typo: missing n in unknown" (#1347)
Reverts google/comprehensive-rust#1344.

The edit to the Markdown file has been kept since we _do_ want to fix
the typo!
2023-10-11 11:47:04 +00:00
Nick Radcliffe
b398b46a10
Update dining-philosophers-async.rs (#1346)
Also replace Thales with Hypatia in the async version of Dining
Philosophers.
2023-10-11 13:35:08 +02:00
Nick Radcliffe
18f0ebf9dc
Update dining-philosophers.rs (#1345)
Replace Thales with Hypatia for slightly more inclusivity.
2023-10-11 13:34:12 +02:00
Noam Zaks
4eebe43f3b
Fix typo: missing n in unknown (#1344) 2023-10-11 11:30:19 +01:00
Oscar
b037548923
Add mdbook-xgettext skip for untranslatable codeblocks in Bare Metal (#1339)
See #1327

Removes 280 lines from `messages.pot`.

Signed-off-by: 0scvr <71343264+0scvr@users.noreply.github.com>
2023-10-11 09:32:12 +00:00
Henri F
fb3f58f7ef
zh-CN: Restores PO file structure format (#1337)
This will restore the regular structure format of the PO file (line
breaks and wrap) and does not change the content itself. Part of #324
2023-10-11 10:10:57 +08:00
James Abley
2f50e8be84
Update debugging.md gdb command (#1332)
The provided example did not work for me. I got:

`zsh: command not found: gdb-multiarch`

The other version worked instead. This might be a MacOS thing, or an
Apple Silicon thing. The other command is the same as used in
https://docs.rust-embedded.org/book/intro/install/macos.html so maybe
the MacOS installation guidance also needs updating?
2023-10-10 10:32:31 +01:00
Noam Zaks
ee48c4684a
Fix typo: include semi colon in code (#1335) 2023-10-10 08:15:21 +00:00
Martin Geisler
7bffb7f2c4
Update mutable-static-variables.md (#1331)
From a discussion in #1297.
2023-10-09 15:15:26 +02:00
Martin Geisler
65f6dbcd85
Fix and expand Bare-metal Rust entry in glossary (#1325)
The entry lacked the forced line-break of the other entries.
2023-10-09 11:29:14 +02:00
Qinglin
72e2c94398
zh-CN: translate android/interoperability.md (#1225)
Part of #324
2023-10-09 15:31:50 +08:00
Henri F
5ce24aa2de
zh-CN: Solutions Translations (#1321)
Professional translations for missing exercise solutions entries #324.
This is a new attempt, after fixing the original .po file (#1312).

The diff is large mostly because of the normalization.

Co-authored-by: Zhang SIQI <zhangsiqi1988@gmail.com>
2023-10-09 14:29:28 +08:00
Henri F
6949e1b0b8
zh-CN: Day 3 Translations (#1320)
Professional translations for missing day 3 entries #324.
This is a new attempt, after fixing the original .po file (#1312).

The diff is large mostly because of the normalization.

Co-authored-by: Zhang SIQI <zhangsiqi1988@gmail.com>
2023-10-09 14:21:19 +08:00
Henri F
78dfe60bb3
zh-CN: Day 2 Translations (#1319)
Professional translations for missing day 2 entries #324
This is a new attempt, after fixing the original .po file
(https://github.com/google/comprehensive-rust/pull/1312).
The diff is large mostly because of the normalization (line breaks,
etc.)

Co-authored-by: Zhang SIQI <zhangsiqi1988@gmail.com>
2023-10-09 14:10:17 +08:00
Henri F
fdae99c3d2
zh-CN: Day 1 Translations (#1318)
Professional translations for missing day 1 entries #324
2023-10-09 13:58:57 +08:00
JWSong
8b5f3fd238
ko: fix typo (#1326)
fixed a typo
2023-10-08 11:42:41 +00:00
Martin Geisler
ac8e3ed14f
Mention POT-Creation-Date in instructions (#1314)
I don’t know if this is enough on its own? In principle, the new
publication system should work smoothly without people having to know
much about this header, so that’s why I only describe it briefly.

Followup to #1243.
2023-10-07 18:32:10 +02:00
Martin Geisler
1f022e318a
Add more coverage about the course (#1298)
There has now been three articles about the course.
2023-10-06 14:27:31 +02:00
Martin Geisler
a7f7afa4a2
Format the glossary using a Markdown list (#1307)
This format has two advantages:

- is easier to maintain in the Markdown file. Tables cannot be wrapped
in Markdown, which would severely limit what we can write for each term.
- it can be styled better. The layout now looks more like what you find
in a dictionary.

Before:


![image](https://github.com/google/comprehensive-rust/assets/89623/26bdc39e-4c1d-4f33-90d5-a1637712bcb8)

After:


![image](https://github.com/google/comprehensive-rust/assets/89623/38c1b329-4a80-4771-b415-425a537a0388)


Followup to #1277.
2023-10-06 14:26:52 +02:00
Hidenori Kobayashi
8ff97f1ee7
Remove HTML tag <abbr> (#1310)
The html tag seems to confuse the mdbook-i18n-helpers and make the
translation work hard (#1284).

This simply replaces them with a set of parenthesis.
2023-10-06 10:38:48 +01:00
Henri F
fa1f19e391
zh-CN: Restores lost translations (#1312)
Addresses issue #1311

zh-CN.po stats:
```
msgfmt -o /dev/null --statistics po/zh-CN.po
1258 translated messages, 178 fuzzy translations, 1038 untranslated messages.
```
2023-10-06 08:02:48 +00:00
Zhang SIQI
1a0c0d3fa6
Update CODEOWNERS (#1309)
@henrif75 I want to add myself as the Chinese version reviewer! 
Thank you
2023-10-06 09:56:26 +02:00
Martin Geisler
a38a33c8fb
Use AND between words in mdbook search (#1306)
The default is to use `OR`, which I find counter-intuitive: the more I
try to narrow down a search, the more hits I get. See the full
documentation for more options:


https://rust-lang.github.io/mdBook/format/configuration/renderers.html#outputhtmlsearch
2023-10-05 10:17:05 -04:00
Nick Radcliffe
c93a4bc20c
Remove unused import (use) (#1303)
This should be a clean pull request with just the required diff
2023-10-05 11:17:48 +02:00
Nick Radcliffe
2072ed022b
Fix typo (missing s on threads) (#1304)
Again, a clean pull request for this typo.
2023-10-05 09:17:17 +00:00