Retry just-in-time translation when setting custom path#7713
Retry just-in-time translation when setting custom path#7713swissspidy wants to merge 7 commits intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
81039e1 to
48c213d
Compare
peterwilsoncc
left a comment
There was a problem hiding this comment.
This tests well using the sample theme provided by @t-hamano.
I did a revert of the source changes (since force pushed out of existence) to validate the tests and they fail on trunk as expected.
It would be good to get another set of eyes from either @SergeyBiryukov or @ocean90 as they have a deeper knowledge of the feature.
One nit pick inline
Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com>
Custom themes/plugins with only en_US files should have their translations loaded as well
desrosj
left a comment
There was a problem hiding this comment.
I've given this some good testing today and I'm seeing all of the scenarios described in Trac as resolved with the exception of the most recently raised edge case: My plugin lets users override GlotPress translations with their own custom translation files.
Would also appreciate another review from someone with deeper l10n/i18n knowledge, but I think this one is probably ready.
| */ | ||
| public function set_custom_path( $domain, $path ) { | ||
| // If just-in-time loading was triggered before, reset the entry so it can be tried again. | ||
|
|
SergeyBiryukov
left a comment
There was a problem hiding this comment.
Thanks for the PR, looks good to me 👍
This is a follow-up to https://core.trac.wordpress.org/changeset/59157.
Trac ticket: https://core.trac.wordpress.org/ticket/62337
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.