Make WordPress Core


Ignore:
Timestamp:
03/31/2015 06:44:46 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Decouple strings where the singular and plural form are not just the same string with different numbers, but essentially two different strings.

This allows for using proper plural forms in languages with more than two forms, and also resolves string conflicts when the same string is present in both singular and plural form.

fixes #28502.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/theme-compat/comments.php

    r30754 r31941  
    2424
    2525<?php if ( have_comments() ) : ?>
    26     <h3 id="comments"><?php printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number() ),
    27                                     number_format_i18n( get_comments_number() ), '&#8220;' . get_the_title() . '&#8221;' ); ?></h3>
     26    <h3 id="comments">
     27        <?php
     28            if ( 1 == get_comments_number() ) {
     29                printf( 'One Response to %2$s',  '&#8220;' . get_the_title() . '&#8221;' );
     30            } else {
     31                printf( _n( '%1$s Response to %2$s', '%1$s Responses to %2$s', get_comments_number() ),
     32                    number_format_i18n( get_comments_number() ),  '&#8220;' . get_the_title() . '&#8221;' );
     33            }
     34        ?>
     35    </h3>
    2836
    2937    <div class="navigation">
Note: See TracChangeset for help on using the changeset viewer.