Permalink
Browse files

_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...
1 parent faf979b commit 6793718e8aff8fc82ecec62d5b3b533230a6bbb8 @obenland obenland committed Jan 15, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 comments.php
View
@@ -29,7 +29,7 @@
<?php if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
- 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>' );
?>
</h2>

0 comments on commit 6793718

Please sign in to comment.