Committer: vad
LJSUP-10977: Get rid of 'Argument "nn nnn" isn't numeric in modulus' warningU trunk/cgi-bin/LJ/Lang.pm
Modified: trunk/cgi-bin/LJ/Lang.pm =================================================================== --- trunk/cgi-bin/LJ/Lang.pm 2012-01-16 14:28:16 UTC (rev 20910) +++ trunk/cgi-bin/LJ/Lang.pm 2012-01-16 16:42:08 UTC (rev 20911) @@ -893,7 +893,10 @@ sub plural_form_ru { my ($count) = @_; $count = 0 unless defined $count; - + + ## remove the gaps from numbers: 25 500 -> 25500 + $count =~ s/\s+//g; + return 0 if ( $count % 10 == 1 && $count % 100 != 11 ); return 1 if ( $count % 10 >= 2 && $count % 10 <= 4 )