Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Localisation Support #92

Merged
merged 22 commits into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading