WordPress.org

Making WordPress.org

Changeset 5972


Ignore:
Timestamp:
09/28/2017 06:06:48 PM (3 years ago)
Author:
coreymckrill
Message:

WordCamp Base: Add missing singular placeholder

Some languages use a singular form for other numbers besides "1",
e.g. "21" in Russian. This follows the same strategy used in _s
to make the translations compatible.

Fixes #3156
Props mp518, coreymckrill

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/themes/wordcamp-base/comments.php

    r3275 r5972  
    3232
    3333<?php if ( have_comments() ) : ?>
    34             <h3 id="comments-title"><?php
    35             printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'wordcamporg' ),
    36             number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' );
    37             ?></h3>
     34            <h3 id="comments-title">
     35                <?php
     36                if ( 1 === get_comments_number() ) {
     37                    printf(
     38                        /* translators: %s: post title */
     39                        esc_html_x( 'One Response to &ldquo;%s&rdquo;', 'comments title', 'wordcamporg' ),
     40                        '<span>' . get_the_title() . '</span>'
     41                    );
     42                } else {
     43                    printf(
     44                        /* translators: 1: number of comments, 2: post title */
     45                        esc_html( _nx( '%1$s Response to &ldquo;%2$s&rdquo;', '%1$s Responses to &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'wordcamporg' ) ),
     46                        number_format_i18n( get_comments_number() ),
     47                        '<span>' . get_the_title() . '</span>'
     48                    );
     49                }
     50                ?>
     51            </h3>
    3852
    3953<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) : // Are there comments to navigate through? ?>
Note: See TracChangeset for help on using the changeset viewer.