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

Publish report of translation status. (#2190)

This commit is contained in:
Andrew Walbran 2024-07-08 15:51:14 +01:00 committed by GitHub
parent dc71988c1a
commit c39b6b01d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 1 deletions

View File

@ -28,6 +28,10 @@ runs:
run: cargo install mdbook-i18n-helpers --locked --version 0.3.3
shell: bash
- name: Install i18n-report
run: cargo install i18n-report --locked --version 0.1.0
shell: bash
- name: Install mdbook-exerciser
run: cargo install --path mdbook-exerciser --locked
shell: bash

View File

@ -49,6 +49,16 @@ jobs:
mv book/$po_lang/html book/html/$po_lang
done
- name: Build translation report
run: i18n-report book/html/translation_report.html po/*.po
- name: Build synced translation report
run: |
cp -r po synced-po
MDBOOK_OUTPUT='{"xgettext": {"pot-file": "messages.pot", "granularity": 0}}' mdbook build -d synced-po
for file in synced-po/*.po; do msgmerge --update $file synced-po/messages.pot ; done
i18n-report book/html/synced_translation_report.html synced-po/*.po
- name: Setup Pages
uses: actions/configure-pages@v5

View File

@ -49,7 +49,7 @@ The course is built using a few tools:
- [mdbook](https://github.com/rust-lang/mdBook)
- [mdbook-svgbob](https://github.com/boozook/mdbook-svgbob)
- [mdbook-i18n-helpers](https://github.com/google/mdbook-i18n-helpers)
- [mdbook-i18n-helpers and i18n-report](https://github.com/google/mdbook-i18n-helpers)
- [mdbook-exerciser](mdbook-exerciser/)
- [mdbook-course](mdbook-course/)
@ -67,6 +67,7 @@ Then install these tools with:
cargo install mdbook
cargo install --locked mdbook-svgbob
cargo install --locked mdbook-i18n-helpers
cargo install --locked i18n-report
cargo install --locked --path mdbook-exerciser
cargo install --locked --path mdbook-course
```