mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
[i18n] Make error messages translatable.
Make all strings passing through `json_error` and `JsonableError` translatable. Fixes #727
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from __future__ import absolute_import
|
||||
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.views.decorators.csrf import csrf_exempt
|
||||
|
||||
from zerver.decorator import authenticated_json_post_view, has_request_variables, REQ
|
||||
@@ -28,7 +29,7 @@ def json_tutorial_send_message(request, user_profile, type=REQ(validator=check_s
|
||||
realm=user_profile.realm)
|
||||
return json_success()
|
||||
# For now, there are no PM cases.
|
||||
return json_error('Bad data passed in to tutorial_send_message')
|
||||
return json_error(_('Bad data passed in to tutorial_send_message'))
|
||||
|
||||
@authenticated_json_post_view
|
||||
@has_request_variables
|
||||
|
||||
Reference in New Issue
Block a user