[wp-trac] [WordPress Trac] #62462: Reconsider _doing_it_wrong warning when loading translations early
WordPress Trac
noreply at wordpress.org
Tue Dec 17 18:44:17 UTC 2024
#62462: Reconsider _doing_it_wrong warning when loading translations early
-------------------------------+---------------------
Reporter: TimothyBlynJacobs | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.7.2
Component: I18N | Version: 6.7
Severity: normal | Resolution:
Keywords: | Focuses:
-------------------------------+---------------------
Comment (by brianhogg):
> I think the idea of improving the messaging pot forward in comments
15/17 might be the best path forward since as of now all the examples seem
to be places where in fact, the code is doing it wrong.
Scheduling tasks with `register_activation_hook` is both common and valid.
Otherwise, we'd need to add an extra check on every page load to see if
the task has been scheduled or keep the display text in English only. This
previously worked fine, which raises the question of why we're now forcing
translations on or after `init`.
The ticket description also gives the example of a security plugin that
could output messages early, or in the case of a message related to a
critical error, which are now both locked to English.
If we want to continue with this, could we at least make it a notice that
doesn't break translations while we consider better solutions? Otherwise,
I think we should revert this change, evaluate what the workarounds would
be in these valid scenarios, and then introduce a revised patch.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62462#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list