Skip to content

Commit

Permalink
Publish report of translation status. (#2190)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwandor committed Jul 8, 2024
1 parent dc71988 commit c39b6b0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/install-mdbook/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)

Expand All @@ -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
```
Expand Down

0 comments on commit c39b6b0

Please sign in to comment.