From 2649766a941b2728802bebea3d8e38ced3b8ccb6 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 17 May 2024 14:06:34 -0400 Subject: [PATCH 1/5] update i18n workflow to remove json file rename step --- .github/workflows/wp-i18n.yml | 18 ++++-------------- composer.json | 7 +++---- ...s_MX-6754b94c301a2874d64de27b8b37f8dd.json} | 0 ...t_BR-6754b94c301a2874d64de27b8b37f8dd.json} | 0 4 files changed, 7 insertions(+), 18 deletions(-) rename languages/{wp-plugin-hostgator-es_MX-hostgator-script.json => wp-plugin-hostgator-es_MX-6754b94c301a2874d64de27b8b37f8dd.json} (100%) rename languages/{wp-plugin-hostgator-pt_BR-hostgator-script.json => wp-plugin-hostgator-pt_BR-6754b94c301a2874d64de27b8b37f8dd.json} (100%) diff --git a/.github/workflows/wp-i18n.yml b/.github/workflows/wp-i18n.yml index 9863ab0f..edb1c7e0 100644 --- a/.github/workflows/wp-i18n.yml +++ b/.github/workflows/wp-i18n.yml @@ -86,19 +86,9 @@ jobs: continue-on-error: true run: git diff --exit-code - - name: Commit updated language files + - name: Fail if language files have changes if: steps.changes.outcome == 'failure' run: | - git config --local user.name "${GITHUB_ACTOR} " - git config --local user.email "${GITHUB_ACTOR}@users.noreply.github.com" - git remote -v - git add './languages' - 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 }} + echo "i18n files are out of date" + echo "Please run `composer run i18n` to update them locally and commit before releasing" + exit 1 diff --git a/composer.json b/composer.json index f09555e2..27dbcd4c 100644 --- a/composer.json +++ b/composer.json @@ -54,11 +54,11 @@ "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": [ "@i18n-pot", "@i18n-po", - "@i18n-mo" + "@i18n-mo", + "@i18n-json" ] }, "scripts-descriptions": { @@ -68,8 +68,7 @@ "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." + "i18n-json": "Generate new language .json files." }, "require": { "doctrine/inflector": "1.4.4 as 1.3.1", diff --git a/languages/wp-plugin-hostgator-es_MX-hostgator-script.json b/languages/wp-plugin-hostgator-es_MX-6754b94c301a2874d64de27b8b37f8dd.json similarity index 100% rename from languages/wp-plugin-hostgator-es_MX-hostgator-script.json rename to languages/wp-plugin-hostgator-es_MX-6754b94c301a2874d64de27b8b37f8dd.json diff --git a/languages/wp-plugin-hostgator-pt_BR-hostgator-script.json b/languages/wp-plugin-hostgator-pt_BR-6754b94c301a2874d64de27b8b37f8dd.json similarity index 100% rename from languages/wp-plugin-hostgator-pt_BR-hostgator-script.json rename to languages/wp-plugin-hostgator-pt_BR-6754b94c301a2874d64de27b8b37f8dd.json From 0fb0ebb0da68cfcda1af2a8c775f615c09ca7ad4 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 17 May 2024 14:18:29 -0400 Subject: [PATCH 2/5] test workflow fail state with a string change --- bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap.php b/bootstrap.php index 06acd4d9..9c84131a 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -19,7 +19,7 @@ require __DIR__ . '/vendor/autoload.php'; } else { if ( 'local' === wp_get_environment_type() ) { - wp_die( esc_html( __( 'Please install the HostGator Plugin dependencies.', 'wp-plugin-hostgator' ) ) ); + wp_die( esc_html( __( 'TESTINGONLY Please install the HostGator Plugin dependencies.', 'wp-plugin-hostgator' ) ) ); } return; } From 9ce25ab9203840095e7402ce82b82d2f62e589dd Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 17 May 2024 14:23:21 -0400 Subject: [PATCH 3/5] update error message in workflow --- .github/workflows/wp-i18n.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wp-i18n.yml b/.github/workflows/wp-i18n.yml index edb1c7e0..21c88ef8 100644 --- a/.github/workflows/wp-i18n.yml +++ b/.github/workflows/wp-i18n.yml @@ -90,5 +90,5 @@ jobs: if: steps.changes.outcome == 'failure' run: | echo "i18n files are out of date" - echo "Please run `composer run i18n` to update them locally and commit before releasing" + echo "Please run command (composer run i18n) locally to update them and commit before releasing" exit 1 From 6cfd7503f4aa41d3ac63a93e371cf8314c56d494 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Fri, 17 May 2024 14:28:59 -0400 Subject: [PATCH 4/5] revert text change --- bootstrap.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap.php b/bootstrap.php index 9c84131a..06acd4d9 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -19,7 +19,7 @@ require __DIR__ . '/vendor/autoload.php'; } else { if ( 'local' === wp_get_environment_type() ) { - wp_die( esc_html( __( 'TESTINGONLY Please install the HostGator Plugin dependencies.', 'wp-plugin-hostgator' ) ) ); + wp_die( esc_html( __( 'Please install the HostGator Plugin dependencies.', 'wp-plugin-hostgator' ) ) ); } return; } From 340d7b5637b7fe03528cb5e19010118612ccb97c Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Tue, 28 May 2024 13:45:32 -0400 Subject: [PATCH 5/5] composer bump --- composer.json | 8 ++++---- composer.lock | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 27dbcd4c..972f49ad 100644 --- a/composer.json +++ b/composer.json @@ -43,9 +43,9 @@ } }, "require-dev": { - "newfold-labs/wp-php-standards": "^1.2", + "newfold-labs/wp-php-standards": "^1.2.3", "wp-cli/i18n-command": "^2.6.1", - "wp-phpunit/wp-phpunit": "^6.4.2" + "wp-phpunit/wp-phpunit": "^6.5.3" }, "scripts": { "fix": "vendor/bin/phpcbf --standard=phpcs.xml .", @@ -79,7 +79,7 @@ "newfold-labs/wp-module-deactivation": "^1.1.2", "newfold-labs/wp-module-ecommerce": "^1.3.30", "newfold-labs/wp-module-global-ctb": "^1.0.11", - "newfold-labs/wp-module-help-center": "^1.0.24", + "newfold-labs/wp-module-help-center": "^1.0.25", "newfold-labs/wp-module-loader": "^1.0.10", "newfold-labs/wp-module-marketplace": "^2.2.4", "newfold-labs/wp-module-notifications": "^1.3.0", @@ -88,7 +88,7 @@ "newfold-labs/wp-module-performance": "^1.4.1", "newfold-labs/wp-module-runtime": "^1.0.11", "newfold-labs/wp-module-secure-passwords": "^1.1.1", - "newfold-labs/wp-module-sso": "^1.0.4", + "newfold-labs/wp-module-sso": "^1.0.5", "newfold-labs/wp-module-staging": "^1.3.3", "wp-forge/wp-update-handler": "^1.0.2", "wp-forge/wp-upgrade-handler": "^1.0" diff --git a/composer.lock b/composer.lock index 91a0b2c6..65102a5d 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "8d495c0ab90cd2472ef6603a2dd66c9f", + "content-hash": "7b1013ea0fcc82051124985daeb05764", "packages": [ { "name": "doctrine/inflector",