mirror of
https://github.com/processwire/processwire.git
synced 2025-08-07 23:38:29 +02:00
Update for processwire/processwire-issues#1757
This commit is contained in:
@@ -285,12 +285,11 @@ function _x($text, $context, $textdomain = null) {
|
|||||||
*/
|
*/
|
||||||
function _n($textSingular, $textPlural, $count, $textdomain = null) {
|
function _n($textSingular, $textPlural, $count, $textdomain = null) {
|
||||||
$count = (int) $count;
|
$count = (int) $count;
|
||||||
$value = $count === 1 ? __($textSingular, $textdomain) : __($textPlural, $textdomain);
|
if($count === 0 && wire()->languages) {
|
||||||
if($count === 0 && $value !== $textPlural && wire()->languages) {
|
|
||||||
$plural = __('0-plural', 'common');
|
$plural = __('0-plural', 'common');
|
||||||
if(strtolower($plural) === '0-singular') {
|
$value = strtolower($plural) === '0-singular' ? __($textSingular, $textdomain) : __($textPlural, $textdomain);
|
||||||
$value = __($textSingular, $textdomain);
|
} else {
|
||||||
}
|
$value = $count === 1 ? __($textSingular, $textdomain) : __($textPlural, $textdomain);
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user