wpemerge-plugin
wpemerge-plugin copied to clipboard
i18n:textdomain and pot not working when using blade template
Version
Please add the exact versions used for each of the following:
- WP Emerge Starter Plugin: 0.16.1
- WP Emerge (if not the default): 0.16.0
- WordPress: 5.4.2
- PHP: 7.4
Expected behavior
Text domain should be added automatically to WP translations function such as __($string), _e($e), etc. when using the textdomain command and be added to the .pot file when using the pot command.
Actual behavior
Text domain is not added in blade files, but is in php files and class.
Steps to reproduce (in case of a bug)
- Install https://github.com/htmlburger/wpemerge-blade following the instruction in readme.md
- Add a translated string using a translation function such as __('Your string') in a blade file
- Run command php wpemerge i18n:textdomain or php wpemerge i18n:pot
Work around
Instead of using {{__('hello world')}}
you can use the classic php way <?php echo __('hello world')?>
or <?= __('hello world')?>
(short syntax)