Skip to content

Commit 0059d01

Browse files
authored
Merge pull request #265 from newfold-labs/adjust-for-flexible-translation-workflow
Adjust new translation workflow
2 parents 22a0a8e + 81111fb commit 0059d01

File tree

4 files changed

+12
-27
lines changed

4 files changed

+12
-27
lines changed

.github/workflows/auto-translate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
permissions:
2121
contents: write
2222
pull-requests: write
23-
uses: newfold-labs/workflows/.github/workflows/reusable-azure-ai-translate.yml@main
23+
uses: newfold-labs/workflows/.github/workflows/reusable-translations.yml@main
2424
with:
2525
text_domain: 'wp-module-performance'
26+
i18n-script-location: 'npm'
2627
secrets:
2728
TRANSLATOR_API_KEY: ${{ secrets.TRANSLATOR_API_KEY }}
28-
NEWFOLD_ACCESS_TOKEN: ${{ secrets.NEWFOLD_ACCESS_TOKEN }}

.github/workflows/i18n-update.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

composer.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,14 @@
5454
"i18n": [
5555
"@i18n-pot",
5656
"@i18n-po",
57-
"@i18n-mo",
57+
"@i18n-json",
58+
"@i18n-php"
59+
],
60+
"i18n-ci-pre": [
61+
"@i18n-pot",
62+
"@i18n-po"
63+
],
64+
"i18n-ci-post": [
5865
"@i18n-json",
5966
"@i18n-php"
6067
],

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
"i18n-build": "composer run-script i18n",
4646
"i18n-rename-json": "node ./translations-json-rename.js",
4747
"i18n": "npm run -s i18n-build && npm run i18n-rename-json",
48+
"i18n-ci-pre": "composer run-script i18n-ci-pre",
49+
"i18n-ci-post": "composer run-script i18n-ci-post && npm run i18n-rename-json",
4850
"lint-js": "wp-scripts lint-js"
4951
}
5052
}

0 commit comments

Comments
 (0)