1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2024-12-02 11:03:18 +02:00
Commit Graph

18 Commits

Author SHA1 Message Date
Martin Geisler
413098cdac
Upload build output as artifacts (#342)
This makes it super easy for translators to see the results of their
work: every PR will now have a list of artifacts, one per translation.
2023-02-06 17:20:32 +01:00
Andrew Walbran
20f02db5f5
Add a cargo workspace containing both crates (#321)
* Move Cargo.toml for exercises to exercises directory.

* Create a workspace with both exercises and i18n-helpers.

* Build in CI as well as testing.

* Binaries must have a main function.

* No need for workspaces configuration for caching anymore.
2023-02-02 16:14:34 +00:00
Martin Geisler
efa593e020
Automatically build and test all translations (#298)
This changes the build workflow to first list all available `.po`
files, and then use this information to start parallel jobs which test
each translation.
2023-01-30 13:41:19 +01:00
Jiyong Park
1040115d8c
Add Korean translation (#300)
* add ko.po

* translate ko(~23.01.19)

* change speaker-note ko

* change id

* translate ko(~23.01.20)

* ~day3 keynote

* draft done to f3446a91

* add @jiyongp comments of upstream PR #276.

* sync & apply review comments(upstream)

sync 585509bb

* After 10000 line apply review comments(upstream)

* chgange build.yml

* Fix the inconsistent newline character problem for the KO translation

If a msgid does not end with the newline character, so should the
msgstr.

Test: msgfmt --statistics -o /dev/null po/ko.po
No error, but shows `1085 translated messages, 675 untranslated
messages.`

---------

Co-authored-by: Evan kim(cli) <keispace.kyj@gmail.com>
2023-01-30 14:12:33 +09:00
Martin Geisler
bad5cc9f68
Publish translations to /xx subdirectories (#264)
This publishes translations (currently only the Danish translation) to
subdirectories named after the ISO 639-1 language code: “da/” for
Danish, “ko/” for Korean, etc.

The list of translation is an explicit list to make it easy for us to
enable/disable translations without being tied to the files in po/.
This allows us to experiment with a translation without publishing it
immediately.

I propose that we eventually move the English pages to an “en/”
directory for symmetry with the other locales. However, for now, the
pages remain at the room of our site (which works fine since we don’t
have a subdirectory named “en/” in the course).
2023-01-24 12:07:04 +01:00
Martin Geisler
1f37933b8b
Extract common build steps to composite actions (#242)
* Extract common build steps to composite actions

This allows us to repeat ourselves less across the different jobs.

I also tested using a “reusable workflow” to factor out the common
steps. However, this starts a separate job without a shared
filesystem, which in turn requires us to upload/download artifacts
when we want to use them in several jobs. The artifacts are downloaded
one-by-one and this adds delays and extra steps to all jobs.

* Move Rust cache setup to its own build step

This made it easy to consistently setup the caching of our nested
projects via the “workspacs” config key.
2023-01-23 17:08:29 +01:00
Martin Geisler
f42c76e6a8 Test that a no-op translation does nothing
This ensures that the full mdbook-xgettext and mdbook-gettext workflow
is stable and doesn’t include spurious newlines.
2023-01-18 16:12:53 +01:00
Martin Geisler
c45bb19528 Test i18n-helpers on pull requests
This ensures that our i18n helpers stay working.
2023-01-18 16:12:53 +01:00
Martin Geisler
afa63ad7b5 Test that translations on pull requests
This adds a simple validation step to the PRs: calling ‘msgfmt’ will
check that the ‘.po’ files are well-formed.
2023-01-18 16:12:53 +01:00
Martin Geisler
499657c830 Simplify the publish workflow
This removes a bunch of boiler-plate comments which were left from the
template I used originally.

It also simplifies the name to just “Publish” since I feel this fits
better for what we do here.
2023-01-03 15:49:21 +01:00
Martin Geisler
a0a1398b9b Simplify workflow name
Now that we multiple jobs, this will look better in the GitHut output:
“Build / mdbook (pull_request)” and “Test / mdbook (pull_request)”.
2023-01-03 14:46:25 +01:00
Martin Geisler
1bfe3cf7a2 Run cargo test on pull requests
This uses the `Cargo.toml` file in the repository to test the provided
solutions.
2023-01-03 14:39:24 +01:00
Martin Geisler
a9ca0c860a Install specific mdbook version in build action
Like in #30, we should install a known-good version of `mdbook` and
`mdbook-svgbob` when testing PRs.
2022-12-23 12:42:55 +01:00
Martin Geisler
466b6e9cd9
Merge pull request #30 from google/mdbook-versions
Include version numbers when installing `mdbook`
2022-12-22 19:57:22 +01:00
Martin Geisler
11789caee2 Add a build workflow to test PRs
We will expand this to build/test other things in the future.
2022-12-22 15:22:41 +01:00
Martin Geisler
85c1684fe3 Include version numbers when installing mdbook 2022-12-22 15:01:55 +01:00
Martin Geisler
653a818b8b Cache the artifacts built by the publish workflow
This should speed up the publication: right now we spend around 4
minutes to build `mdbook` and `mdbook-svgbob`.

With this change, we will only pay that cost once a week (caches
created by GitHub Actions last 7 days[1]).

[1]: https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy
2022-12-21 18:49:41 +01:00
Martin Geisler
0e6c7e30d7
Create publish.yml
This is for publishing the course on GitHub Pages.
2022-12-21 16:50:05 +01:00