mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
json_error: Completely remove json_error.
This completes the migration from `return json_error` to `raise JsonableError`.
This commit is contained in:
@@ -170,12 +170,11 @@ from django.utils.translation import gettext as _
|
||||
```
|
||||
|
||||
Zulip expects all the error messages to be translatable as well. To
|
||||
ensure this, the error message passed to `json_error` and
|
||||
`JsonableError` should always be a literal string enclosed by `_()`
|
||||
ensure this, the error message passed to `JsonableError`
|
||||
should always be a literal string enclosed by `_()`
|
||||
function, e.g.:
|
||||
|
||||
```
|
||||
json_error(_('English text'))
|
||||
JsonableError(_('English text'))
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user