[wp-trac] [WordPress Trac] #62244: Just-in-time translation loading for plugins/themes not in the directory

WordPress Trac noreply at wordpress.org
Tue Nov 26 10:14:23 UTC 2024


#62244: Just-in-time translation loading for plugins/themes not in the directory
-------------------------+-------------------------
 Reporter:  swissspidy   |       Owner:  swissspidy
     Type:  enhancement  |      Status:  closed
 Priority:  normal       |   Milestone:  6.8
Component:  I18N         |     Version:
 Severity:  normal       |  Resolution:  fixed
 Keywords:  has-patch    |     Focuses:
-------------------------+-------------------------
Changes (by swissspidy):

 * owner:  (none) => swissspidy
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"59461" 59461]:
 {{{
 #!CommitTicketReference repository="" revision="59461"
 I18N: Load translations just-in-time for custom themes and plugins.

 In #34114, just-in-time (JIT) translation loading was implemented for
 projects hosted on WordPress.org. This is now expanded to all other
 plugins/themes.

 Projects with a custom `Text Domain` and `Domain Path` header no longer
 need to call `load_plugin_textdomain()` or `load_theme_textdomain()`.

 This reduces the risk of calling them too late, after some translation
 calls already happened, and generally makes it easier to properly
 internationalize a plugin or theme.

 This moves the `get_plugin_data()` from `wp-admin/includes/plugin.php` to
 `wp-includes/functions.php` so it's available during the plugin loading
 process.

 Props swissspidy.
 Fixes #62244.
 }}}

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


More information about the wp-trac mailing list