mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 15:09:34 +00:00
i18n: Be deliberate about distinguishing ugettext and ugettext_lazy.
The early str conversions in zerver.models were defeating the point of ugettext_lazy. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
e6f6f8d45f
commit
bba43f35ca
@@ -1,6 +1,7 @@
|
||||
from typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, Union
|
||||
|
||||
from django.http import HttpResponse
|
||||
from django.utils.functional import Promise
|
||||
from typing_extensions import TypedDict
|
||||
|
||||
ViewFuncT = TypeVar('ViewFuncT', bound=Callable[..., HttpResponse])
|
||||
@@ -26,9 +27,9 @@ class ProfileDataElement(ProfileDataElementBase):
|
||||
|
||||
ProfileData = List[ProfileDataElement]
|
||||
|
||||
FieldElement = Tuple[int, str, Validator[Union[int, str, List[int]]], Callable[[Any], Any], str]
|
||||
ExtendedFieldElement = Tuple[int, str, ExtendedValidator, Callable[[Any], Any], str]
|
||||
UserFieldElement = Tuple[int, str, RealmUserValidator, Callable[[Any], Any], str]
|
||||
FieldElement = Tuple[int, Promise, Validator[Union[int, str, List[int]]], Callable[[Any], Any], str]
|
||||
ExtendedFieldElement = Tuple[int, Promise, ExtendedValidator, Callable[[Any], Any], str]
|
||||
UserFieldElement = Tuple[int, Promise, RealmUserValidator, Callable[[Any], Any], str]
|
||||
|
||||
ProfileFieldData = Dict[str, Union[Dict[str, str], str]]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user