(__context: Context, __string: str, **variables: t.Any)
| 170 | def _make_new_gettext(func: t.Callable[[str], str]) -> t.Callable[..., str]: |
| 171 | @pass_context |
| 172 | def gettext(__context: Context, __string: str, **variables: t.Any) -> str: |
| 173 | rv = __context.call(func, __string) |
| 174 | if __context.eval_ctx.autoescape: |
| 175 | rv = Markup(rv) |
| 176 | # Always treat as a format string, even if there are no |
| 177 | # variables. This makes translation strings more consistent |
| 178 | # and predictable. This requires escaping |
| 179 | return rv % variables # type: ignore |
| 180 | |
| 181 | return gettext |
| 182 |