瀏覽代碼

Bugfix. Translate method called before it was defined.

JC Brand 10 年之前
父節點
當前提交
35a542da83
共有 1 個文件被更改,包括 6 次插入7 次删除
  1. 6 7
      converse.js

+ 6 - 7
converse.js

@@ -164,9 +164,7 @@
 
         // Logging
         Strophe.log = function (level, msg) { console.log(level+' '+msg); };
-        Strophe.error = function (msg) {
-            console.log('ERROR: '+msg);
-        };
+        Strophe.error = function (msg) { console.log('ERROR: '+msg); };
 
         // Add Strophe Namespaces
         Strophe.addNamespace('REGISTER', 'jabber:iq:register');
@@ -216,6 +214,11 @@
         var OPENED = 'opened';
         var CLOSED = 'closed';
 
+        // Translation machinery
+        // ---------------------
+        var __ = $.proxy(utils.__, this);
+        var ___ = utils.___;
+
         // Default configuration values
         // ----------------------------
         var default_settings = {
@@ -286,10 +289,6 @@
         // Only use OTR by default if allow OTR is enabled to begin with
         this.use_otr_by_default = this.use_otr_by_default && this.allow_otr;
 
-        // Translation machinery
-        // ---------------------
-        var __ = $.proxy(utils.__, this);
-        var ___ = utils.___;
         // Translation aware constants
         // ---------------------------
         var OTR_CLASS_MAPPING = {};