Skip to content

Regenerating pot file #31

Regenerating pot file

Regenerating pot file #31

Workflow file for this run

name: translation-workflow
run-name: Regenerating pot file
on:
workflow_run:
workflows: ["Release"]
types: [requested]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
update-pot-file:
runs-on: ubuntu-latest
steps:
- name: Checkout master branch
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install PHP
uses: shivammathur/setup-php@master
with:
php-version: "7.4"
- name: Setup WP-CLI
uses: godaddy-wordpress/setup-wp-cli@1
#######################
### MAKE EDITS HERE ###
#######################
# edit .pot location
# remove/edit --subtract option
# add any files or folders for excluding if necessary with --exclude options
#######################
- name: Generate new pot file
run: >
wp i18n make-pot . languages/default.pot --skip-audit --subtract="languages/terms_to_exclude.pot"
--exclude="admin"
#######################
- name: Check diff output
run: git diff | wc -l
- name: Add changes
run: git add -A
- name: Check status
run: git status
- name: push changes
uses: github-actions-x/commit@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
push-branch: master
commit-message: 'Update .pot translation file'
name: ${{ github.actor }}
email: ${{github.actor}}@users.noreply.github.com
- name: Check git config
run: git config --list --show-origin