[wp-trac] [WordPress Trac] #45103: Automatically load JavaScript translations when scripts are enqueued if these exist.
WordPress Trac
noreply at wordpress.org
Tue Nov 13 11:22:50 UTC 2018
#45103: Automatically load JavaScript translations when scripts are enqueued if
these exist.
------------------------------------------------+-------------------------
Reporter: herregroen | Owner: herregroen
Type: enhancement | Status: reopened
Priority: high | Milestone: 5.0
Component: I18N | Version: trunk
Severity: critical | Resolution:
Keywords: has-patch fixed-5.0 needs-dev-note | Focuses: javascript
------------------------------------------------+-------------------------
Comment (by tfirdaus):
@herregroen Thank you for the hard work on this function,
{{{wp_set_script_translations}}}.
I noticed that this function currently throws a PHP warning notice, as
follows:
{{{
Undefined index: path at wp-includes/l10n.php:932
}}}
One plugin, [https://wordpress.org/plugins/tarot/], happens to have
implemented this function, and this PHP warning persists on this plugin.
Also, using `wp.i18n` triggers an error in the browser Console.
{{{
Jed localization error:
Error: Domain `my-domain` was not found.
}}}
Is there something else we need to configure to get these functions
working without the error notices? It seems I've probably missed something
here.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45103#comment:38>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list