[wp-trac] [WordPress Trac] #45103: Automatically load JavaScript translations when scripts are enqueued if these exist.

WordPress Trac noreply at wordpress.org
Tue Oct 30 13:00:27 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:  needs-unit-tests needs-patch  |     Focuses:  javascript
------------------------------------------+-------------------------

Comment (by nerrad):

 > Make setting translations lazy so they are only loaded when printed.
 This is because otherwise when enqueueing a script with dependencies you
 would have to set translations on all your dependencies as well.

 If you're lazy loading when printing, this should make it possible to set
 the translations after ''registering'' the script right?  In which case,
 it'd be nice to have tests verify that as well.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45103#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list