@@ -, +, @@ [% PROCESS 'i18n.inc' %] [% SET nb_stuffs = 1 %] [% tnpx('context', 'There is one stuff.', 'There are {count} stuffs.', nb_stuffs, { count = nb_stuffs }) | $raw %] [% SET nb_stuffs = 42 %] [% tnpx('context', 'There is one stuff.', 'There are {count} stuffs.', nb_stuffs, { count = nb_stuffs }) | $raw %] --- Koha/Template/Plugin/I18N.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- a/Koha/Template/Plugin/I18N.pm +++ a/Koha/Template/Plugin/I18N.pm @@ -117,7 +117,7 @@ sub tpx { =head2 tnp - [% I18N.tnp("context", "item", "items") %] + [% I18N.tnp("context", "item", "items", count) %] =cut @@ -128,13 +128,13 @@ sub tnp { =head2 tnpx - [% I18N.tnpx("context", "{count} item", "{count} items", { count = count }) %] + [% I18N.tnpx("context", "{count} item", "{count} items", count, { count = count }) %] =cut sub tnpx { my ($self, $msgctxt, $msgid, $msgid_plural, $count, $vars) = @_; - return __np($msgctxt, $msgid, $msgid_plural, $count, %$vars); + return __npx($msgctxt, $msgid, $msgid_plural, $count, %$vars); } 1; --