Ticket #8614: 8614.patch

File 8614.patch, 601 bytes (added by Doug Haber <doug@…>, 11 years ago)
  • includes/translate.php

     
    3333        return Translate::find()->string($string, $args);
    3434    }
    3535
    36     function tn($string) {
    37         $args = func_get_args();
    38         $args = array_slice($args, 1);
    39         return Translate::find()->number($string, $args);
     36    function tn($singular, $plural, $num) {
     37        $string = $num == 1 ? $singular : $plural;
     38        return Translate::find()->number($string, 0, array($num));
    4039    }
    4140
    4241