[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 4b683ed09b05ba88ff6b6be121c7756605d1c2d8
Author: Alex Catarineu <acat@xxxxxxxxxxxxxx>
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 = {

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits