forked from mirror/_s
_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.
This commit is contained in:
parent
faf979bb4d
commit
6793718e8a
|
@ -29,7 +29,7 @@
|
||||||
<?php if ( have_comments() ) : ?>
|
<?php if ( have_comments() ) : ?>
|
||||||
<h2 class="comments-title">
|
<h2 class="comments-title">
|
||||||
<?php
|
<?php
|
||||||
printf( _n( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), '_s' ),
|
printf( _nx( 'One thought on “%2$s”', '%1$s thoughts on “%2$s”', get_comments_number(), 'comments title', '_s' ),
|
||||||
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
|
number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
|
||||||
?>
|
?>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
Reference in New Issue