From 8dfa972a8b31339aec64206f0bc59e668a032972 Mon Sep 17 00:00:00 2001 From: marination Date: Mon, 22 Jan 2024 16:15:38 +0100 Subject: [PATCH] fix: Translate Letterhead information string (cherry picked from commit 62fa5bc8af2107d7661d588ba884fac2c7694b4b) --- frappe/printing/doctype/letter_head/letter_head.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/frappe/printing/doctype/letter_head/letter_head.js b/frappe/printing/doctype/letter_head/letter_head.js index a1ef08bce9c..7055b5f78af 100644 --- a/frappe/printing/doctype/letter_head/letter_head.js +++ b/frappe/printing/doctype/letter_head/letter_head.js @@ -27,22 +27,24 @@ frappe.ui.form.on("Letter Head", { }, }); -const INSTRUCTIONS = `

Letter Head Scripts

-

Header/Footer scripts can be used to add dynamic behaviours.

+const INSTRUCTIONS = `

${__("Letter Head Scripts")}

+

${__("Header/Footer scripts can be used to add dynamic behaviours.")}

 
-// The following Header Script will add the current date to an element in 'Header HTML' with class "header-content"
+// ${__(
+	"The following Header Script will add the current date to an element in 'Header HTML' with class 'header-content'"
+)}
 var el = document.getElementsByClassName("header-content");
 if (el.length > 0) {
 	el[0].textContent += " " + new Date().toGMTString();
 }
 
 
-

You can also access wkhtmltopdf variables (valid only in PDF print):

+

${__("You can also access wkhtmltopdf variables (valid only in PDF print):")}

 
-// Get Header and Footer wkhtmltopdf variables
-// Snippet and more variables: https://wkhtmltopdf.org/usage/wkhtmltopdf.txt
+// ${__("Get Header and Footer wkhtmltopdf variables")}
+// ${__("Snippet and more variables:  {0}", ["https://wkhtmltopdf.org/usage/wkhtmltopdf.txt"])}
 var vars = {};
 var query_strings_from_url = document.location.search.substring(1).split('&');
 for (var query_string in query_strings_from_url) {