From 94583340ec37e57e4354612d2b7d57555637783a Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Tue, 11 Jul 2023 16:11:29 +0530 Subject: [PATCH 1/2] fix: translate autocomplete options label --- frappe/public/js/frappe/form/controls/autocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; From 8577bbbb3c89fc11702083534f2ab13aa3dfad77 Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Tue, 11 Jul 2023 16:29:00 +0530 Subject: [PATCH 2/2] fix: translate exported filename --- frappe/desk/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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}"