diff --git a/frappe/desk/utils.py b/frappe/desk/utils.py index 77edf88d7a..d638bb822a 100644 --- a/frappe/desk/utils.py +++ b/frappe/desk/utils.py @@ -53,6 +53,8 @@ def get_csv_bytes(data: list[list], csv_params: dict) -> bytes: def provide_binary_file(filename: str, extension: str, content: bytes) -> None: """Provide a binary file to the client.""" + from frappe import _ + frappe.response["type"] = "binary" frappe.response["filecontent"] = content - frappe.response["filename"] = f"{filename}.{extension}" + frappe.response["filename"] = f"{_(filename)}.{extension}" diff --git a/frappe/public/js/frappe/form/controls/autocomplete.js b/frappe/public/js/frappe/form/controls/autocomplete.js index 04f8bc8cdf..a51a3d86db 100644 --- a/frappe/public/js/frappe/form/controls/autocomplete.js +++ b/frappe/public/js/frappe/form/controls/autocomplete.js @@ -177,7 +177,7 @@ frappe.ui.form.ControlAutocomplete = class ControlAutoComplete extends frappe.ui options = options.map((o) => { if (typeof o !== "string") { - o.label = cstr(o.label); + o.label = __(cstr(o.label)); o.value = cstr(o.value); } return o;