-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the textdomain from block library #12215
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one, thanks 👍
This fails the lint checks though, do we need to remove that check? |
Google says you can disable them: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Advanced-Usage#ignoring-parts-of-a-file :) |
Let me check what we do in core, maybe we should replace |
Yeah, I'm just thinking that if no domain is the norm from now on because this is going to be merged into core, then we should get rid of the rule altogether, rather than having to have a lint comment every time? |
Please see this discussion in Slack: https://wordpress.slack.com/archives/C02QB2JS7/p1542804335045200 For strings that are already in core and not needed in the plugin, adding and exclusion to the phpcs config makes sense. So in this case here I'd exclude that file.
No. Not every string here in the plugin is also in core. |
I would rather exclude the rule in the files where it makes sense using code comment. |
Thank you both :) I'll exclude with comments. |
@notnownikki: You should be able to exclude it by adding this to the <rule ref="WordPress.WP.I18n.MissingArgDomainDefault">
<exclude-pattern>packages/block-library/src/*</exclude-pattern>
</rule> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to dismiss this block once the // phpcs:ignore
comments are replaced with the phpcs.xml.dist
config. 🙂
Cool, thanks Gary for a great hint. Let's fly with that. |
Great, have replaced the comments :) Could someone dismiss the block for me? I can't do that. |
Fixes: #12167