diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 73e6f798..ee70cb47 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -15,8 +15,14 @@ jobs: submodules: true # Fetch Hugo themes (true OR recursive) fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - - name: Install po4a - run: sudo apt update && sudo apt install po4a -y + # FIXME: ubuntu-22.04 comes with po4a 0.66. + # We need at least v0.69. + # Github does not provide any other suitable image... + # So... we will trick it by downloading the debian package. + # - name: Install po4a + # run: sudo apt update && sudo apt install po4a -y + - name: Install po4a from debian bookworm version + run: wget http://ftp.debian.org/debian/pool/main/p/po4a/po4a_0.69-1_all.deb && dpkg -i po4a_0.69-1_all.deb - name: Setup Hugo uses: peaceiris/actions-hugo@v2 diff --git a/doc-translate.sh b/doc-translate.sh index 4ccdfebc..30782c72 100644 --- a/doc-translate.sh +++ b/doc-translate.sh @@ -8,7 +8,7 @@ ignore_pattern='^#*\s*\{\{%\s*livechat_label[^\}]+\s*\}\}\s*$' # Is po4a new enough? function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; } -required_version='0.66' +required_version='0.69' current_version=$(po4a --version | sed -En 's,po4a version ([0-9][0-9.]+[0-9]).*,\1,p') if version_gt "$required_version" "$current_version"; then echo "ERROR: po4a v$required_version or higher required. Current version: $current_version" diff --git a/support/documentation/content/en/contributing/document/_index.md b/support/documentation/content/en/contributing/document/_index.md index 6a6713db..b7c689b8 100644 --- a/support/documentation/content/en/contributing/document/_index.md +++ b/support/documentation/content/en/contributing/document/_index.md @@ -54,7 +54,7 @@ This page will automatically refresh on each modification. For now, you only have the english version. To update documentation strings, and generate translations, you have to run the `doc-translate.sh` script. -To do so, make sure you have `po4a` (version >= 0.66) installed on your computer. +To do so, make sure you have `po4a` (version >= 0.69) installed on your computer. {{% notice warning %}} Some linux distro (like Debian Bullseye for example) have too old version of `po4a`.