Created
December 6, 2017 10:23
-
-
Save cristianstan/ff22d64655e322bac1bd737ea35927b4 to your computer and use it in GitHub Desktop.
Missing singular placeholder, needed for some languages. See https://codex.wordpress.org/I18n_for_WordPress_Developers#Plurals
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Replace in comments.php: | |
======================= | |
<?php | |
printf( _nx( 'One comment', 'Comments: %1$s', get_comments_number(), 'comments title', 'urbanpointwp' ), number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' ); | |
?> | |
With: | |
======================= | |
<?php | |
$comments_number = get_comments_number(); | |
if ( '1' === $comments_number ) { | |
/* translators: %s: post title */ | |
printf( _x( 'One Reply to “%s”', 'comments title', 'urbanpointwp' ), get_the_title() ); | |
} else { | |
printf( | |
/* translators: 1: number of comments, 2: post title */ | |
_nx( | |
'%1$s Reply to “%2$s”', | |
'%1$s Replies to “%2$s”', | |
$comments_number, | |
'comments title', | |
'urbanpointwp' | |
), | |
number_format_i18n( $comments_number ), | |
get_the_title() | |
); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment