[wp-trac] [WordPress Trac] #20491: Introduce some JavaScript i18n functions

WordPress Trac noreply at wordpress.org
Wed May 3 20:35:47 UTC 2017


#20491: Introduce some JavaScript i18n functions
--------------------------------------+-----------------------------------
 Reporter:  johnbillion               |       Owner:  swissspidy
     Type:  enhancement               |      Status:  assigned
 Priority:  normal                    |   Milestone:  Future Release
Component:  I18N                      |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  javascript, rest-api
--------------------------------------+-----------------------------------

Comment (by swissspidy):

 Replying to [comment:68 rmccue]:
 > Replying to [comment:67 swissspidy]:
 > > Projects like Jetpack easily have hundreds of translatable strings.
 Passing all the strings will be too much for them, and separating JS
 strings on the fly would have a bigger performance impact than just
 providing a JSON file right from the beginning. The language pack system
 with its update system has been reliable for so long now that I don't see
 any harm in providing separate files.
 >
 > How would this work with local development? (And, for that matter, non-
 repository plugins.) Would we still need a dynamic piece for this?

 The data from the JSON file is handled by PHP right now, so it'd be easy
 to add and maintain a dynamic piece for this. Also, developers could use
 the same string extraction / JSON file generation script(s) locally and
 bundle the files in their plugins. Just like makepot.php.

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


More information about the wp-trac mailing list