[wp-meta] [Making WordPress.org] #1691: Internationalisation

Making WordPress.org noreply at wordpress.org
Mon Jun 6 23:26:13 UTC 2016


#1691: Internationalisation
------------------------------+---------------------------------------
 Reporter:  dd32              |       Owner:  ocean90
     Type:  task              |      Status:  reviewing
 Priority:  high              |   Milestone:  Plugin Directory v3 - M5
Component:  Plugin Directory  |  Resolution:
 Keywords:                    |
------------------------------+---------------------------------------

Comment (by tellyworth):

 attachment:class-plugin-i18n.diff adds a Plugin_I18n class for translating
 plugin content. Includes filters for the_title, the_content,
 get_the_excerpt. With one minor change to the theme, it works for me.

 The Plugin_I18n code is mostly adapted from plugins-plugins/svn-
 track/class.dotorg-plugins-i18n.php.

 Currently, translation is done at display time via the filters. If we
 decide to switch to storing translated content in postmeta for search, the
 class should be reusable more or less as-is - replace the output filters
 with something  that stores meta at update time.

 Search translation will work easily if translated content is available in
 postmeta, for example as `fr_title` and `fr_content`. With this patch, an
 additional filter shim can hook into the Jetpack sync and add fake
 translated content in meta keys, much like `filter_shim_postmeta` does now
 for the downloads count. That gives us translated content and translated
 search without requiring additional data storage; and in a way that could
 be easily adapted to store translated data (in postmeta) if that becomes
 necessary for performance or other reasons.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/1691#comment:12>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list