Use namespace for textdomain when --no-plugin is in use #54980
Labels
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
Needs Dev
Ready for, and needs developer efforts
[Tool] Create Block
/packages/create-block
[Type] Bug
An existing feature does not function as intended
Description
When scaffolding a new block with
@wordpress/create-block
and the--no-plugin
flag, the textdomain in block.json is being set to the slug of the block. In the case where a plugin has already been set up (when--no-plugin
would be used) and additional blocks are being added to it, this means that each block has the wrong textdomain. It's more likely that the namespace for each block will be better to use for the textdomain, as it should be consistent across blocks. Alternatively, a custom textdomain could be set up during the interactive scaffolding process, or the ability to set a default in the block metadata template.Step-by-step reproduction instructions
npx @wordpress/create-block --no-plugin
in the blocks directory of an existing plugin.textdomain
has been set to the slug instead of the namespace.Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: