Make WordPress Core

Changes between Version 2 and Version 3 of Ticket #62462, comment 30


Ignore:
Timestamp:
12/17/2024 07:58:56 PM (20 months ago)
Author:
brianhogg

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #62462, comment 30

    v2 v3  
    33This doesn't appear to be true, from numerous support tickets and fixes I've been making since WP 6.7. When the notice is shown, the translations for that text domain no longer load in future included files. This is even more problematic when other plugins try to use a translation string from another plugin's text domain causing the translations to fail.
    44
    5 As an example, you can see this by installing and activating LifterLMS 7.8.6 on a Spanish site, and the translations for the setup wizard do not load apart from the strings for the "steps" in the header which are added too early via the constructor of the setup wizard class. Strings located in the main.php file (the body of the wizard) included later on in the page load do not work. With the latest version 7.8.7 this is [https://github.com/gocodebox/lifterlms/blob/b612d6410b2977041b548a29fac307041e96eab8/includes/admin/class.llms.admin.setup.wizard.php#L252-L255 delayed until `init`] and the translations in the body of the wizard load once again.
     5As an example, you can see this by installing and activating LifterLMS 7.8.6 on a Spanish site, and the translations for the setup wizard do not load apart from the strings for the "steps" in the header which are added too early via the constructor of the setup wizard class. Strings located in the `setup-intro.php` file (the body of the wizard) included later on in the page load do not work. With the latest version 7.8.7 these early strings are [https://github.com/gocodebox/lifterlms/blob/b612d6410b2977041b548a29fac307041e96eab8/includes/admin/class.llms.admin.setup.wizard.php#L252-L255 delayed until `init`] and the translations in the body of the wizard load once again.
    66
    7 If it was just a notice that'd be great, it's the breaking of translations with no previous `_doing_it_wrong` notices in prior versions of WP that's the issue. Could we look into making this a warning only then as a first step?
     7If it was just a notice that'd be great, it's the breaking of translations with no previous `_doing_it_wrong` notices in prior versions of WP that's the issue. Could we look into making this a warning only as a first step?