WPBP / WordPress-Plugin-Boilerplate-Powered

Wordpress Plugin Boilerplate but Powered with examples and a generator!
https://wpbp.github.io/
GNU General Public License v3.0
791 stars 114 forks source link

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

Closed dfumagalli closed 4 months ago

dfumagalli commented 11 months ago

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.

Mte90 commented 11 months ago

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 commented 4 months ago

Closing as I get no answer.