vadvs (vadvs) wrote in changelog,
vadvs
vadvs
changelog

[livejournal] r20911: LJSUP-10977: Get rid of 'Argument "nn nn...

Committer: vad
LJSUP-10977: Get rid of 'Argument "nn nnn" isn't numeric in modulus' warning
U   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 )

Tags: livejournal, pm, vad, vadvs
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments