[wp-trac] [WordPress Trac] #60554: Add support for using only PHP translation files
WordPress Trac
noreply at wordpress.org
Tue Apr 30 08:37:40 UTC 2024
#60554: Add support for using only PHP translation files
-------------------------------------------------+-------------------------
Reporter: swissspidy | Owner: swissspidy
Type: enhancement | Status: closed
Priority: normal | Milestone: 6.6
Component: I18N | Version: 6.5
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests commit | Focuses:
needs-dev-note |
-------------------------------------------------+-------------------------
Comment (by swissspidy):
In [changeset:"58062" 58062]:
{{{
#!CommitTicketReference repository="" revision="58062"
I18N: Actually add all the files for [58061], not just the test fixtures.
Improve support for using only PHP translation files.
This builds on top of the PHP translation file support added in WordPress
6.5, improving the behavior for projects using solely `.l10n.php`
translation files and no `.mo.` and `.po` files.
Updates `wp_get_installed_translations()`, which is used when updating
language packs and when uninstalling plugins/themes (to remove the
translations again), to look for PHP translation files and read metadata
from them. Additionally, the file lookup is now cached thanks to using
`WP_Textdomain_Registry`.
Updates `Language_Pack_Upgrader::check_package()` to allow language packs
that only contain PHP translation files. While WordPress.org continues to
serve `.mo` and `.po` files, third-party services might want to only use
the PHP file format.
See #60554.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60554#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list