Skip to content

Commit

Permalink
Merge pull request #10 from newfold-labs/press11-164
Browse files Browse the repository at this point in the history
Add Localisation Support
  • Loading branch information
circlecube authored Feb 25, 2025
2 parents a865044 + addcd3e commit b46fa1a
Show file tree
Hide file tree
Showing 39 changed files with 1,612 additions and 48 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 @@ -28,7 +28,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '7.3'
coverage: none
tools: composer, cs2pr

Expand Down
18 changes: 17 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"wp-forge/wp-options": "^1.1.1"
},
"require-dev": {
"newfold-labs/wp-php-standards": "^1.2.3"
"newfold-labs/wp-php-standards": "^1.2.3",
"wp-cli/i18n-command": "^2.6.3"
},
"autoload": {
"psr-4": {
Expand All @@ -40,6 +41,9 @@
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
},
"platform": {
"php": "7.3.0"
},
"sort-packages": true
},
"scripts": {
Expand All @@ -48,6 +52,18 @@
],
"lint": [
"vendor/bin/phpcs . --standard=phpcs.xml -s"
],
"i18n-pot": "vendor/bin/wp i18n make-pot . ./languages/wp-module-features.pot --headers='{\"Report-Msgid-Bugs-To\":\"https://github.com/newfold-labs/wp-module-features/issues\",\"POT-Creation-Date\":\"2025-02-13T09:55:55+00:00\"}'",
"i18n-po": "vendor/bin/wp i18n update-po ./languages/wp-module-features.pot ./languages",
"i18n-mo": "vendor/bin/wp i18n make-mo ./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-mo",
"@i18n-php",
"@i18n-json"
]
},
"scripts-descriptions": {
Expand Down
Loading

0 comments on commit b46fa1a

Please sign in to comment.