[tor-commits] [torbutton/master] Bug 40003: Adapt code for L10nRegistry API changes

gk at torproject.org gk at torproject.org
Thu Aug 6 13:56:05 UTC 2020


commit 4b683ed09b05ba88ff6b6be121c7756605d1c2d8
Author: Alex Catarineu <acat at torproject.org>
Date:   Thu Jul 30 20:56:54 2020 +0200

    Bug 40003: Adapt code for L10nRegistry API changes
    
    Caused by https://bugzilla.mozilla.org/show_bug.cgi?id=1648631.
---
 components/startup-observer.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/components/startup-observer.js b/components/startup-observer.js
index d2d1d610..4e9394ba 100644
--- a/components/startup-observer.js
+++ b/components/startup-observer.js
@@ -97,7 +97,11 @@ function StartupObserver() {
       "resource://torbutton/locale/{locale}/",
       true, // skip this FileSource locales when computing Services.locale.availableLocales
     );
-    L10nRegistry.registerSource(torSource);
+    if (L10nRegistry.registerSources) {
+      L10nRegistry.registerSources([torSource]);
+    } else {
+      L10nRegistry.registerSource(torSource);
+    }
 }
 
 StartupObserver.prototype = {



More information about the tor-commits mailing list