[tor-commits] [torbutton/master] Bug 31767: Avoid using intl.locale.requested pref directly

gk at torproject.org gk at torproject.org
Mon Oct 5 12:56:16 UTC 2020


commit 6a96c4839b23a46822978f26fccfa933b8cff737
Author: Alex Catarineu <acat at torproject.org>
Date:   Fri Sep 25 23:30:29 2020 +0200

    Bug 31767: Avoid using intl.locale.requested pref directly
---
 chrome/content/aboutTor/aboutTor-content.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/chrome/content/aboutTor/aboutTor-content.js b/chrome/content/aboutTor/aboutTor-content.js
index 7c46f0b0..2d1ae71f 100644
--- a/chrome/content/aboutTor/aboutTor-content.js
+++ b/chrome/content/aboutTor/aboutTor-content.js
@@ -57,7 +57,8 @@ var AboutTorListener = {
 
   onPageLoad: function() {
     // Arrange to update localized text and links.
-    bindPrefAndInit("intl.locale.requested", aNewVal => {
+    bindPrefAndInit("intl.locale.requested", () => {
+      const aNewVal = Services.locale.requestedLocale;
       if (aNewVal !== null) {
         this.onLocaleChange(aNewVal);
       }





More information about the tor-commits mailing list