[i18n] Make Json error messages translatable.

This commit is contained in:
Umair Khan
2016-06-01 17:39:58 +05:00
committed by Tim Abbott
parent 7057b2ae37
commit 1bfe566c8d
2 changed files with 4 additions and 2 deletions

View File

@@ -316,7 +316,7 @@ def authenticated_rest_api_view(view_func):
except ValueError:
return json_error(_("Invalid authorization header for basic auth"))
except KeyError:
return json_unauthorized("Missing authorization header for basic auth")
return json_unauthorized(_("Missing authorization header for basic auth"))
# Now we try to do authentication or die
try: