@@ -4,6 +4,7 @@ from contextlib import ContextDecorator
4
4
from typing import Any , Callable , Optional , Type , Union
5
5
6
6
from django .http .request import HttpRequest
7
+ from django .utils .functional import Promise
7
8
8
9
LANGUAGE_SESSION_KEY : str
9
10
@@ -33,14 +34,14 @@ def ngettext(singular: str, plural: str, number: float) -> str: ...
33
34
def ungettext (singular : str , plural : str , number : float ) -> str : ...
34
35
def pgettext (context : str , message : str ) -> str : ...
35
36
def npgettext (context : str , singular : str , plural : str , number : int ) -> str : ...
37
+ def gettext_lazy (message : str ) -> Promise : ...
38
+ def pgettext_lazy (context : str , message : str ) -> Promise : ...
39
+ def ngettext_lazy (singular : str , plural : str , number : Union [int , str , None ]) -> Promise : ...
36
40
37
- gettext_lazy = gettext
38
- pgettext_lazy = pgettext
41
+ ugettext_lazy = gettext_lazy
42
+ ungettext_lazy = ngettext_lazy
39
43
40
- def ugettext_lazy (message : str ) -> str : ...
41
- def ngettext_lazy (singular : str , plural : str , number : Union [int , str , None ] = ...) -> str : ...
42
- def ungettext_lazy (singular : str , plural : str , number : Union [int , str , None ] = ...) -> str : ...
43
- def npgettext_lazy (context : str , singular : str , plural : str , number : Union [int , str , None ] = ...) -> str : ...
44
+ def npgettext_lazy (context : str , singular : str , plural : str , number : Union [int , str , None ]) -> Promise : ...
44
45
def activate (language : str ) -> None : ...
45
46
def deactivate () -> None : ...
46
47
0 commit comments