You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yep, the link provided by Riad should give you all the information you need.
You can still use the Babel makepot plugin, and use it in combination with WP-CLI. But in theory just using WP-CLI alone for this would work as well.
Basically it works like this:
Run wp i18n make-pot to generate 1 POT file for all your PHP and JS strings.
Translate your project (which leads to creation of PO files)
Run wp i18n make-json to split up the PO files into JSON translation files for use with Gutenberg, leaving the PO files themselves to be for the PHP strings only
If you still want to use the Babel makepot plugin for some reason, it would be a bit different:
Build your JS (including the Babel plugin that creates a POT file)
Run wp i18n make-pot --skip-js --merge=path/to/generated-by-babel-plugin.pot to get a single POT file containing all the translations again
What will the proper way translate your plugin using? https://www.npmjs.com/package/@wordpress/babel-plugin-makepot
Keep that in mind that we have PHP files that have some strings + JS files. Can we have two separate POT files and GlotPress work properly?
Or is there a way to use the same babel plugin to translate pot from JS/PHP?
The text was updated successfully, but these errors were encountered: