[tbb-commits] [tor-launcher/master] Bug 34206: Tor Launcher button labels are missing (Firefox 76)
gk at torproject.org
gk at torproject.org
Wed Jun 10 18:57:54 UTC 2020
commit ee6c43379b23aca1efe581d9cb12642167e6a326
Author: Kathy Brade <brade at pearlcrescent.com>
Date: Wed May 13 10:30:15 2020 -0400
Bug 34206: Tor Launcher button labels are missing (Firefox 76)
Mozilla's wizard has a bug where localized labels are not loaded because
Fluent is not initialized early enough. Apply the same workaround as
Mozilla applied in https://bugzilla.mozilla.org/show_bug.cgi?id=1625938
---
src/chrome/content/localePicker.xhtml | 6 ++++++
src/chrome/content/network-settings-wizard.xhtml | 5 +++++
src/chrome/content/network-settings.js | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/chrome/content/localePicker.xhtml b/src/chrome/content/localePicker.xhtml
index 38762a0..e31f1b2 100644
--- a/src/chrome/content/localePicker.xhtml
+++ b/src/chrome/content/localePicker.xhtml
@@ -12,12 +12,18 @@
<!DOCTYPE window SYSTEM "chrome://torlauncher/locale/network-settings.dtd">
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
+ xmlns:html="http://www.w3.org/1999/xhtml"
torwizard="true"
title="&torlauncher.localePicker.title;"
windowtype="TorLauncher:LocalePicker"
persist="screenX screenY"
onload="initLocaleDialog();">
+<!-- Work around a fluent bug in the wizard code (see Mozilla bug 1625938) -->
+<linkset>
+ <html:link rel="localization" href="toolkit/global/wizard.ftl"/>
+</linkset>
+
<wizard id="TorLauncherLocalePicker">
<script type="application/x-javascript"
src="chrome://torlauncher/content/network-settings.js"/>
diff --git a/src/chrome/content/network-settings-wizard.xhtml b/src/chrome/content/network-settings-wizard.xhtml
index 7386067..6e26468 100644
--- a/src/chrome/content/network-settings-wizard.xhtml
+++ b/src/chrome/content/network-settings-wizard.xhtml
@@ -18,6 +18,11 @@
onload="initDialog();"
onunload="deinitDialog();">
+<!-- Work around a fluent bug in the wizard code (see Mozilla bug 1625938) -->
+<linkset>
+ <html:link rel="localization" href="toolkit/global/wizard.ftl"/>
+</linkset>
+
<wizard id="TorNetworkSettings"
defaulttitle="&torsettings.wizard.title.default;"
buttonlabelextra2="&torsettings.copyLog;">
diff --git a/src/chrome/content/network-settings.js b/src/chrome/content/network-settings.js
index 2f89632..81d7138 100644
--- a/src/chrome/content/network-settings.js
+++ b/src/chrome/content/network-settings.js
@@ -2583,7 +2583,7 @@ function getElemValue(aID, aDefaultValue)
function getButton(aButtonName)
{
- let dialogOrWizard = document.documentElement.firstChild;
+ let dialogOrWizard = document.querySelector("wizard");
return dialogOrWizard.getButton(aButtonName);
}
More information about the tbb-commits
mailing list