Skip to content

i18n: full repo sync (dropped line number comments from po files) #1

i18n: full repo sync (dropped line number comments from po files)

i18n: full repo sync (dropped line number comments from po files) #1

Workflow file for this run

name: i18n Sync Check
on:
push:
paths:
- '**/*.pot?'
pull_request:
paths:
- '**/*.pot?'
jobs:
i18n_check:
runs-on: ubuntu-latest
# Initial tests show the following steps complete in 30-40 seconds
timeout-minutes: ${{ 15 }}
steps:
- name: Checkout PR branch
uses: actions/checkout@v4
- name: Install gettext utilities
run: sudo apt-get install -y gettext
# Run i18n scripts
- name: Run i18n refresh script
run: |
./build/i18n-sync.sh
# msgmerge -V
# msguniq -V
# git status --porcelain | grep '^ M '
# Look for ' M somefile' modified flag in git output
- name: Results
run: |
git status --porcelain
git diff
git status --porcelain | grep -q '^ M ' && echo "::error::Unsynchronized changes detected!" && exit 1 || echo "i18n is up-to-date." && exit 0
# available status for if conditions: success(), failure(), always(), cancelled()
- name: Comment on failure
if: ${{ success() }}
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Test comment on failure!'
})