aboutsummaryrefslogtreecommitdiffstats
path: root/src/I18n.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/I18n.tsx')
-rw-r--r--src/I18n.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/I18n.tsx b/src/I18n.tsx
index 0e63d1086..bf4b08cd1 100644
--- a/src/I18n.tsx
+++ b/src/I18n.tsx
@@ -10,7 +10,7 @@ const translations = generatedTranslations();
10 10
11type Props = { 11type Props = {
12 stores: { 12 stores: {
13 app: typeof AppStore; 13 app: AppStore;
14 user: typeof UserStore; 14 user: typeof UserStore;
15 }; 15 };
16 children: ReactNode; 16 children: ReactNode;
@@ -21,14 +21,16 @@ class I18N extends Component<Props> {
21 window['ferdium'].menu.rebuild(); 21 window['ferdium'].menu.rebuild();
22 } 22 }
23 23
24 render() { 24 render(): ReactNode {
25 const { stores, children } = this.props; 25 const { stores, children } = this.props;
26 const { locale } = stores.app; 26 const { locale } = stores.app;
27 return ( 27 return (
28 <IntlProvider 28 <IntlProvider
29 {...{ locale, key: locale, messages: translations[locale] }} 29 {...{ locale, key: locale, messages: translations[locale] }}
30 ref={intlProvider => { 30 ref={intlProvider => {
31 window['ferdium'].intl = intlProvider ? intlProvider.state.intl : null; 31 window['ferdium'].intl = intlProvider
32 ? intlProvider.state.intl
33 : null;
32 }} 34 }}
33 > 35 >
34 {children} 36 {children}