-
Notifications
You must be signed in to change notification settings - Fork 8
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
Use offical WP-CLI i18n package to generate POT file. #397
Use offical WP-CLI i18n package to generate POT file. #397
Conversation
@mi5t4n Could you resolve the conflicts and test the changes? |
@divyarajmasani The merge conflicts have been resolved. But it seems there are issues with the package version, should I resolve that as well, or we simply set the PHP version to 8.2 in composer.json. |
@mi5t4n Please, go ahead and update the php version, v7.4 is no longer supported. Ensure all other necessary packages are also updated to support the new php version. |
61912f8
to
fc5f9ec
Compare
@divyarajmasani Updated following things since we last communicated:
|
Description
This PR adds a composer script to generate POT files.
Technical Details
Utilize the wp-cli/i18n-command tool for the generation of POT files, as it is the official tool capable of translating both PHP and JS files. Given that Gutenberg introduced localization functions in JS files, this tool ensures comprehensive coverage.
The generation process will result in the creation of a POT file within the
languages
directory.Abstain from creating a GitHub action workflow for POT file generation due to the resource-intensive nature of the task, involving both high memory and CPU usage. This complexity can lead to potential failures within the GitHub action workflow.
Commands
composer run pot
to generate POT files.npm run pot
to generate POT file. It's an alias tocomposer run pot
.How to test
npm install
to install JS packages.composer update
to install PHP packages.npm run init
to initialize the plugin.composer run pot
to generate POT file.Fixes/Covers issue
Fixes #396
Reference
https://github.com/rtCamp/features-plugin-skeleton/pull/482