added count variable whenever the plural is used (closes #27)
authorFabien Potencier <fabien.potencier@gmail.com>
Fri, 19 Mar 2010 08:01:41 +0000 (09:01 +0100)
committerFabien Potencier <fabien.potencier@gmail.com>
Fri, 19 Mar 2010 08:01:41 +0000 (09:01 +0100)
lib/Twig/Node/Trans.php

index 4ba34d8..efb1edb 100644 (file)
@@ -47,7 +47,7 @@ class Twig_Node_Trans extends Twig_Node
 
     $function = false === $this->plural ? 'gettext' : 'ngettext';
 
-    if ($vars)
+    if ($vars || false !== $this->plural)
     {
       $compiler
         ->write('echo strtr('.$function.'(')