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

121 Commits

Author SHA1 Message Date
Martin Geisler
4744079253
Run translation tests to completion (#1506)
This makes it easier to find and fix all problems in one iteration when
something changes with the translation tooling.
2023-11-29 10:45:42 +01:00
Martin Geisler
ec70069806
Skip calling “apt update” in GH actions (#1490)
We are currently getting an error when we run “apt update”:

    Reading package lists...
E: Repository 'https://packages.microsoft.com/ubuntu/22.04/prod jammy
InRelease' changed its 'Origin' value from 'microsoft-ubuntu-jammy-prod
jammy' to 'Pulp 3'
E: Repository 'https://packages.microsoft.com/ubuntu/22.04/prod jammy
InRelease' changed its 'Label' value from 'microsoft-ubuntu-jammy-prod
jammy' to ''
    Error: Process completed with exit code 100.

I’m not sure why we get this, but updating should not be necessary in
the first place: the Ubuntu images already come with an up-to-date list
of packages.
2023-11-20 17:33:14 +01:00
Kanta Yamaoka (山岡幹太)
9f84e62e56
Add kantasv to CODEOWNERS (#1474)
This adds myself to CODEOWNERS. My main focus is translation, but I'd
like to add me for the future maintenance within the projcect, such as
github actions and tools. Thanks!
2023-11-13 11:31:21 +01:00
RazvanSt
32060afdd1
Adding Romanian translation (#1449)
Initial commit for the Romanian translation.

Part of #1451.
2023-11-12 14:28:26 +01:00
Enes Aydın
0cceaae872
tr: Translating titles and introductory texts into Turkish (#1423)
Turkish Translation.

Part of #500
2023-11-12 14:10:37 +01:00
Martin Geisler
031cb4fb89
Update to mdbook-i18n-helpers 0.3.0 (#1460)
This version has much improved support for the translation of code
blocks. See https://github.com/google/mdbook-i18n-helpers/issues/95 for
details.

Most PO files won’t need any update since most of them don’t translate
the comments in the code blocks. Those that do, can run
`mdbook-i18n-normalize` when they feel like it.
2023-11-11 16:10:13 +01:00
Martin Geisler
dc8bd22c33
Test that we can always extract strings (#1458)
This adds a check that `mdbook-xgettext` can always extract the strings
of the course. Without this, it’s possible to merge a change which will
make `mdbook-xgettext` error out the next time a translator tries to
refresh their translation.
2023-11-09 11:18:30 -05:00
javad-jafari
0f7ec3f507
Update CODEOWNERS (#1440) 2023-11-02 18:17:48 +01:00
Javier Sorribes-Camargo
9d2043e17f
Step down from codeowners (#1438)
I don't have bandwidth and I'm slowing PRs down.
2023-10-30 11:44:41 -07:00
Kaveh
d7ed3c59e9
Add usernames for Persian translation reviewers (#1375)
Hello,
This list is still a Draft, will be ready in a day or two.

---------

Co-authored-by: Hamid R. K. Pisghadam <kaveh@riseup.net>
Co-authored-by: Henri F <henrif75@users.noreply.github.com>
2023-10-25 19:08:56 -07:00
Henri F
2f0c9dc053
Add Spanish reviewer to CODEOWNERS (#1422) 2023-10-25 08:10:56 -07:00
Martin Geisler
a2bb4dab11
Rename action to check msgid changes (#1365)
The focus of the action is to check and validate changes to the `msgid`
fields, not to totally prevent such changes.

This also makes the `paths` a little more precise: we only care about
changes to `po/*.po`.
2023-10-22 16:37:34 +02:00
Henri F
9637e3c607
Delete some inactive reviewers from CODEOWNERS (#1386)
These users don't have write permission to the repository, therefore
they haven't done any review so far.
2023-10-19 09:19:12 -07:00
Henri F
b535ddacab
Adds entry for fa.po (Persian) to CODEOWNERS, and adds one reviewer. (#1385) 2023-10-19 09:10:35 -07:00
Martin Geisler
1357f7ac57
Add comments and license text to prevent-msgid.py (#1364) 2023-10-19 09:31:06 +00:00
Martin Geisler
c4ce2ab8a9
Format Python files with YAPF (#1360) 2023-10-18 13:56:05 -04: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
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