diff options
author | 2018-11-22 14:14:25 +0100 | |
---|---|---|
committer | 2018-11-22 14:14:25 +0100 | |
commit | 46b8c8c4b3a5b80e0187b284abc84566a7e784db (patch) | |
tree | 7fd378bcdd18e78c42dfeb61a15f89fd10106046 /src/I18n.js | |
parent | ADD features loading spinner (diff) | |
parent | feat(App): Add option to enable dark mode for supported services (diff) | |
download | ferdium-app-46b8c8c4b3a5b80e0187b284abc84566a7e784db.tar.gz ferdium-app-46b8c8c4b3a5b80e0187b284abc84566a7e784db.tar.zst ferdium-app-46b8c8c4b3a5b80e0187b284abc84566a7e784db.zip |
Merge branch 'develop' into feature/features-api
Diffstat (limited to 'src/I18n.js')
-rw-r--r-- | src/I18n.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/I18n.js b/src/I18n.js index ae3ba2fa9..e33141576 100644 --- a/src/I18n.js +++ b/src/I18n.js | |||
@@ -7,13 +7,19 @@ import { oneOrManyChildElements } from './prop-types'; | |||
7 | import translations from './i18n/translations'; | 7 | import translations from './i18n/translations'; |
8 | import UserStore from './stores/UserStore'; | 8 | import UserStore from './stores/UserStore'; |
9 | 9 | ||
10 | @inject('stores') @observer | 10 | export default @inject('stores') @observer class I18N extends Component { |
11 | export default class I18N extends Component { | 11 | componentDidUpdate() { |
12 | window.franz.menu.rebuild(); | ||
13 | } | ||
14 | |||
12 | render() { | 15 | render() { |
13 | const { stores, children } = this.props; | 16 | const { stores, children } = this.props; |
14 | const { locale } = stores.app; | 17 | const { locale } = stores.app; |
15 | return ( | 18 | return ( |
16 | <IntlProvider {...{ locale, key: locale, messages: translations[locale] }}> | 19 | <IntlProvider |
20 | {...{ locale, key: locale, messages: translations[locale] }} | ||
21 | ref={(intlProvider) => { window.franz.intl = intlProvider ? intlProvider.getChildContext().intl : null; }} | ||
22 | > | ||
17 | {children} | 23 | {children} |
18 | </IntlProvider> | 24 | </IntlProvider> |
19 | ); | 25 | ); |