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

WordPress Trac noreply at wordpress.org
Thu Oct 25 14:46:16 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
------------------------------------------+-------------------------
Changes (by ocean90):

 * keywords:  has-patch needs-unit-tests fixed-5.0 => needs-unit-tests
     needs-patch


Comment:

 * For core, the file should be `en_US-
 813e104eb47e13dd4cc5af844c618754.json` without the `default-` prefix
 * `wp_set_script_translations()` should not have the `@link` tag to this
 ticket.
 * `load_script_textdomain()` has no `@since` tag
 * The path detection seems fragile, there should be a few more tests to
 also test that it works with plugins and themes.
 * The naming is a bit off, `set_translations()` vs. `Register a
 translation textdomain.`

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


More information about the wp-trac mailing list