]> Untitled Git - lemmy-ui.git/commitdiff
Merge branch 'feature/i18n-type-constraint' of https://github.com/shilangyu/lemmy...
authorDessalines <tyhou13@gmx.com>
Mon, 1 Mar 2021 21:24:17 +0000 (16:24 -0500)
committerDessalines <tyhou13@gmx.com>
Mon, 1 Mar 2021 21:24:17 +0000 (16:24 -0500)
1  2 
src/shared/i18next.ts

diff --combined src/shared/i18next.ts
index 8f3000557d578543850bb866f23800454722968b,3d3d5a1fc2dcc94ea8764b341c2cf92b04196e12..99dbc70b6c72e4ea6d17fe6b036bef91a500cfe1
@@@ -1,4 -1,4 +1,4 @@@
- import i18next from "i18next";
+ import i18next, { i18nTyped } from "i18next";
  import { getLanguage } from "./utils";
  import { en } from "./translations/en";
  import { el } from "./translations/el";
@@@ -31,7 -31,6 +31,7 @@@ import { sr_Latn } from "./translations
  import { da } from "./translations/da";
  import { oc } from "./translations/oc";
  import { hr } from "./translations/hr";
 +import { th } from "./translations/th";
  
  // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66
  const resources = {
@@@ -66,7 -65,6 +66,7 @@@
    da,
    oc,
    hr,
 +  th,
  };
  
  function format(value: any, format: any): any {
@@@ -84,4 -82,6 +84,6 @@@ i18next.init(
    interpolation: { format },
  });
  
- export { i18next as i18n, resources };
+ export const i18n = i18next as i18nTyped;
+ export { resources };