Lines Matching refs:gettext
26 def gettext(self, message: str) -> str:
43 # provides ugettext, it will be assigned to gettext.
46 "gettext",
167 return __context.call(__context.resolve("gettext"), *args, **kwargs)
172 def gettext(__context: Context, __string: str, **variables: t.Any) -> str:
181 return gettext
197 # Always treat as a format string, see gettext comment above.
214 # Always treat as a format string, see gettext comment above.
239 # Always treat as a format string, see gettext comment above.
246 """This extension adds gettext support to Jinja."""
254 # something is called twice here. One time for the gettext value and
274 gettext = getattr(translations, "ugettext", None)
275 if gettext is None:
276 gettext = translations.gettext
284 gettext, ngettext, newstyle=newstyle, pgettext=pgettext, npgettext=npgettext
288 import gettext
290 translations = gettext.NullTranslations()
308 gettext=translations.gettext,
317 gettext: t.Callable[[str], str],
326 gettext = _make_new_gettext(gettext)
336 gettext=gettext, ngettext=ngettext, pgettext=pgettext, npgettext=npgettext
340 for key in ("gettext", "ngettext", "pgettext", "npgettext"):
541 # gettext invocations only if there are vars.
547 func_name = "gettext"
560 # in case newstyle gettext is used, the method is powerful
665 gettext functions that allow keyword arguments for placeholder expansion.
668 in tuples. As a consequence invalid gettext calls (calls without a single
686 * ``function`` is the name of the ``gettext`` function used (if the
735 find comments for gettext calls forwards. Once the comment
790 gettext call in one line of code and the matching comment in the
795 gettext calls.