Browse Source

Set i18n to empty obj in cases where there's no locales

This lets variable interpolation still work (if Jed is loaded)
JC Brand 9 years ago
parent
commit
e923fbf2d1
2 changed files with 2 additions and 2 deletions
  1. 1 1
      .gitignore
  2. 1 1
      src/converse-core.js

+ 1 - 1
.gitignore

@@ -1,7 +1,7 @@
 *~
 *~
 *.mo
 *.mo
 *.kpf
 *.kpf
-*.swp
+.*.sw?
 .*.cfg
 .*.cfg
 .hg/
 .hg/
 .bzr/
 .bzr/

+ 1 - 1
src/converse-core.js

@@ -237,7 +237,7 @@
             moment.locale = moment.lang;
             moment.locale = moment.lang;
         }
         }
         moment.locale(this.detectLocale(this.isMomentLocale));
         moment.locale(this.detectLocale(this.isMomentLocale));
-        this.i18n = settings.i18n ? settings.i18n : locales[this.detectLocale(this.isConverseLocale)];
+        this.i18n = settings.i18n ? settings.i18n : locales[this.detectLocale(this.isConverseLocale)] || {};
 
 
         // Translation machinery
         // Translation machinery
         // ---------------------
         // ---------------------