A free and open source instant messaging and VoIP chat app built for friends, groups, and communities.
ci: fail when compiled locale modules drift from the Weblate catalogs (#1662)
Hampusc6223d656e84
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yamlindex 48c167a50..92b605dee 100644--- a/.github/workflows/tests.yaml+++ b/.github/workflows/tests.yaml@@ -216,6 +216,48 @@ jobs:cargo run --locked --quiet --manifest-path tools/ci/Cargo.toml -- ci--step knip+ i18n:+ runs-on: ubuntu-24.04+ timeout-minutes: 25+ steps:+ - name: Checkout code+ uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0++ - name: Set up Rust toolchain (CI helpers)+ uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9+ with:+ toolchain: "1.93.0"+ targets: wasm32-unknown-unknown++ - name: Install pnpm+ uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271++ - name: Install Node.js+ uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e+ with:+ node-version: '24'+ cache: 'pnpm'++ - name: Install dependencies+ run: >-+ cargo run --locked --quiet --manifest-path tools/ci/Cargo.toml -- ci+ --step install_dependencies++ - name: Compile locale catalogs+ run: pnpm i18n:compile++ - name: Check drift of compiled locale modules+ run: |+ if ! git diff --exit-code -- \+ packages/errors/src/i18n/locales \+ packages/errors/src/i18n/ErrorI18nTypes.generated.ts \+ fluxer_api/pkgs/email/src/email_i18n/locales \+ fluxer_api/pkgs/email/src/email_i18n/EmailI18nTypes.generated.ts \+ fluxer_api/src/api/content_i18n/locales; then+ echo "::error::Compiled locale modules are outdated. Run 'pnpm i18n:compile' and commit the result. Translations belong in the weblate/ catalogs, not in the generated locales/ modules."+ exit 1+ fi+fonts:runs-on: ubuntu-24.04timeout-minutes: 10