Lines Matching defs:ngettext
31 GETTEXT_FUNCTIONS = ('_', 'gettext', 'ngettext')
149 def ngettext(__context, __singular, __plural, __num, **variables):
155 return ngettext
167 # the other time for the n-parameter of the ngettext function.
185 ngettext = getattr(translations, 'ungettext', None)
186 if ngettext is None:
187 ngettext = translations.ngettext
188 self._install_callables(gettext, ngettext, newstyle)
197 def _install_callables(self, gettext, ngettext, newstyle=None):
202 ngettext = _make_new_ngettext(ngettext)
205 ngettext=ngettext
209 for key in 'gettext', 'ngettext':
375 ngettext = nodes.Name('ngettext', 'load')
376 node = nodes.Call(ngettext, [
454 >>> node = env.parse('{{ (_("foo"), _(), ngettext("foo", "bar", 42)) }}')
456 [(1, '_', 'foo'), (1, '_', ()), (1, 'ngettext', ('foo', 'bar', None))]
458 [(1, '_', ('foo',)), (1, 'ngettext', ('foo', 'bar'))]