• Resolved Ulrich

    (@grapplerulrich)


    Please check out this improvement that can be made. I am using WP 6.8.1 and HappyForms 1.26.9.

    TLDR: The translation function __() is being called at plugins_loaded instead of at init action or later.

    Details from. Query Monitor:

    Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the happyforms 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. (This message was added in version 6.7.0.)-

    1. _load_textdomain_just_in_time()
      wp-includes/l10n.php:1379
    2. get_translations_for_domain()
      wp-includes/l10n.php:1409
    3. translate()
      wp-includes/l10n.php:195
    4. __()
      wp-includes/l10n.php:307
    5. HappyForms_Part_SingleLineText->__construct()
      wp-content/plugins/happyforms/core/classes/parts/class-part-single-line-text.php:7
    6. HappyForms_Form_Part_Library->register_part()
      wp-content/plugins/happyforms/core/classes/class-form-part-library.php:74
    7. HappyForms_Form_Part_Library->__construct()
      wp-content/plugins/happyforms/core/classes/class-form-part-library.php:46
    8. HappyForms_Form_Part_Library::instance()
      wp-content/plugins/happyforms/core/classes/class-form-part-library.php:30
    9. happyforms_get_part_library()
      wp-content/plugins/happyforms/core/classes/class-form-part-library.php:294
    10. HappyForms_Core->initialize_plugin()
      wp-content/plugins/happyforms/core/classes/class-happyforms-core.php:75
    11. HappyForms->initialize_plugin()
      wp-content/plugins/happyforms/inc/classes/class-happyforms.php:13
    12. do_action('plugins_loaded')
      wp-includes/plugin.php:517
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Translation function called too early’ is closed to new replies.