Merge pull request #5072 from Alkarex/ru-plural-intval-bug
i18n ru intval bug
This commit is contained in:
commit
41b7d75cca
|
@ -94,6 +94,7 @@ HELP;
|
||||||
$fnname = 'string_plural_select_' . $lang;
|
$fnname = 'string_plural_select_' . $lang;
|
||||||
$out .= 'if(! function_exists("' . $fnname . '")) {' . "\n";
|
$out .= 'if(! function_exists("' . $fnname . '")) {' . "\n";
|
||||||
$out .= 'function ' . $fnname . '($n){' . "\n";
|
$out .= 'function ' . $fnname . '($n){' . "\n";
|
||||||
|
$out .= ' $n = intval($n);' . "\n";
|
||||||
$out .= ' return ' . $cond . ';' . "\n";
|
$out .= ' return ' . $cond . ';' . "\n";
|
||||||
$out .= '}}' . "\n";
|
$out .= '}}' . "\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_bg")) {
|
if(! function_exists("string_plural_select_bg")) {
|
||||||
function string_plural_select_bg($n){
|
function string_plural_select_bg($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n != 1);;
|
return ($n != 1);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_ca")) {
|
if(! function_exists("string_plural_select_ca")) {
|
||||||
function string_plural_select_ca($n){
|
function string_plural_select_ca($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n != 1);;
|
return ($n != 1);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_cs")) {
|
if(! function_exists("string_plural_select_cs")) {
|
||||||
function string_plural_select_cs($n){
|
function string_plural_select_cs($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
|
return ($n==1) ? 0 : ($n>=2 && $n<=4) ? 1 : 2;;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_de")) {
|
if(! function_exists("string_plural_select_de")) {
|
||||||
function string_plural_select_de($n){
|
function string_plural_select_de($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n != 1);;
|
return ($n != 1);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_en_gb")) {
|
if(! function_exists("string_plural_select_en_gb")) {
|
||||||
function string_plural_select_en_gb($n){
|
function string_plural_select_en_gb($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n != 1);;
|
return ($n != 1);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_en_us")) {
|
if(! function_exists("string_plural_select_en_us")) {
|
||||||
function string_plural_select_en_us($n){
|
function string_plural_select_en_us($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n != 1);;
|
return ($n != 1);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_eo")) {
|
if(! function_exists("string_plural_select_eo")) {
|
||||||
function string_plural_select_eo($n){
|
function string_plural_select_eo($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n != 1);;
|
return ($n != 1);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_es")) {
|
if(! function_exists("string_plural_select_es")) {
|
||||||
function string_plural_select_es($n){
|
function string_plural_select_es($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n != 1);;
|
return ($n != 1);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_fi_fi")) {
|
if(! function_exists("string_plural_select_fi_fi")) {
|
||||||
function string_plural_select_fi_fi($n){
|
function string_plural_select_fi_fi($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n != 1);;
|
return ($n != 1);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_fr")) {
|
if(! function_exists("string_plural_select_fr")) {
|
||||||
function string_plural_select_fr($n){
|
function string_plural_select_fr($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n > 1);;
|
return ($n > 1);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_is")) {
|
if(! function_exists("string_plural_select_is")) {
|
||||||
function string_plural_select_is($n){
|
function string_plural_select_is($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n % 10 != 1 || $n % 100 == 11);;
|
return ($n % 10 != 1 || $n % 100 == 11);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_it")) {
|
if(! function_exists("string_plural_select_it")) {
|
||||||
function string_plural_select_it($n){
|
function string_plural_select_it($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n != 1);;
|
return ($n != 1);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_nb_no")) {
|
if(! function_exists("string_plural_select_nb_no")) {
|
||||||
function string_plural_select_nb_no($n){
|
function string_plural_select_nb_no($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n != 1);;
|
return ($n != 1);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_nl")) {
|
if(! function_exists("string_plural_select_nl")) {
|
||||||
function string_plural_select_nl($n){
|
function string_plural_select_nl($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n != 1);;
|
return ($n != 1);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_pl")) {
|
if(! function_exists("string_plural_select_pl")) {
|
||||||
function string_plural_select_pl($n){
|
function string_plural_select_pl($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n==1 ? 0 : ($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14) ? 1 : $n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14) ? 2 : 3);;
|
return ($n==1 ? 0 : ($n%10>=2 && $n%10<=4) && ($n%100<12 || $n%100>14) ? 1 : $n!=1 && ($n%10>=0 && $n%10<=1) || ($n%10>=5 && $n%10<=9) || ($n%100>=12 && $n%100<=14) ? 2 : 3);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_pt_br")) {
|
if(! function_exists("string_plural_select_pt_br")) {
|
||||||
function string_plural_select_pt_br($n){
|
function string_plural_select_pt_br($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n > 1);;
|
return ($n > 1);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_ro")) {
|
if(! function_exists("string_plural_select_ro")) {
|
||||||
function string_plural_select_ro($n){
|
function string_plural_select_ro($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
|
return ($n==1?0:((($n%100>19)||(($n%100==0)&&($n!=0)))?2:1));;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_ru")) {
|
if(! function_exists("string_plural_select_ru")) {
|
||||||
function string_plural_select_ru($n){
|
function string_plural_select_ru($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n%10==1 && $n%100!=11 ? 0 : $n%10>=2 && $n%10<=4 && ($n%100<12 || $n%100>14) ? 1 : $n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)? 2 : 3);;
|
return ($n%10==1 && $n%100!=11 ? 0 : $n%10>=2 && $n%10<=4 && ($n%100<12 || $n%100>14) ? 1 : $n%10==0 || ($n%10>=5 && $n%10<=9) || ($n%100>=11 && $n%100<=14)? 2 : 3);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_sv")) {
|
if(! function_exists("string_plural_select_sv")) {
|
||||||
function string_plural_select_sv($n){
|
function string_plural_select_sv($n){
|
||||||
|
$n = intval($n);
|
||||||
return ($n != 1);;
|
return ($n != 1);;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
if(! function_exists("string_plural_select_zh_cn")) {
|
if(! function_exists("string_plural_select_zh_cn")) {
|
||||||
function string_plural_select_zh_cn($n){
|
function string_plural_select_zh_cn($n){
|
||||||
|
$n = intval($n);
|
||||||
return 0;;
|
return 0;;
|
||||||
}}
|
}}
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in a new issue