• Resolved Silas K?hler

    (@silaskoehler)


    I use the plugin with a german translation. But when i update the translation, i get this Notice:

    PHP Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the no-nonsense domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /wordpress/wp-includes/functions.php on line 135

    You can test it in this playground. Just update the translation and look at the logs.

    thanks for your support.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author room34

    (@room34)

    Thanks for bringing this to my attention. Version 3.5.0 included a change that resolved this in an earlier beta of WordPress 6.7 but something else must have changed. I’ll get a fix released shortly.

    Thread Starter Silas K?hler

    (@silaskoehler)

    Thanks for your work and your quick response.

    Plugin Author room34

    (@room34)

    OK… kind of a weird situation. This issue actually was fixed in version 3.5.0, but it was a hotfix that was added about an hour after 3.5.0 was originally released. You must have updated before the hotfix.

    I’ve bumped the version to 3.5.0.1 so you can get the update. (Re-downloading 3.5.0 from the repository also would have fixed the issue.)

    Plugin Author room34

    (@room34)

    Unfortunately, I believed this had resolved the issue, but it turns out to be a bit more complicated.

    This is a chicken-and-egg scenario. No Nonsense needs to load its array of settings information — which includes translated text strings — on the plugins_loaded hook in order to actually work, but doing so triggers the error message. Loading it late enough to get rid of the error message causes a lot of No Nonsense’s features not to work, because they’re acting on parts of WordPress that have already been loaded. (A really simple example is the “Remove Howdy” setting.)

    I’m investigating whether or not I might be able to rework the settings array so its functional aspects continue to get loaded on plugins_loaded but its translated text strings (which are only needed for displaying the admin page) get assigned later.

    • This reply was modified 3 months, 1 week ago by room34.
    Plugin Author room34

    (@room34)

    Version 3.5.1 is on its way to the repository. I’ve completely revamped the process of defining the Settings array. The basic properties of the settings need to be available on plugins_loaded but the translated text strings are only needed on the No Nonsense admin page, and can be merged into the array later, so that’s what I’ve done.

    I also added complete machine-translated files for German and Dutch, because I noticed the community-provided translation files are incomplete. Unfortunately in the process I also discovered that WordPress prioritizes community translations over the ones contained directly in the plugin, so I’m looking into how to work around that.

    Thread Starter Silas K?hler

    (@silaskoehler)

    Great Work. Thank you again for your fast help!!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.