From b567a5589f04aedef572fcfc39cf710e7e4caa7e Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 11 Aug 2026 07:31:04 -0400 Subject: [PATCH] Bug 43260: Debug options in navigation bar untranslatable These patches update the templates which control the display of the debug menu item in the staff interface header. The strings need to be wrapped in the _() i18n function. The patch also corrects capitalization and uses the term "custom" instead of "user." A follow-up patch will move this JS into js_includes.inc so that the _() is available. This patch is separate to make it easier to view the diff. Testing requires the follow-up. Sponsored-by: Athens County Public Libraries Signed-off-by: David Nind Signed-off-by: Katrin Fischer Signed-off-by: Pedro Amorim --- .../intranet-tmpl/prog/en/includes/intranet-bottom.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc index ad8ee4aab4..bd7d9354c6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc @@ -220,7 +220,7 @@ const cssToggle = document.getElementById("toggleUserCSS"); if (cssToggle) { const cssText = cssToggle.querySelector(".toggle-text"); - if (cssText) cssText.textContent = cssDisabled ? "Enable User CSS" : "Disable User CSS"; + if (cssText) cssText.textContent = cssDisabled ? _("Enable custom CSS") : _("Disable custom CSS"); } // User JS button @@ -228,7 +228,7 @@ const jsToggle = document.getElementById("toggleUserJS"); if (jsToggle) { const jsText = jsToggle.querySelector(".toggle-text"); - if (jsText) jsText.textContent = jsDisabled ? "Enable User JS" : "Disable User JS"; + if (jsText) jsText.textContent = jsDisabled ? _("Enable custom JS") : _("Disable custom JS"); } // Stylesheets button @@ -240,7 +240,7 @@ const stylesheetsToggle = document.getElementById("toggleStylesheets"); if (stylesheetsToggle) { const stylesheetsText = stylesheetsToggle.querySelector(".toggle-text"); - if (stylesheetsText) stylesheetsText.textContent = stylesheetsDisabled ? "Enable Custom Stylesheets" : "Disable Custom Stylesheets"; + if (stylesheetsText) stylesheetsText.textContent = stylesheetsDisabled ? _("Enable custom stylesheets") : _("Disable custom stylesheets"); } // Update icon color based on whether any toggles are active