How does it work?
In short, to make it work, you need to
- use the
- let WordPress know that a script has translations by calling
wp_set_script_translations( 'my-handle', 'my-domain' ) after you register a script.
Read more about it in the JS i18n devnote.
Can I have a look at the tickets involved?
Sure thing! Here’s an overview of all the work we’ve done in the last few weeks to get to this point:
- WP-CLI WP-CLI is the Command Line Interface for WordPress, used to do administrative and development tasks in a programmatic way. The project page is http://wp-cli.org/ https://make.wordpress.org/cli/: Make sure
- Meta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress.: generate translations on translate.wordpress.org for core, themes and plugins. Ticket: https://meta.trac.wordpress.org/ticket/3748
- Meta: generate and serve JS language packs from translate.wordpress.org for core, themes and plugins. Ticket: https://meta.trac.wordpress.org/ticket/3876
- Core Core is the set of software required to run WordPress. The Core Development Team builds WordPress.: Logic to load JS translations. Ticket: https://core.trac.wordpress.org/ticket/45103
- Core: API to register JS translations for a script. https://core.trac.wordpress.org/ticket/45161
With JS language packs we have concluded the package inclusion focus. In the remaining time we will keep focus on two things:
- Keep the packages up-to-date until 5.0 ships.