WordPress-Plugin-Boilerplate-Powered icon indicating copy to clipboard operation
WordPress-Plugin-Boilerplate-Powered copied to clipboard

[BUG] WordPress Plugin Boilerplate Powered uses DT_TEXTDOMAIN constant in translatable string calls

Open dfumagalli opened this issue 1 year ago • 1 comments

Describe the bug Like several other similar boilerplates, WordPress Plugin Boilerplate Powered uses a constant (DT_TEXTDOMAIN) to specify a translation domain. However, this is considered an error by several, easily googled sources.

Translation tools will statically scan the source code and cannot run PHP code to understand what DT_TEXTDOMAIN means.

To Reproduce Steps to reproduce the behaviour:

  1. Go to any translation string function call that allows for string translation, for example, __( 'my text', DT_TEXTDOMAIN ).
  2. Find DT_TEXTDOMAIN.
  3. It should be a literal constant, like "mytextdomain".

Expected behaviour Code to be similar to: __( 'my text', 'mytextdomain' )

Additional context Here are several references added to another boilerplate plugin showing the same issue.

dfumagalli avatar Dec 02 '23 11:12 dfumagalli

There are some source that explains why it is an issue? Because GlotPress, the wp-cli command and PoEdit doesn't have any issue with this.

Mte90 avatar Dec 04 '23 10:12 Mte90