[wp-meta] [Making WordPress.org] #3876: Update wporg-gp-customizations to generate translation files for each JS file.
Making WordPress.org
noreply at wordpress.org
Thu Jan 17 09:42:42 UTC 2019
#3876: Update wporg-gp-customizations to generate translation files for each JS
file.
--------------------------------------+------------------------
Reporter: herregroen | Owner: ocean90
Type: enhancement | Status: reviewing
Priority: normal | Milestone:
Component: Translate Site & Plugins | Resolution:
Keywords: has-patch |
--------------------------------------+------------------------
Comment (by timwhitlock):
Hi. I don't know if this the right place to comment, but prior to JS
translations being available for plugins, would you be open to some
comments?
In short: I wonder if some concessions can be made for plugins and themes
that only really need a single JSON file.
The combined size of the default text domain's 11 JSON files is ~45K and
I'd expect Core to be more complex and have more JS than the vast majority
of plugins. (My own uses 33 strings, totalling ~8K)
The new system creates complexities which may be ok for Core development,
but many plugin and theme developers looking to use the new system will
struggle to prepare their sources. I know this, because I'm already
beginning to hear from them.
Ensuring file references match production code will cause some people
problems. (e.g. `src/library/component.js` won't match `dist/prod.js`). I
know this has been considered because WP handles `.min.js`, but there are
many common practices that won't produce that result. Using command line
tools to generate PHP files with `/* references: */` seems like
unnecessary wrangling for simple cases.
I agree that following WordPress standards is a fair requirement for being
GlotPress-compatible, and I support that. However, in this case I feel
like the requirements are unnecessarily restrictive and error-prone.
Would it be possible to allow plugins and themes to use a single
`{$slug}-{$locale}.json` file? Perhaps electing to do so through some meta
declaration, or simply on account of the number, or size of strings? I
know that loading such file would also require a change to
`load_script_translation_file`, but would you be against the idea from the
GlotPress side?
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/3876#comment:27>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list