Skip to content

babel-plugin-replace-textdomain: Replace missing domains too - #22077

Merged
anomiex merged 1 commit into
masterfrom
fix/babel-replace-textdomain-when-missing
Dec 14, 2021
Merged

anomiex merged 1 commit into
masterfrom
fix/babel-replace-textdomain-when-missing

Conversation

@anomiex

@anomiex anomiex commented Dec 11, 2021

Copy link
Copy Markdown
Contributor

Changes proposed in this Pull Request:

It should also fix up calls with no domain parameter at all, like
__('foo').

Also, clean up the code a bit, and actually replace the nodes instead of
munging the value (which I'm not sure is actually supported).

Jetpack product discussion

PT: p9dueE-3MG-p2

Does this pull request change what data or activity we track or use?

No

Testing instructions:

  • Is CI happy?

It should also fix up calls with no domain parameter at all, like
`__('foo')`.

Also, clean up the code a bit, and actually replace the nodes instead of
munging the value (which I'm not sure is actually supported).
@anomiex anomiex added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review This PR is ready for review. [Pri] Normal labels Dec 11, 2021
@anomiex anomiex self-assigned this Dec 11, 2021
@matticbot

Copy link
Copy Markdown
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello anomiex! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D71391-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@github-actions

github-actions Bot commented Dec 11, 2021 •

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ All commits were linted before commit.
  • ✅ Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Once your PR is ready for review, check one last time that all required checks (other than "Required review") appearing at the bottom of this PR are passing or skipped.
Then, add the "[Status] Needs Team review" label and ask someone from your team review the code.
Once you’ve done so, switch to the "[Status] Needs Review" label; someone from Jetpack Crew will then review this PR and merge it to be included in the next Jetpack release.

@kraftbj kraftbj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd rather us not have code in our repo that lacks a textdomain, but that's not a blocker for this.

@kraftbj kraftbj added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Dec 13, 2021
@anomiex

anomiex commented Dec 14, 2021

Copy link
Copy Markdown
Contributor Author

We could always have linter rules or the like that require this to be fixed in our own code. But I figured this was quicker than chasing after a missing domain in a Calypso package. Looking at their other code now, they seem to have a mix of not using domains at all and passing __i18n_text_domain__, so we might at some point need to have this plugin start replacing that too.

@anomiex
anomiex merged commit 5844688 into master Dec 14, 2021
@anomiex
anomiex deleted the fix/babel-replace-textdomain-when-missing branch December 14, 2021 14:27
@github-actions

Copy link
Copy Markdown
Contributor

Great news! One last step: head over to your WordPress.com diff, D71391-code, and commit it.
Once you've done so, come back to this PR and add a comment with your changeset ID.

Thank you!

@github-actions github-actions Bot removed the [Status] Ready to Merge Go ahead, you can push that green button! label Dec 14, 2021
@anomiex

anomiex commented Dec 14, 2021

Copy link
Copy Markdown
Contributor Author

r236554-wpcom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Changes to an existing feature — removing, adding, or changing parts of it [JS Package] Babel Plugin Replace Textdomain [Pri] Normal RNA Touches WP.com Files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants