Skip to content

Commit 28c3afb

Browse files
committed
Enhance i18n:check task
i18n:check task used to verify only if the source en.po file was up to date. The new process instead verifies that all translations are up to date by downloading them directly from Transifex. The previous process was causing some issues since after uploading the en.po file Transifex would change its formatting, meaning when calling i18n:pull we would download a file containing the same information but formatted in a different way and that made the i18n:check command fail. By making the i18n:check task call i18n:pull instead of i18n:update we don't have issues with the formatting anymore. This change also covers a corner-case that would occur when the en.po file wasn't updated since a long time, the i18n:check wouldn't fail because the en.po was the same as before but that wouldn't mean that the translations were up to date with the latest from Transifex.
1 parent 55ad9ec commit 28c3afb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Diff for: .github/workflows/check-i18n-task.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,9 @@ jobs:
3232
repo-token: ${{ secrets.GITHUB_TOKEN }}
3333
version: 3.x
3434

35-
- name: Check i18n source file is up to date
35+
- name: Check i18n source and translation files are up to date
3636
run: task i18n:check
37+
env:
38+
TRANSIFEX_PROJECT: ${{ secrets.TRANSIFEX_PROJECT }}
39+
TRANSIFEX_RESOURCE: ${{ secrets.TRANSIFEX_RESOURCE }}
40+
TRANSIFEX_API_KEY: ${{ secrets.TRANSIFEX_API_KEY }}

Diff for: Taskfile.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ tasks:
299299
i18n:check:
300300
desc: Check if the i18n message catalog was updated
301301
cmds:
302-
- task: i18n:update
302+
- task: i18n:pull
303303
- git add -N ./i18n/data
304304
- git diff --exit-code ./i18n/data
305305

0 commit comments

Comments
 (0)