Merge pull request #21639 from shariquerik/translated-autocomplete-options
This commit is contained in:
commit
4bb85c70fd
2 changed files with 4 additions and 2 deletions
|
|
@ -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}"
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue