[glotpress-updates] [GlotPress] #517: Add Export parameter to skip translated-to-original translations

GlotPress noreply at wordpress.org
Mon Nov 16 04:49:52 UTC 2015

#517: Add Export parameter to skip translated-to-original translations
 Reporter:  dd32         |      Owner:
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  General      |    Version:
 Keywords:               |
 Sometimes it'd be ideal to skip outputting translations which match their
 originals, for example, in WordPress if a translation isn't provided in a
 po/mo file, we fall back to the original.

 It'd be really helpful if, especially for the `en_*` locales to be able to
 skip exporting those strings.

 The logic is a little complicated, so i'm not 100% sure how to handle it;
 compare singulars
 if ( plural ) {
   compare singulars
   compare all plurals match original_plural

 I guess this could be done at the SQL level rather harshly:
  WHERE ( t.translation_0 != o.singular && ( ISNULL( t.translation_1 ) OR
 t.translation_1 != o.plural ) && ISNULL( t.translation_2 ) OR
 t.translation_2 != o.plural ) ... )

 it could also be done at the PHP level with ease, however, GlotPress lacks
 the filters to achieve this in a plugin.

Ticket URL: <https://glotpress.trac.wordpress.org/ticket/517>
GlotPress <https://glotpress.trac.wordpress.org>
Easy comin', easy goin'

More information about the glotpress-updates mailing list