1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-02-22 00:13:10 +02:00

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.
This commit is contained in:
Martin Geisler 2023-11-09 17:18:30 +01:00 committed by GitHub
parent 67d53d29a6
commit dc8bd22c33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,7 +122,6 @@ jobs:
uses: ./.github/workflows/setup-rust-cache
- name: Install Gettext
if: matrix.language != 'en'
run: |
sudo apt update
sudo apt install gettext
@ -134,6 +133,12 @@ jobs:
if: matrix.language != 'en'
run: msgfmt --statistics -o /dev/null po/${{ matrix.language }}.po
- name: Test extracting English strings
if: matrix.language == 'en'
run: |
MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot"}}' mdbook build -d po
msgfmt -o /dev/null --statistics po/messages.pot
- name: Build course
run: mdbook build