From e2c7afd33393a3069f35a670cd27e99ab0938fc5 Mon Sep 17 00:00:00 2001 From: Suraj Shetty Date: Mon, 13 Jan 2020 09:09:22 +0530 Subject: [PATCH] fix: Make strings translatable --- frappe/public/js/frappe/form/form.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/frappe/public/js/frappe/form/form.js b/frappe/public/js/frappe/form/form.js index c3f5c23ae2..b55c822ba6 100644 --- a/frappe/public/js/frappe/form/form.js +++ b/frappe/public/js/frappe/form/form.js @@ -681,16 +681,18 @@ frappe.ui.form.Form = class FrappeForm { .filter((link) => link.doctype == doctype) .map((link) => frappe.utils.get_form_link(link.doctype, link.name, true)) .join(", "); - links_text += `
  • ${doctype}: ${docnames}
  • ` + links_text += `
  • ${doctype}: ${docnames}
  • `; } - links_text = "" + links_text = ``; + + let confirm_message = __('{0} {1} is linked with the following submitted documents: {2}', + [(me.doc.doctype).bold(), me.doc.name, links_text]); - let confirm_message = `${me.doc.doctype} ${me.doc.name} is linked with the following submitted documents: ${links_text}` let can_cancel = links.every((link) => frappe.model.can_cancel(link.doctype)); if (can_cancel) { - confirm_message += `Do you want to cancel all linked documents?`; + confirm_message += __('Do you want to cancel all linked documents?'); } else { - confirm_message += `You do not have permissions to cancel all linked documents.`; + confirm_message += __('You do not have permissions to cancel all linked documents.'); } // generate dialog box to cancel all linked docs