my-awesome-plugin icon indicating copy to clipboard operation
my-awesome-plugin copied to clipboard

Translation using Poedit

Open Mecanik opened this issue 2 years ago • 4 comments

Hello,

Could you please explain how to use poeditor and translate the index.js? I noticed after compilation/minification the __() are removed completely.

I`m not sure how to do this?

Many thanks!

Mecanik avatar Mar 05 '22 05:03 Mecanik

Hey @Mecanik,

It's an old tutorial so we use a custom field that strips the __ tags. You can update to using @wordpress/scripts instead: https://developer.wordpress.org/block-editor/reference-guides/packages/packages-scripts/

This way you don't have to manage your build and the whole thing become a lot easier.

HardeepAsrani avatar Mar 10 '22 18:03 HardeepAsrani

Thanks, well I need to learn more about this.

Mecanik avatar Mar 10 '22 18:03 Mecanik

It's actually pretty easier, way easier than doing a custom build. 😄

HardeepAsrani avatar Mar 10 '22 18:03 HardeepAsrani

Yeah well... when you have no idea about WP JS "scripts", no patience, no time and you don't like WP in general... 😄

Mecanik avatar Mar 10 '22 18:03 Mecanik