Home | History | Annotate | Download | only in jinja2

Lines Matching defs:ngettext

29 GETTEXT_FUNCTIONS = ('_', 'gettext', 'ngettext')
147 def ngettext(__context, __singular, __plural, __num, **variables):
153 return ngettext
165 # the other time for the n-parameter of the ngettext function.
183 ngettext = getattr(translations, 'ungettext', None)
184 if ngettext is None:
185 ngettext = translations.ngettext
186 self._install_callables(gettext, ngettext, newstyle)
195 def _install_callables(self, gettext, ngettext, newstyle=None):
200 ngettext = _make_new_ngettext(ngettext)
203 ngettext=ngettext
207 for key in 'gettext', 'ngettext':
359 ngettext = nodes.Name('ngettext', 'load')
360 node = nodes.Call(ngettext, [
465 >>> node = env.parse('{{ (_("foo"), _(), ngettext("foo", "bar", 42)) }}')
467 [(1, '_', 'foo'), (1, '_', ()), (1, 'ngettext', ('foo', 'bar', None))]
469 [(1, '_', ('foo',)), (1, 'ngettext', ('foo', 'bar'))]