(
__context: Context,
__singular: str,
__plural: str,
__num: int,
**variables: t.Any,
)
| 184 | def _make_new_ngettext(func: t.Callable[[str, str, int], str]) -> t.Callable[..., str]: |
| 185 | @pass_context |
| 186 | def ngettext( |
| 187 | __context: Context, |
| 188 | __singular: str, |
| 189 | __plural: str, |
| 190 | __num: int, |
| 191 | **variables: t.Any, |
| 192 | ) -> str: |
| 193 | variables.setdefault("num", __num) |
| 194 | rv = __context.call(func, __singular, __plural, __num) |
| 195 | if __context.eval_ctx.autoescape: |
| 196 | rv = Markup(rv) |
| 197 | # Always treat as a format string, see gettext comment above. |
| 198 | return rv % variables # type: ignore |
| 199 | |
| 200 | return ngettext |
| 201 |
nothing calls this directly
no test coverage detected