Merge pull request #24005 from SergeyBiryukov/patch-1

Correct plural forms usage in loop/result-count.php
This commit is contained in:
Rodrigo Primo 2019-06-27 10:14:30 -03:00 committed by GitHub
commit ba64aea195
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -23,14 +23,16 @@ if ( ! defined( 'ABSPATH' ) ) {
?>
<p class="woocommerce-result-count">
<?php
if ( $total <= $per_page || -1 === $per_page ) {
if ( 1 === $total ) {
_e( 'Showing the single result', 'woocommerce' );
} elseif ( $total <= $per_page || -1 === $per_page ) {
/* translators: %d: total results */
printf( _n( 'Showing the single result', 'Showing all %d results', $total, 'woocommerce' ), $total );
printf( _n( 'Showing all %d result', 'Showing all %d results', $total, 'woocommerce' ), $total );
} else {
$first = ( $per_page * $current ) - $per_page + 1;
$last = min( $total, $per_page * $current );
/* translators: 1: first result 2: last result 3: total results */
printf( _nx( 'Showing the single result', 'Showing %1$d&ndash;%2$d of %3$d results', $total, 'with first and last result', 'woocommerce' ), $first, $last, $total );
printf( _nx( 'Showing %1$d&ndash;%2$d of %3$d result', 'Showing %1$d&ndash;%2$d of %3$d results', $total, 'with first and last result', 'woocommerce' ), $first, $last, $total );
}
?>
</p>