Skip to content
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

Merged
merged 4 commits into from
Nov 22, 2018

Conversation

notnownikki
Copy link
Member

Fixes: #12167

@notnownikki notnownikki added this to the WordPress 5.0 milestone Nov 22, 2018
@notnownikki notnownikki requested a review from a team November 22, 2018 10:48
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, thanks 👍

@gziolo gziolo added the Internationalization (i18n) Issues or PRs related to internationalization efforts label Nov 22, 2018
@notnownikki
Copy link
Member Author

This fails the lint checks though, do we need to remove that check?

@gziolo
Copy link
Member

gziolo commented Nov 22, 2018

@gziolo
Copy link
Member

gziolo commented Nov 22, 2018

Let me check what we do in core, maybe we should replace default there instead.

@notnownikki
Copy link
Member Author

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?

@swissspidy
Copy link
Member

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.

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?

No. Not every string here in the plugin is also in core.

@gziolo
Copy link
Member

gziolo commented Nov 22, 2018

I would rather exclude the rule in the files where it makes sense using code comment.

@notnownikki
Copy link
Member Author

Thank you both :) I'll exclude with comments.

@pento
Copy link
Member

pento commented Nov 22, 2018

@notnownikki: You should be able to exclude it by adding this to the phpcs.xml.dist file:

<rule ref="WordPress.WP.I18n.MissingArgDomainDefault">
	<exclude-pattern>packages/block-library/src/*</exclude-pattern>
</rule>

pento
pento previously requested changes Nov 22, 2018
Copy link
Member

@pento pento left a 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. 🙂

@gziolo
Copy link
Member

gziolo commented Nov 22, 2018

Cool, thanks Gary for a great hint. Let's fly with that.

@notnownikki
Copy link
Member Author

Great, have replaced the comments :)

Could someone dismiss the block for me? I can't do that.

@gziolo gziolo modified the milestones: WordPress 5.0, 4.6 Nov 22, 2018
@notnownikki notnownikki merged commit abf1b56 into master Nov 22, 2018
@notnownikki notnownikki deleted the update/block-library-no-text-domain branch November 22, 2018 13:23
youknowriad pushed a commit that referenced this pull request Nov 29, 2018
@mtias mtias added the [Type] Code Quality Issues or PRs that relate to code quality label Nov 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internationalization (i18n) Issues or PRs related to internationalization efforts [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants