WordPress-Plugin-Boilerplate-Powered
WordPress-Plugin-Boilerplate-Powered copied to clipboard
[BUG] WordPress Plugin Boilerplate Powered uses DT_TEXTDOMAIN constant in translatable string calls
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:
- Go to any translation string function call that allows for string translation, for example,
__( 'my text', DT_TEXTDOMAIN )
. - Find DT_TEXTDOMAIN.
- 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.
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.