From 123844b10d61cb3cb8846ca844a159f1ccf53602 Mon Sep 17 00:00:00 2001 From: Akhil Narang Date: Wed, 8 May 2024 16:17:45 +0530 Subject: [PATCH] chore(csvutils): update messages Avoid semgrep issue with translated string Signed-off-by: Akhil Narang --- frappe/utils/csvutils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frappe/utils/csvutils.py b/frappe/utils/csvutils.py index 6056465b64..fd3a20b8ba 100644 --- a/frappe/utils/csvutils.py +++ b/frappe/utils/csvutils.py @@ -51,7 +51,7 @@ def read_csv_content(fcontent): if not decoded: frappe.msgprint( - _("Unknown file encoding. Tried [%s]." % ", ".join(FILE_ENCODING_OPTIONS)), + _("Unknown file encoding. Tried to use: {0}").format(", ".join(FILE_ENCODING_OPTIONS)), raise_exception=True, ) @@ -70,7 +70,9 @@ def read_csv_content(fcontent): except csv.Error: # if sniff fails, show alert on user interface. Fall back to use default dialect (excel) frappe.msgprint( - _("Delimiter detection failed. Try enable Custom delimiters and adjust Delimiter options."), + _( + "Delimiter detection failed. Try to enable custom delimiters and adjust the delimiter options as per your data." + ), indicator="orange", alert=True, )