[wp-trac] [WordPress Trac] #26651: Outer spaces in wp_sprintf_l() strings are easily lost in translation

WordPress Trac noreply at wordpress.org
Mon Dec 16 16:45:27 UTC 2013


#26651: Outer spaces in wp_sprintf_l() strings are easily lost in translation
--------------------------+-----------------------------
 Reporter:  andy          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  I18N          |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 `wp_sprintf_l()` uses the following strings:
 {{{
         $l = apply_filters( 'wp_sprintf_l', array(
                 /* translators: used between list items, there is a space
 after the comma */
                 'between'          => __(', '),
                 /* translators: used between list items, there is a space
 after the and */
                 'between_last_two' => __(', and '),
                 /* translators: used between only two list items, there is
 a space after the and */
                 'between_only_two' => __(' and '),
         ) );
 }}}

 The leading and trailing spaces are frequently omitted by translators
 despite the translator comments.

 Elsewhere, nbachiyski suggests using placeholders (`%s`) to assist
 translators.

 The attached patch does just that, and then strips the placeholders before
 passing the array of strings through the filter.

--
Ticket URL: <http://core.trac.wordpress.org/ticket/26651>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list