Open bobbingwide opened 5 days ago
I spent some time trying to understand whether or not the doing it wrong message could be improved to help the user pinpoint the actual cause of the problem. I'd not experienced the infinite loop that was the reason for the message in the first place.
During my investigation I wondered whether or not there would be any benefit in tracing the current value that might be being used for the locale.
It's not just a case of reporting the value of the global $locale, since this isn't updated by determine_locale()
.
If oik-bwtrace would want to know this result it would have to hook into the determine_locale
filter and save the value of the $determined_locale.
The trace record would probably need to show both the global $locale
and the most recent $determined_locale
.
Should I add this logic in a future version of trace?
When testing with WordPress 6.7-beta3 I started getting doing it wrong messages from
_load_textdomain_just_in_time
I analysed the problem here https://github.com/bobbingwide/bobbingwide/issues/122#issuecomment-2428741144 And subsequently wrote a new comment to the WordPress TRAC here https://core.trac.wordpress.org/ticket/44937#comment:54
In this particular instance the fix is to avoid translations until after whatever hook it is after which it's safe to perform translations.