|
|
|
|
@ -13,17 +13,23 @@ jobs:
|
|
|
|
|
run: tx pull -a --minimum-perc=25 |
|
|
|
|
env: |
|
|
|
|
TX_TOKEN: ${{ secrets.TX_TOKEN }} |
|
|
|
|
- name: Install xgettext |
|
|
|
|
run: sudo apt-get install -y gettext |
|
|
|
|
- name: Setup PHP with tools |
|
|
|
|
uses: shivammathur/setup-php@v2 |
|
|
|
|
with: |
|
|
|
|
php-version: '7.3' |
|
|
|
|
tools: composer, wp-cli |
|
|
|
|
- name: Install dependencies |
|
|
|
|
run: wp package install wp-cli/i18n-command |
|
|
|
|
- name: Generate MO files |
|
|
|
|
run: for file in languages/*.po ; do msgfmt $file -o `echo $file | sed 's/\(.*\.\)po/\1mo/'` ; done |
|
|
|
|
# Remove the next four lines and uncomment the last six lines once the process has been confirmed to work as desired. |
|
|
|
|
- uses: actions/upload-artifact@v2 |
|
|
|
|
run: wp i18n make-mo languages |
|
|
|
|
# Remove this step once you are satisfied with the results; alternatively, you can leave it in place and remove |
|
|
|
|
# the commented out step that follows. |
|
|
|
|
- name: Open PR with changes |
|
|
|
|
uses: peter-evans/create-pull-request@v4 |
|
|
|
|
with: |
|
|
|
|
name: pressbooks-aldine-languages |
|
|
|
|
path: languages/ |
|
|
|
|
title: 'chore(l10n): update translations' |
|
|
|
|
# - name: Commit updated translation files |
|
|
|
|
# uses: stefanzweifel/git-auto-commit-action@v4.1.1 |
|
|
|
|
# uses: stefanzweifel/git-auto-commit-action@v4.13.1 |
|
|
|
|
# with: |
|
|
|
|
# commit_message: 'chore(l10n): update translations' |
|
|
|
|
# file_pattern: *.mo *.po |
|
|
|
|
# file_pattern: '*.mo' |
|
|
|
|
|