diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2021-03-27 13:43:36 +0000 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2021-03-27 15:50:29 +0000 |
| commit | b1294784959adc49b8def73b4f108e1535caf4c4 (patch) | |
| tree | c85115426871dcf2c4fe558b784b62a85ca94289 /.github | |
| parent | dfa3d6f72d7eb8ab6aeafd50373df0eadc48f928 (diff) | |
| download | mullvadvpn-b1294784959adc49b8def73b4f108e1535caf4c4.tar.xz mullvadvpn-b1294784959adc49b8def73b4f108e1535caf4c4.zip | |
Add GitHub Actions workflow for translations
Checks if:
- the repository has the latest translation messages extracted into the
template file;
- the Android resources contain the latest translation messages obtained
from the desktop GUI translation messages;
- the Android messages that aren't available in the desktop GUI are
present in the messages template file.
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/translations.yml | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml new file mode 100644 index 0000000000..2b88426b0f --- /dev/null +++ b/.github/workflows/translations.yml @@ -0,0 +1,50 @@ +name: Translation check CI +on: + # Check whenever a file that affects Rust formatting is changed by a push + push: + paths: + - .github/workflows/translations.yml + - android/translations-converter/** + - android/src/**/plurals.xml + - android/src/**/strings.xml + - gui/** + # Check if requested manually from the Actions tab + workflow_dispatch: +jobs: + check-translations: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Install Node.js + uses: actions/setup-node@v2 + with: + node-version: '12' + + - name: Update NPM + run: npm i -g npm + + - name: Install and cache JS dependencies + uses: bahmutov/npm-install@v1 + with: + working-directory: gui + install-command: npm ci + + - name: Install nightly Rust + uses: ATiltedTree/setup-rust@v1.0.4 + with: + rust-version: stable + + - name: Extract messages from desktop GUI + working-directory: gui/locales + run: npm run update-translations + + - name: Convert translations into Android resources + working-directory: android/translations-converter + run: cargo run + + - name: Check if repository is up to date + run: | + git diff + ! git status -s | grep . |
