https://github.com/threadi/easy-language
Provider easy language for multilingual-plugins in WordPress
https://github.com/threadi/easy-language
multilingual wordpress-plugin
Last synced: 4 months ago
JSON representation
Provider easy language for multilingual-plugins in WordPress
- Host: GitHub
- URL: https://github.com/threadi/easy-language
- Owner: threadi
- Created: 2023-05-31T14:11:36.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2026-01-19T10:51:37.000Z (5 months ago)
- Last Synced: 2026-01-29T12:12:02.834Z (5 months ago)
- Topics: multilingual, wordpress-plugin
- Language: PHP
- Homepage: https://wordpress.org/plugins/easy-language/
- Size: 5.69 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: readme.md
- Changelog: changelog.md
Awesome Lists containing this project
README
# Easy Language
## About
This repository provides the features for the free version of the WordPress plugin _Easy Language_. The repository is used as a basis for deploying the plugin to the WordPress repository. It is not intended to run as a plugin as it is, even if that is possible for development.
## Usage
After checkout go through the following steps:
### Using ant
1. copy _build/build.properties.dist_ to _build/build.properties_.
2. modify the build/build.properties file - note the comments in the file.
3. after that the plugin can be activated in WordPress.
### Using Taskfile
1. Run this command: `task prepare`
2. after that the plugin can be activated in WordPress.
## Release
### from local environment with ant
1. increase the version number in _build/build.properties_.
2. execute the following command in _build/_: `ant build`
3. after that you will find a zip file in the release directory which could be used in WordPress to install it.
### from local environment with Taskfile
1. execute the following command in main directory: `task release -- 3.0.0` - adjust the version number.
2. after that you will find a zip file in the release directory which could be used in WordPress to install it.
### on GitHub
1. Create a new tag with the new version number.
2. The release zip will be created by GitHub action.
## Translations
I recommend using [PoEdit](https://poedit.net/) to translate texts for this plugin.
### generate pot-file
Run in the main directory:
`wp i18n make-pot . languages/easy-language.pot --exclude=classes/multilingual-plugins/easy-language/blocks/navigation-switcher/src/,classes/multilingual-plugins/easy-language/blocks/switcher/src/,svn/`
### update translation-file
1. Open .po-file of the language in PoEdit.
2. Go to "Translate" > "Update from POT-file".
3. After this the new entries are added to the language-file.
### export translation-file
1. Open .po-file of the language in PoEdit.
2. Go to "File" > "Save".
3. Upload the generated .mo-file and the .po-file to the plugin-folder languages/
### generate json-translation-files
Run in the main directory:
`wp i18n make-json languages`
OR use ant in build/-directory: `ant json-translations`
### Requirements
`npm install`
### Run for development
`npm start`
### Run for release
`npm run build`
Hint: will be called by ant-command mentioned above.
## Check for WordPress Coding Standards
### Initialize
`composer install`
### Run
`vendor/bin/phpcs --standard=ruleset.xml .`
### Repair
`vendor/bin/phpcbf --standard=ruleset.xml .`
## Generate documentation
`vendor/bin/wp-documentor parse app --format=markdown --output=doc/hooks.md --prefix=easy_language_ --exclude=Section.php --exclude=Tab.php --exclude=Import.php --exclude=Export.php --exclude=Field_Base.php --exclude=Settings.php --exclude=Page.php --exclude=Rest.php --exclude=Transients.php --exclude=Post_Object.php`
## Check for WordPress VIP Coding Standards
Hint: this check runs against the VIP-GO-platform which is not our target for this plugin. Many warnings can be ignored.
### Run
`vendor/bin/phpcs --extensions=php --ignore=*/vendor/*,*/doc/*,*/svn/*,*/node_modules/*,*/gettext-helper.php,*/classes/multilingual-plugins/easy-language/pagebuilder/divi/build/,*/classes/multilingual-plugins/easy-language/blocks/*/build/,*translatepress* --standard=WordPress-VIP-Go .`
## Check PHP compatibility
`vendor/bin/phpcs -p app --standard=PHPCompatibilityWP`
## Analyze with PHPStan
`vendor/bin/phpstan analyse`
## Check with plugin "Plugin Check"
`wp plugin check --error-severity=7 --warning-severity=6 --include-low-severity-errors --categories=plugin_repo --format=json --slug=easy-language .`
## Unit tests
### Preparation
Be sure to have run `composer install` or `composer update` before.
### Run
`composer test`