Skip to content

Commit

Permalink
Merge pull request #388 from newfold-labs/update/ecommerce
Browse files Browse the repository at this point in the history
Update/ecommerce
  • Loading branch information
circlecube committed Jan 16, 2024
2 parents 090b813 + 9cee3f5 commit b286902
Show file tree
Hide file tree
Showing 13 changed files with 1,677 additions and 875 deletions.
27 changes: 19 additions & 8 deletions .github/workflows/wp-i18n.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: WP Internationalization
on:
push:
pull_request:
types: [ opened, edited, reopened, ready_for_review, synchronize ]
branches:
- '**'
pull_request:
types: [ opened, edited, synchronize, reopened, ready_for_review ]
- 'main'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
Expand Down Expand Up @@ -64,24 +63,36 @@ jobs:
- name: Install PHP Dependencies
run: composer install --no-progress --optimize-autoloader

- name: Setup Registry
run: printf "\n//npm.pkg.github.com/:_authToken=${{ secrets.NEWFOLD_ACCESS_TOKEN }}" >> .npmrc

- name: NPM Install
run: npm install --legacy-peer-deps

- name: Build JavaScript
run: npm run build

- name: Remove token
run: git checkout -- '.npmrc'

- name: Add text domains
run: npx node-wp-i18n addtextdomain

- name: Generate POT file
run: vendor/bin/wp i18n make-pot . ./languages/${{ github.event.repository.name }}.pot --headers='{"Report-Msgid-Bugs-To":"https://github.com/${{ github.repository }}/issues","POT-Creation-Date":null}' --exclude=assets,storybook,tests,src
- name: Generate language files
run: composer run-script i18n

- name: Check if there are file changes
id: changes
continue-on-error: true
run: git diff --exit-code

- name: Commit web files
- name: Commit updated language 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 add './languages'
git commit -m "WordPress I18N triggered by commit ${{ github.sha }}"
git status
Expand Down
29 changes: 20 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,28 +43,39 @@
"scripts": {
"fix": "vendor/bin/phpcbf --standard=phpcs.xml .",
"lint": "vendor/bin/phpcs --standard=phpcs.xml -s .",
"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": "vendor/bin/wp i18n make-json ./languages --no-purge --pretty-print",
"i18n-json-rename": "for f in ./languages/*.json; do mv \"$f\" \"$(echo \"$f\" | sed 's/[0-9a-fA-F]\\{32\\}/hostgator-script/')\"; done",
"i18n": [
"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 --exclude=assets,storybook,tests,src",
"vendor/bin/wp i18n make-pot . ./languages/wp-plugin-hostgator.pot --headers=POT-Creation-Date:null --exclude=assets,storybook,tests,src"
"@i18n-pot",
"@i18n-po",
"@i18n-mo"
]
},
"scripts-descriptions": {
"fix": "Automatically fix coding standards issues where possible.",
"lint": "Check files against coding standards.",
"i18n": "Generate a .pot file for translation."
"i18n": "Generate new language files.",
"i18n-pot": "Generate a .pot file for translation.",
"i18n-po": "Update existing .po files.",
"i18n-mo": "Generate new language .mo files.",
"i18n-json": "Generate new language .json files.",
"i18n-json-rename": "Rename the language json files to remove the pesky hash."
},
"require": {
"doctrine/inflector": "1.4.4 as 1.3.1",
"newfold-labs/wp-module-coming-soon": "^1.1.12",
"newfold-labs/wp-module-data": "^2.4.15",
"newfold-labs/wp-module-deactivation": "^1.0.3",
"newfold-labs/wp-module-ecommerce": "^1.3.12",
"newfold-labs/wp-module-coming-soon": "^1.1.15",
"newfold-labs/wp-module-data": "^2.4.16",
"newfold-labs/wp-module-deactivation": "^1.0.4",
"newfold-labs/wp-module-ecommerce": "^1.3.19",
"newfold-labs/wp-module-global-ctb": "^1.0.9",
"newfold-labs/wp-module-help-center": "^1.0.22",
"newfold-labs/wp-module-loader": "^1.0.10",
"newfold-labs/wp-module-marketplace": "^2.2.0",
"newfold-labs/wp-module-notifications": "^1.1.6",
"newfold-labs/wp-module-onboarding": "^1.11.13",
"newfold-labs/wp-module-notifications": "^1.2.2",
"newfold-labs/wp-module-onboarding": "^1.12.0",
"newfold-labs/wp-module-performance": "^1.3.0",
"newfold-labs/wp-module-runtime": "^1.0.7",
"newfold-labs/wp-module-secure-passwords": "^1.1",
Expand Down
Loading

0 comments on commit b286902

Please sign in to comment.