(
__context: Context, __string_ctx: str, __string: str, **variables: t.Any
)
| 203 | def _make_new_pgettext(func: t.Callable[[str, str], str]) -> t.Callable[..., str]: |
| 204 | @pass_context |
| 205 | def pgettext( |
| 206 | __context: Context, __string_ctx: str, __string: str, **variables: t.Any |
| 207 | ) -> str: |
| 208 | variables.setdefault("context", __string_ctx) |
| 209 | rv = __context.call(func, __string_ctx, __string) |
| 210 | |
| 211 | if __context.eval_ctx.autoescape: |
| 212 | rv = Markup(rv) |
| 213 | |
| 214 | # Always treat as a format string, see gettext comment above. |
| 215 | return rv % variables # type: ignore |
| 216 | |
| 217 | return pgettext |
| 218 |
nothing calls this directly
no test coverage detected