Skip to content

Commit

Permalink
Mark unicode translation functions for deprecation.
Browse files Browse the repository at this point in the history
  • Loading branch information
PIG208 committed Aug 2, 2022
1 parent fb26cc5 commit f3d5cd1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions django-stubs/utils/translation/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ class Trans:
def __getattr__(self, real_name: Any): ...

def gettext_noop(message: str) -> str: ...
def ugettext_noop(message: str) -> str: ...
def gettext(message: str) -> str: ...
def ugettext(message: str) -> str: ...
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: ...

Expand All @@ -41,6 +38,12 @@ def pgettext_lazy(context: str, message: str) -> Promise: ...
def ngettext_lazy(singular: str, plural: str, number: Union[int, str, None] = ...) -> Promise: ...
def npgettext_lazy(context: str, singular: str, plural: str, number: Union[int, str, None] = ...) -> Promise: ...

# NOTE: These translation functions are deprecated and removed in Django 4.0. We should remove them when we drop
# support for 3.2
def ugettext_noop(message: str) -> str: ...
def ugettext(message: str) -> str: ...
def ungettext(singular: str, plural: str, number: float) -> str: ...

ugettext_lazy = gettext_lazy
ungettext_lazy = ngettext_lazy

Expand Down

0 comments on commit f3d5cd1

Please sign in to comment.