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

Fix faulty Jed state after setLocaleData #10233

Merged
merged 2 commits into from
Oct 4, 2018

Conversation

atimmer
Copy link
Member

@atimmer atimmer commented Sep 28, 2018

Description

When calling setLocaleData with a custom textdomain in a non-Gutenberg environment the default textdomain ends up in a state that is not ok with Jed resulting in the error: "Error: No locale meta information provided." In Gutenberg this is not a problem because setLocaleData is always called first with the default textdomain.

How has this been tested?

Using hotfix/8.3.1 of Yoast SEO we found this bug. After the removal of getI18n from our code we uncovered this.

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

When calling `setLocaleData` with a custom textdomain in a non-Gutenberg environment the default textdomain ends up in a state that is not ok with Jed resulting in the error: "Error: No locale meta information provided." In Gutenberg this is not a problem because `setLocaleData` is always called first with the default textdomain.
@atimmer
Copy link
Member Author

atimmer commented Sep 28, 2018

Note: I can add a changelog entry, but I have no idea how to describe this concisely.

@youknowriad youknowriad requested a review from aduth September 29, 2018 07:02
@gziolo gziolo added this to the 4.0 milestone Oct 4, 2018
@gziolo gziolo added [Type] Bug An existing feature does not function as intended [Package] i18n /packages/i18n labels Oct 4, 2018
Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

Added CHANGELOG note.

@gziolo gziolo merged commit dcd5cd1 into master Oct 4, 2018
@youknowriad youknowriad deleted the fix/jed-default-textdomain-faulty-state branch October 4, 2018 22:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] i18n /packages/i18n [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants