fix: translate default msgprint title in backend
This commit is contained in:
parent
bf19ebdeb6
commit
aba467307f
2 changed files with 3 additions and 4 deletions
|
|
@ -356,7 +356,7 @@ def msgprint(msg, title=None, raise_exception=0, as_table=False, as_list=False,
|
|||
response JSON and shown in a pop-up / modal.
|
||||
|
||||
:param msg: Message.
|
||||
:param title: [optional] Message title.
|
||||
:param title: [optional] Message title. Default: "Message".
|
||||
:param raise_exception: [optional] Raise given exception and show message.
|
||||
:param as_table: [optional] If `msg` is a list of lists, render as HTML table.
|
||||
:param as_list: [optional] If `msg` is a list, render as un-ordered list.
|
||||
|
|
@ -393,8 +393,7 @@ def msgprint(msg, title=None, raise_exception=0, as_table=False, as_list=False,
|
|||
if flags.print_messages and out.message:
|
||||
print(f"Message: {strip_html_tags(out.message)}")
|
||||
|
||||
if title:
|
||||
out.title = title
|
||||
out.title = title or _("Message", context="Default title of the message dialog")
|
||||
|
||||
if not indicator and raise_exception:
|
||||
indicator = 'red'
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ frappe.msgprint = function(msg, title, is_minimizable) {
|
|||
if(data.title || !msg_exists) {
|
||||
// set title only if it is explicitly given
|
||||
// and no existing title exists
|
||||
frappe.msg_dialog.set_title(data.title || __('Message'));
|
||||
frappe.msg_dialog.set_title(data.title || __('Message', null, 'Default title of the message dialog'));
|
||||
}
|
||||
|
||||
// show / hide indicator
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue