소스 검색

Fixes #3364 Translations not active

JC Brand 1 년 전
부모
커밋
fbda510604
1개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 3 3
      src/i18n/index.js

+ 3 - 3
src/i18n/index.js

@@ -5,7 +5,7 @@
  * @description This is the internationalization module
  */
 import Jed from 'jed';
-import { api, converse, log, u } from '@converse/headless';
+import { api, converse, log, u, i18n as i18nStub } from '@converse/headless';
 
 const { dayjs } = converse.env;
 
@@ -89,7 +89,7 @@ async function fetchTranslations () {
 /**
  * @namespace i18n
  */
-const i18n = {
+const i18n = Object.assign(i18nStub, {
     getLocale() {
         return locale;
     },
@@ -131,7 +131,7 @@ const i18n = {
     __(str, ...args) {
         return i18n.translate(str, args);
     },
-};
+});
 
 export { i18n };
 export const __ = i18n.__;