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

105 Commits

Author SHA1 Message Date
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
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
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
1d658ead10
Update to mdbook-i18n-helpers 0.2.4 (#1263)
This is the newest release of mdbook-i18n-helpers, fully backwards
compatible with the old one.
2023-10-01 23:01:22 -07:00
Martin Geisler
42541fc401
Automatically format YAML, CSS, and JS files (#1272)
Initially, I also formatted the templates in `theme/`, but this triggers
https://github.com/prettier/prettier/issues/11834. So I exclude them for
now.

---------

Co-authored-by: Ming-Ying Chung <mych@chromium.org>
2023-10-02 14:48:00 +09: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
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
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
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
Martin Geisler
df5e021a9c
Sort language codes in publish.yml (#1193) 2023-09-11 10:15:04 -04: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
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
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
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
Javier Sorribes-Camargo
e5efc78736
Add @javisorribes as a reviewer for ES (#1090)
Co-authored-by: Dustin J. Mitchell <dustin@v.igoro.us>
Co-authored-by: Henri Fontana <henrif75@users.noreply.github.com>
2023-08-24 14:24:49 -07:00
Martin Geisler
b6d51a7f22
Update mdbook-i18n-helpers to latest version (#1115)
I have created PRs to normalize all PO files to the new version of
mdbook-i18n-helpers. Simultaneously, we need to update the version used
to publish the course.

This is indirectly part of #330.
2023-08-23 12:34:12 -04:00
Claudio Marcial Peon
6370c65684
Update CODEOWNERS to add vzz1x2 as ES reviewer (#1096) 2023-08-23 15:56:47 +00: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
Danny Khosravi
c674d392a4
fa: Add Persian/Farsi language (#1042)
* A partial translation into Farsi
2023-08-09 10:01:02 +01:00
Dima
2bffe39d53
Add @dyeroshenko as a reviewer for PL & RU (#892) 2023-07-03 08:38:09 +02:00
João Victor Mendes
0326a45816
Update CODEOWNERS (#890) 2023-06-30 12:59:24 +00:00
Henri Fontana
cb8acfe2da
Update CODEOWNERS - add pt-BR reviewer (#880)
Adding myself (native Brazilian) as a pt-BR reviewer.
2023-06-28 09:19:33 +02:00
Martin Geisler
186d333227
Run builds on both Mac OS and Linux (#830)
* Run builds on both Mac OS and Linux

This would have helped us catch #570.

* Fix MacOS CI (#848)

* Revert unnecessary changes

The changes might be good, but I want to keep this PR small and
focused. If we end up with the extra `cfg` statements, we should
include a comment to let students know what they do: we’re targeting
people new to Rust, so we need to be careful with explanations.

---------

Co-authored-by: Dominik Maier <domenukk@gmail.com>
2023-06-22 10:38:41 +02:00
Ming-Ying Chung
a5fbd2fd7c
Add PR labeler action to label translation-related PRs (#845)
* Add PR labeler action to label translation-related PRs

* Sync labels when PR changes

* Update instructions for new translation
2023-06-22 14:21:33 +09:00
Andrew Kushyk
a311edb3fb
uk: Create Ukrainian translation (#835)
* Create ua.po

Added Ukrainian translation

* Update ua.po

* Update CODEOWNERS

* Rename ua.po to uk.po

* Update CODEOWNERS

* Update CODEOWNERS

* Update CODEOWNERS

* Update CODEOWNERS
2023-06-21 11:46:11 +01:00
Dima
fa58fc8144
Add dyeroshenko@ as reviewer for po/uk.po (#839)
Add dyeroshenko@ as reviewer for */uk.* file

- Add dyeroshenko@ for translations in Ukrainian
- Fix alphabetical sorting
2023-06-20 14:15:43 +00:00
Md. Rasel Mandol
5d56a529da
Bengali translation: to link incomplete Bengali translation (#819)
Bengali translation: to link incomplete Bengali translation
2023-06-14 19:37:22 +01:00
Nurlita Dhuha Fatmawati
c0a14c6d3e
Update CODEOWNERS to add me as an id reviewer (#804)
Update CODEOWNERS to add me as a id reviewer

Co-authored-by: Nurlita Dhuha Fatmawati <nurlitadf@google.com>
2023-06-13 09:07:30 +00:00
zvonden
c1750baa07
Update CODEOWNERS to add 'zvonden' as a ru reviewer (#768)
Update CODEOWNERS to add me as ru reviewer
2023-06-09 13:30:04 +00:00
osiris5498
05ed9b9889
Update CODEOWNERS (#752)
Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-06-09 09:07:26 +00:00
Jonathan Hao
ede2971a55
zh-TW: Translate testing.md and update CODEOWNERS (#774)
Translate testing.md to zh-TW and update CODEOWNERS
2023-06-09 09:07:12 +00:00
Tjong Anthony
806dbca402
Update CODEOWNERS (#783)
Add tjonganthony@ as ID translation owner.
2023-06-08 12:23:28 +00:00
whd
63252e9d60
Add superwhd to CODEOWNERS of zh-CN.po (#751)
Add superwhd to CODEOWNERS of zh-Hans.po
2023-06-08 08:26:01 +00:00
Yauheni Baltukha
6f1afdb36b
ru: Add @baltuky to CODEOWNERS (#769)
Add @baltuky to CODEOWNERS
2023-06-05 17:38:40 +02:00
Olga Khylkouskaya
bf5e9f832d
Add myself for Russian translations (#764)
add myself for Russian translations
2023-06-03 07:39:27 +00:00
wnghl
41c160260e
Rename zh-CN.po in CODEOWNERS (#759) 2023-06-02 12:07:26 +02:00
Ming-Ying Chung
1d730b0e1b
Rename zh-Hant.po to zh-TW.po and add CODEOWNER (#757)
- Add myself as the code reviewer for zh-TW, as I am already listed in
  [the
  sheet](https://docs.google.com/spreadsheets/d/1bVSJEUGkI9gcqmmA4va4y-I7LzgQUqNwnZYJsQNMBGE/edit#gid=0) for zh-Hant translation
- As mentioned in
https://github.com/google/comprehensive-rust/issues/684#issuecomment-1571700135, Traditional Chinese are used differently in HK and TW. The intention for zh-Hant.go was to cover zh-TW.
2023-06-02 09:53:41 +02:00
Martin Geisler
5de9cdafea
Link to incomplete French, German, and Japanese translations (#730)
These translations all have more than 200 translated messages and
they’ve been updated in the last month.

I suggest we update the list here every few weeks based on input from
the translators: we don’t need a super strict rule here, we just need
interested translators who would like to see their work celebrated.

I suggest we only link completed translations in the language picker
since we have limited space there to differentiate the different
levels of completeness.
2023-05-31 11:55:39 +02:00
Abner Chou
4f2263a785
Update CODEOWNERS (#734)
Chinese translation reviewer.
2023-05-31 09:01:08 +00:00
Martin Geisler
aaca44f62b
Format files with dprint (#711)
The dprint formatter is a flexible system which will use sandboxed
WebAssembly formatters to format our code (mostly: it calls out to
`rustfmt` for Rust code).

A particularly interesting feature is that dprint can format Rust code
blocks in the Markdown files. However, before we turn that on, we need
to have a way to normalize the Markdown text as it is extracted[1].
That is so that the word put into the translations is kept after the
reformatting.

[1]: https://github.com/google/mdbook-i18n-helpers/issues/19
2023-05-30 17:04:19 +02:00
duyguisler
8c726f9c5a
Update CODEOWNERS (#731)
Adding self to owners file.
2023-05-30 12:04:09 +00:00
Eric Dong
326e5bc332
Add @edong to CODEOWNERS for po/zh-Hant.po (#715)
Add @edong to CODEOWNERS for po/zh-Hant.po.
Also, sort the usernames on that row.
2023-05-30 11:04:04 +02:00
Yi Kong
ae705b274c
Add kongy to CODEOWNERS (#706)
I work on the Android LLVM Team and contributed to Rust on Android.

Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-05-27 09:37:58 +00:00
Anlun Xu
8739d1c41d
Add anlunx to CODEOWNERS of zh-Hans (#707) 2023-05-27 11:31:40 +02:00
kuanhungchen
b4ff206b7b
Add kuanhungchen to CODEOWNERS of zh-Hant (#703) 2023-05-26 16:48:58 +00:00
Addison Luh
1b38979a0a
Add hueich to CODEOWNERS (#702) 2023-05-26 17:47:37 +02:00
Victor Hsieh
6886c765ff
Update CODEOWNERS to add victorhsieh as zh-Hant reviewer (#701) 2023-05-26 15:14:08 +00:00
wnghl
7739b4925a
Update CODEOWNERS add @wnghl for Chinese (Simplified) (#696)
Co-authored-by: Martin Geisler <mgeisler@google.com>
2023-05-26 11:46:48 +00:00