diff --git a/django-stubs/utils/translation/__init__.pyi b/django-stubs/utils/translation/__init__.pyi index a867ca6869..62b2954107 100644 --- a/django-stubs/utils/translation/__init__.pyi +++ b/django-stubs/utils/translation/__init__.pyi @@ -4,6 +4,7 @@ from contextlib import ContextDecorator from typing import Any, Callable, Optional, Type, Union from django.http.request import HttpRequest +from django.utils.functional import Promise LANGUAGE_SESSION_KEY: str @@ -33,14 +34,14 @@ def ngettext(singular: str, plural: str, number: float) -> str: ... def ungettext(singular: str, plural: str, number: float) -> str: ... def pgettext(context: str, message: str) -> str: ... def npgettext(context: str, singular: str, plural: str, number: int) -> str: ... +def gettext_lazy(message: str) -> Promise: ... +def pgettext_lazy(context: str, message: str) -> Promise: ... +def ngettext_lazy(singular: str, plural: str, number: Union[int, str, None]) -> Promise: ... -gettext_lazy = gettext -pgettext_lazy = pgettext +ugettext_lazy = gettext_lazy +ungettext_lazy = ngettext_lazy -def ugettext_lazy(message: str) -> str: ... -def ngettext_lazy(singular: str, plural: str, number: Union[int, str, None] = ...) -> str: ... -def ungettext_lazy(singular: str, plural: str, number: Union[int, str, None] = ...) -> str: ... -def npgettext_lazy(context: str, singular: str, plural: str, number: Union[int, str, None] = ...) -> str: ... +def npgettext_lazy(context: str, singular: str, plural: str, number: Union[int, str, None]) -> Promise: ... def activate(language: str) -> None: ... def deactivate() -> None: ...