Smart WP-CLI command to cache the Twig templates so they can be read by PoEdit
Parses all Twig files in your current themes
templates directory to
Install package via
composer require level-level/clarkson-wp-cli-twig-translations.
wp clarkson-twig-translations prepare-fileswhich dumps rendered
.phpfiles in a
distdirectory in your current active theme.
Make sure your PoEdit
.pofile configuration loads this
distfolder when it updates from source like
Free PoEdit doesn't scans Twig files. If you do want PoEdit to do this, buy the Pro version.
clarkson_twig_translations_cache_pathalters the location where to parse to.
clarkson_twig_translations_templates_pathalters the location where the
templatesare located in.