Make WordPress Core

Changeset 27284


Ignore:
Timestamp:
02/26/2014 04:49:24 PM (11 years ago)
Author:
nacin
Message:

Use placeholders in strings in wp_sprintf_l() to ensure spaces are not lost in translation.

props andy.
fixes #26651.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r27097 r27284  
    34323432    /**
    34333433     * Filter the translated delimiters used by wp_sprintf_l().
     3434     * Placeholders (%s) are included to assist translators and then
     3435     * removed before the array of strings reaches the filter.
    34343436     *
    34353437     * Please note: Ampersands and entities should be avoided here.
     
    34403442     */
    34413443    $l = apply_filters( 'wp_sprintf_l', array(
    3442         /* translators: used between list items, there is a space after the comma */
    3443         'between'          => __(', '),
    3444         /* translators: used between list items, there is a space after the and */
    3445         'between_last_two' => __(', and '),
    3446         /* translators: used between only two list items, there is a space after the and */
    3447         'between_only_two' => __(' and '),
     3444        /* translators: used to join items in a list with more than 2 items */
     3445        'between'          => sprintf( __('%s, %s'), '', '' ),
     3446        /* translators: used to join last two items in a list with more than 2 times */
     3447        'between_last_two' => sprintf( __('%s, and %s'), '', '' ),
     3448        /* translators: used to join items in a list with only 2 items */
     3449        'between_only_two' => sprintf( __('%s and %s'), '', '' ),
    34483450    ) );
    34493451
Note: See TracChangeset for help on using the changeset viewer.