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 <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
3d41c25c08
commit
b567a5589f
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue