mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
views/__init__: Add missing annotations.
This commit is contained in:
@@ -251,6 +251,7 @@ def accounts_register(request):
|
||||
|
||||
@zulip_login_required
|
||||
def accounts_accept_terms(request):
|
||||
# type: (HttpRequest) -> HttpResponse
|
||||
email = request.user.email
|
||||
domain = resolve_email_to_domain(email)
|
||||
if request.method == "POST":
|
||||
@@ -812,6 +813,7 @@ def sent_time_in_epoch_seconds(user_message):
|
||||
return calendar.timegm(user_message.message.pub_date.utctimetuple())
|
||||
|
||||
def with_language(string, language):
|
||||
# type: (text_type, text_type) -> text_type
|
||||
old_language = translation.get_language()
|
||||
translation.activate(language)
|
||||
result = _(string)
|
||||
@@ -819,6 +821,7 @@ def with_language(string, language):
|
||||
return result
|
||||
|
||||
def get_language_list():
|
||||
# type: () -> List[Dict[str, Any]]
|
||||
path = os.path.join(settings.STATIC_ROOT, 'locale', 'language_options.json')
|
||||
with open(path, 'r') as reader:
|
||||
languages = ujson.load(reader)
|
||||
|
||||
Reference in New Issue
Block a user