Merge pull request #24005 from SergeyBiryukov/patch-1
Correct plural forms usage in loop/result-count.php
This commit is contained in:
commit
ba64aea195
|
@ -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–%2$d of %3$d results', $total, 'with first and last result', 'woocommerce' ), $first, $last, $total );
|
||||
printf( _nx( 'Showing %1$d–%2$d of %3$d result', 'Showing %1$d–%2$d of %3$d results', $total, 'with first and last result', 'woocommerce' ), $first, $last, $total );
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
|
|
Loading…
Reference in New Issue