Browse Source

Bugfix in translation files. Make sure Jed is defined.

JC Brand 12 năm trước cách đây
mục cha
commit
45bd56753d

+ 0 - 1
build.js

@@ -8,7 +8,6 @@
         "en": "locale/en/LC_MESSAGES/en",
         "de": "locale/de/LC_MESSAGES/de",
         "es": "locale/es/LC_MESSAGES/es",
-        "hu": "locale/hu/LC_MESSAGES/hu",
         "it": "locale/it/LC_MESSAGES/it",
         "pt_BR": "locale/pt_BR/LC_MESSAGES/pt_BR", 
         "sjcl": "Libraries/sjcl",

+ 4 - 4
locale/af/LC_MESSAGES/af.js

@@ -1,5 +1,5 @@
 (function (root, factory) {
-    var af = new Jed({
+    var translations = {
         "domain": "converse",
         "locale_data": {
             "converse": {
@@ -450,16 +450,16 @@
                 ]
             }
         }
-    });
+    };
     if (typeof define === 'function' && define.amd) {
         define("af", ['jed'], function () {
-            return factory(af);
+            return factory(new Jed(translations));
         });
     } else {
         if (!window.locales) {
             window.locales = {};
         }
-        window.locales.af = af;
+        window.locales.af = factory(new Jed(translations));
     }
 }(this, function (af) { 
     return af; 

+ 4 - 4
locale/de/LC_MESSAGES/de.js

@@ -1,5 +1,5 @@
 (function (root, factory) {
-    var de = new Jed({
+    var translations = {
         "domain": "converse",
         "locale_data": {
             "converse": {
@@ -450,16 +450,16 @@
                 ]
             }
         }
-    });
+    };
     if (typeof define === 'function' && define.amd) {
         define("de", ['jed'], function () {
-            return factory(de);
+            return factory(new Jed(translations));
         });
     } else {
         if (!window.locales) {
             window.locales = {};
         }
-        window.locales.de = de;
+        window.locales.de = factory(new Jed(translations));
     }
 }(this, function (de) { 
     return de; 

+ 4 - 4
locale/en/LC_MESSAGES/en.js

@@ -1,5 +1,5 @@
 (function (root, factory) {
-    var en = new Jed({
+    var translations = {
         "domain": "converse",
         "locale_data": {
             "converse": {
@@ -10,16 +10,16 @@
                 }
             }
         }
-    });
+    };
     if (typeof define === 'function' && define.amd) {
         define("en", ['jed'], function () {
-            return factory(en);
+            return factory(new Jed(translations));
         });
     } else {
         if (!window.locales) {
             window.locales = {};
         }
-        window.locales.en = en;
+        window.locales.en = factory(new Jed(translations));
     }
 }(this, function (en) { 
     return en;

+ 4 - 4
locale/es/LC_MESSAGES/es.js

@@ -1,5 +1,5 @@
 (function (root, factory) {
-    var es = new Jed({
+    var translations = {
         "domain": "converse",
         "locale_data": {
             "converse": {
@@ -450,16 +450,16 @@
                 ]
             }
         }
-    });
+    };
     if (typeof define === 'function' && define.amd) {
         define("es", ['jed'], function () {
-            return factory(es);
+            return factory(new Jed(translations));
         });
     } else {
         if (!window.locales) {
             window.locales = {};
         }
-        window.locales.es = es;
+        window.locales.es = factory(new Jed(translations));
     }
 }(this, function (es) { 
     return es; 

+ 4 - 4
locale/it/LC_MESSAGES/it.js

@@ -1,5 +1,5 @@
 (function (root, factory) {
-    var it = new Jed({
+    var translations = {
         "domain": "converse",
         "locale_data": {
             "converse": {
@@ -461,16 +461,16 @@
                 ]
             }
         }
-    });
+    };
     if (typeof define === 'function' && define.amd) {
         define("it", ['jed'], function () {
-            return factory(it);
+            return factory(new Jed(translations));
         });
     } else {
         if (!window.locales) {
             window.locales = {};
         }
-        window.locales.it = it;
+        window.locales.it = factory(new Jed(translations));
     }
 }(this, function (it) { 
     return it; 

+ 1 - 4
locale/locales.js

@@ -13,7 +13,6 @@
             "en": "locale/en/LC_MESSAGES/en",
             "es": "locale/es/LC_MESSAGES/es",
             "de": "locale/de/LC_MESSAGES/de",
-            "hu": "locale/hu/LC_MESSAGES/hu",
             "it": "locale/it/LC_MESSAGES/it",
             "pt_BR": "locale/pt_BR/LC_MESSAGES/pt_BR"
         }
@@ -25,16 +24,14 @@
         'en',
         'es',
         'de',
-        'hu',
         "it",
         "pt_BR"
-        ], function (jed, af, en, es, de, hu, it, pt_BR) {
+        ], function (jed, af, en, es, de, it, pt_BR) {
             root.locales = {};
             root.locales.af = af;
             root.locales.en = en;
             root.locales.es = es;
             root.locales.de = de;
-            root.locales.hu = hu;
             root.locales.it = it;
             root.locales.pt_BR = pt_BR;
         });

+ 4 - 4
locale/pt_BR/LC_MESSAGES/pt_BR.js

@@ -1,5 +1,5 @@
 (function (root, factory) {
-    var pt_BR = new Jed({
+    var translations = {
         "domain": "converse",
         "locale_data": {
             "converse": {
@@ -461,16 +461,16 @@
                 ]
             }
         }
-    });
+    };
     if (typeof define === 'function' && define.amd) {
         define("pt_BR", ['jed'], function () {
-            return factory(pt_BR);
+            return factory(new Jed(translations));
         });
     } else {
         if (!window.locales) {
             window.locales = {};
         }
-        window.locales.pt_BR = pt_BR;
+        window.locales.pt_BR = factory(new Jed(translations));
     }
   }(this, function (i18n) {
       return i18n;