Browse files

Merge pull request #135 from obenland/number-context

_s: Provide a context for the comments title strings.

There are languages that have more than one plural form. Sometimes these
languages need to add the %1$s placeholder in the original singular
version to help differentiate between these plural forms.

In case the original singular version ('One thought on
“%2$s”' in this case) is used elsewhere, the translation
with the faulty %1$s will be used, possibly ending up with the
placeholder not being replaced.

The context will prevent that from happening by seperating the strings.
  • Loading branch information...
2 parents 80d803a + 6793718 commit 84cc7f78ccee76761d700f3f41854ee43281e402 @obenland obenland committed Jan 15, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 comments.php
@@ -29,7 +29,7 @@
<?php if ( have_comments() ) : ?>
<h2 class="comments-title">
- printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), '_s' ),
+ printf( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', '_s' ),
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );

0 comments on commit 84cc7f7

Please sign in to comment.