refactor: translate error message

This commit is contained in:
Shivam Mishra 2020-04-30 15:56:34 +05:30 committed by GitHub
parent d7e9ef60b8
commit 1426b2d4b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -187,7 +187,7 @@ def upload_file():
import mimetypes
filetype = mimetypes.guess_type(filename)[0]
if filetype not in ALLOWED_MIMETYPES:
frappe.throw("You can only upload JPG, PNG, PDF, or Microsoft documents.")
frappe.throw(_("You can only upload JPG, PNG, PDF, or Microsoft documents."))
if method:
method = frappe.get_attr(method)