Skip to content
This repository

_s: Provide a context for the comments title strings. #135

Merged
merged 1 commit into from over 1 year ago

1 participant

Konstantin Obenland
Konstantin Obenland
Collaborator

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.

Konstantin Obenland obenland _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.
6793718
Konstantin Obenland obenland merged commit 84cc7f7 into from
Konstantin Obenland obenland deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jan 15, 2013
Konstantin Obenland obenland _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.
6793718
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  comments.php
2  comments.php
@@ -29,7 +29,7 @@
29 29 <?php if ( have_comments() ) : ?>
30 30 <h2 class="comments-title">
31 31 <?php
32   - printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), '_s' ),
  32 + printf( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', '_s' ),
33 33 number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
34 34 ?>
35 35 </h2>

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.