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

WordPress Trac noreply at wordpress.org
Thu Oct 18 12:21:30 UTC 2018


#45103: Automatically load JavaScript translations when scripts are enqueued if
these exist.
-------------------------+-------------------------
 Reporter:  herregroen   |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  high         |   Milestone:  5.0
Component:  I18N         |     Version:  trunk
 Severity:  critical     |  Resolution:
 Keywords:  needs-patch  |     Focuses:  javascript
-------------------------+-------------------------

Comment (by swissspidy):

 > I'm wondering if we should introduce an api for scripts to indicate they
 have translation strings.

 I was about so say the same. We did something like that in #20491. See
 `WP_Scripts:: load_translation_file()` in
 https://core.trac.wordpress.org/attachment/ticket/20491/20491.7.diff

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


More information about the wp-trac mailing list