浏览代码

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 年之前
父节点
当前提交
e923fbf2d1
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      .gitignore
  2. 1 1
      src/converse-core.js

+ 1 - 1
.gitignore

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

+ 1 - 1
src/converse-core.js

@@ -237,7 +237,7 @@
             moment.locale = moment.lang;
         }
         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
         // ---------------------