wpemerge-plugin icon indicating copy to clipboard operation
wpemerge-plugin copied to clipboard

i18n:textdomain and pot not working when using blade template

Open Mick00 opened this issue 4 years ago • 0 comments

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)

  1. Install https://github.com/htmlburger/wpemerge-blade following the instruction in readme.md
  2. Add a translated string using a translation function such as __('Your string') in a blade file
  3. 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)

Mick00 avatar Jul 20 '20 15:07 Mick00