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:
parent
67d53d29a6
commit
dc8bd22c33
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user