Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
wpalani committed Jul 12, 2024
2 parents 3a71ae3 + 774d3b9 commit 8be5683
Show file tree
Hide file tree
Showing 11 changed files with 649 additions and 635 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/wp-i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,25 @@ jobs:
continue-on-error: true
run: git diff --exit-code

- name: Fail if language files have changes
- name: Warning if language files have changes
if: steps.changes.outcome == 'failure'
run: |
echo "i18n files are out of date"
echo "Please run command (composer run i18n) locally to update them and commit before releasing"
exit 1
- name: Commit web files
if: steps.changes.outcome == 'failure'
run: |
git config --local user.name "${{ github.event.head_commit.author.name }}"
git config --local user.email "${{ github.event.head_commit.author.email }}"
git remote -v
git add -A
git commit -m "WordPress i18n triggered by commit ${{ github.sha }}"
git status
- name: Push changes
if: steps.changes.outcome == 'failure'
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"i18n-pot": "vendor/bin/wp i18n make-pot . ./languages/wp-plugin-hostgator.pot --headers='{\"Report-Msgid-Bugs-To\":\"https://github.com/newfold-labs/wp-plugin-hostgator/issues\",\"POT-Creation-Date\":\"2023-01-11T20:21:44+00:00\"}' --exclude=assets,tests,src",
"i18n-po": "vendor/bin/wp i18n update-po ./languages/wp-plugin-hostgator.pot ./languages",
"i18n-mo": "vendor/bin/wp i18n make-mo ./languages",
"i18n-json": "rm languages/*.json && vendor/bin/wp i18n make-json ./languages --no-purge --pretty-print",
"i18n-json": "rm -f languages/*.json && vendor/bin/wp i18n make-json ./languages --no-purge --pretty-print",
"i18n": [
"@i18n-pot",
"@i18n-po",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"translation-revision-date": "2023-08-24 18:27",
"generator": "WP-CLI\/2.10.0",
"source": "build\/2.9.3\/index.js",
"source": "build\/2.10.0\/index.js",
"domain": "messages",
"locale_data": {
"messages": {
Expand Down
Loading

0 comments on commit 8be5683

Please sign in to comment.