Skip to content

Commit 74405ea

Browse files
authored
Merge pull request #651 from newfold-labs/press11-170
Add Localisation Support
2 parents c2be4f5 + 3d2c5f6 commit 74405ea

40 files changed

+14019
-2918
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Crowdin Download Action
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
base_branch:
7+
description: 'Base branch for the pull request'
8+
required: false
9+
default: 'main'
10+
11+
jobs:
12+
call-crowdin-workflow:
13+
uses: newfold-labs/workflows/.github/workflows/i18n-crowdin-download.yml@main
14+
with:
15+
base_branch: ${{ inputs.base_branch }}
16+
secrets:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
19+
vars:
20+
CROWDIN_PROJECT_ID: ${{ vars.CROWDIN_PROJECT_ID }}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Crowdin Upload Action
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
call-crowdin-upload-workflow:
8+
uses: newfold-labs/workflows/.github/workflows/i18n-crowdin-upload.yml@main
9+
secrets:
10+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11+
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
12+
vars:
13+
CROWDIN_PROJECT_ID: ${{ vars.CROWDIN_PROJECT_ID }}

.github/workflows/lint-check-php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Setup PHP
2929
uses: shivammathur/setup-php@v2
3030
with:
31-
php-version: '8.3'
31+
php-version: '7.3'
3232
coverage: none
3333
tools: composer, cs2pr
3434

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<?php return array('dependencies' => array(), 'version' => '1c5e915c67b4a469a99f');
1+
<?php return array('dependencies' => array(), 'version' => '4dae71e189c795a5c447');

build/2.5.8/sitegen-theme-marker.css.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.json

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
"config": {
2121
"allow-plugins": {
2222
"dealerdirect/phpcodesniffer-composer-installer": true
23+
},
24+
"platform": {
25+
"php": "7.3.0"
2326
}
2427
},
2528
"repositories": [
@@ -54,20 +57,22 @@
5457
"wp-cli/i18n-command": "^2.6.3"
5558
},
5659
"scripts": {
57-
"lint": [
58-
"vendor/bin/phpcs . --standard=Newfold"
59-
],
60-
"clean": [
61-
"vendor/bin/phpcbf . --standard=Newfold"
60+
"fix": [
61+
"vendor/bin/phpcbf . --standard=phpcs.xml"
6262
],
6363
"i18n-pot": "vendor/bin/wp i18n make-pot . ./languages/wp-module-onboarding.pot --headers='{\"Report-Msgid-Bugs-To\":\"https://github.com/newfold-labs/wp-module-onboarding/issues\",\"POT-Creation-Date\":\"2024-11-18T07:59:34+00:00\"}' --exclude=assets,tests,src",
6464
"i18n-po": "vendor/bin/wp i18n update-po ./languages/wp-module-onboarding.pot ./languages",
6565
"i18n-mo": "vendor/bin/wp i18n make-mo ./languages",
66-
"i18n-json": "rm -f languages/*.json && vendor/bin/wp i18n make-json ./languages --no-purge --pretty-print",
66+
"i18n-php": "vendor/bin/wp i18n make-php ./languages",
67+
"i18n-json": "find ./languages -type f -name \"*.po\" -print0 | xargs -0 -I {} sh -c 'name=$(basename \"$1\" .po); npx po2json languages/\"$name\".po languages/\"$name\"-nfd-onboarding.json -f jed1.x' -- {}",
6768
"i18n": [
68-
"@i18n-pot",
69-
"@i18n-po",
70-
"@i18n-mo"
69+
"@i18n-pot",
70+
"@i18n-po",
71+
"@i18n-php",
72+
"@i18n-json"
73+
],
74+
"lint": [
75+
"vendor/bin/phpcs . --standard=phpcs.xml"
7176
]
7277
},
7378
"scripts-descriptions": {

0 commit comments

Comments
 (0)