[wp-meta] [Making WordPress.org] #7296: Add PHP files to language packs
Making WordPress.org
noreply at wordpress.org
Thu Oct 5 08:48:25 UTC 2023
#7296: Add PHP files to language packs
--------------------------------------+--------------------
Reporter: swissspidy | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Translate Site & Plugins | Keywords:
--------------------------------------+--------------------
Context:
The WordPress core performance team is working on a
[https://wordpress.org/plugins/performant-translations/ Performant
Translations feature plugin] that uses a new approach to handle
translation files in WordPress, making localization blazing fast. This
plugin helps to make localized WordPress sites faster by replacing the
traditional MO translation files with PHP files, which are much faster to
parse.
Learn more at https://make.wordpress.org/core/2023/09/05/call-for-testing-
performant-translations/
The goal is to merge this new feature into WordPress 6.5, but nothing is
set in stone yet. I merely want to get a headstart on making all the infra
changes.
Anyway, once that lands, translate.wordpress.org will need to serve PHP
files as part of language packs.
-> [https://github.com/GlotPress/GlotPress/pull/1626 Here is the PR adding
PHP support to GlotPress]
I do have a patch for the
`\WordPressdotorg\GlotPress\Customizations\CLI\Language_Pack` class to
enable this for plugins and themes. But I couldn't find where the language
packs are generated for core. Any help would be appreciated.
Another open question is if and how PHP files should be added
conditionally. If a site is running WordPress 6.0, the language pack
(either for core or a plugin/theme) shouldn't need to include the PHP
files. Though it doesn't really hurt either, as the files are rather small
(smaller than the MO file).
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/7296>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list