Skip to content

Commit

Permalink
Merge pull request #92 from newfold-labs/press11-165
Browse files Browse the repository at this point in the history
Add Localisation Support
  • Loading branch information
circlecube authored Feb 26, 2025
2 parents 953e4f5 + 9a27b28 commit 71e1979
Show file tree
Hide file tree
Showing 35 changed files with 2,437 additions and 271 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/i18n-crowdin-download.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Crowdin Download Action

on:
workflow_dispatch:
inputs:
base_branch:
description: 'Base branch for the pull request'
required: false
default: 'main'

jobs:
call-crowdin-workflow:
uses: newfold-labs/workflows/.github/workflows/i18n-crowdin-download.yml@main
with:
base_branch: ${{ inputs.base_branch }}
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
vars:
CROWDIN_PROJECT_ID: ${{ vars.CROWDIN_PROJECT_ID }}
13 changes: 13 additions & 0 deletions .github/workflows/i18n-crowdin-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Crowdin Upload Action

on:
workflow_dispatch:

jobs:
call-crowdin-upload-workflow:
uses: newfold-labs/workflows/.github/workflows/i18n-crowdin-upload.yml@main
secrets:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
vars:
CROWDIN_PROJECT_ID: ${{ vars.CROWDIN_PROJECT_ID }}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
php-version: '7.3'
coverage: none
tools: composer, cs2pr

Expand Down
2 changes: 1 addition & 1 deletion build/index.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => 'f032c348783b7743b18d');
<?php return array('dependencies' => array('lodash', 'react', 'wp-api-fetch', 'wp-data', 'wp-dom-ready', 'wp-element', 'wp-i18n'), 'version' => '1506d30cd20535172ad5');
2 changes: 1 addition & 1 deletion build/index.js

Large diffs are not rendered by default.

17 changes: 16 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
}
],
"require-dev": {
"newfold-labs/wp-php-standards": "@stable"
"newfold-labs/wp-php-standards": "@stable",
"wp-cli/i18n-command": "^2.6.3"
},
"require": {
"newfold-labs/wp-module-ai": "^1.1.13",
Expand All @@ -43,5 +44,19 @@
"platform": {
"php": "7.3"
}
},
"scripts": {
"fix": "vendor/bin/phpcbf --standard=phpcs.xml .",
"i18n-pot": "vendor/bin/wp i18n make-pot . ./languages/wp-module-help-center.pot --headers='{\"Report-Msgid-Bugs-To\":\"https://github.com/newfold-labs/wp-module-help-center/issues\",\"POT-Creation-Date\":\"2025-02-13T09:55:55+00:00\"}' --exclude=tests,src",
"i18n-po": "vendor/bin/wp i18n update-po ./languages/wp-module-help-center.pot ./languages",
"i18n-php": "vendor/bin/wp i18n make-php ./languages",
"i18n-json": "rm -f languages/*.json && vendor/bin/wp i18n make-json ./languages --no-purge --pretty-print",
"i18n": [
"@i18n-pot",
"@i18n-po",
"@i18n-php",
"@i18n-json"
],
"lint": "vendor/bin/phpcs --standard=phpcs.xml -s ."
}
}
Loading

0 comments on commit 71e1979

Please sign in to comment.