From 94489b544ad4a68ddd961f8b549aaac8507266e6 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Mon, 9 Jul 2018 17:37:06 -0230 Subject: Fallback to English and then the key for I18nProvider#t --- ui/app/i18n-provider.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ui/app/i18n-provider.js') diff --git a/ui/app/i18n-provider.js b/ui/app/i18n-provider.js index 2856e0ed6..d46911f7c 100644 --- a/ui/app/i18n-provider.js +++ b/ui/app/i18n-provider.js @@ -8,8 +8,11 @@ const t = require('../i18n-helper').getMessage class I18nProvider extends Component { getChildContext () { const { localeMessages } = this.props + const { current, en } = localeMessages return { - t: t.bind(null, localeMessages), + t (key, ...args) { + return t(current, key, ...args) || t(en, key, ...args) || `[${key}]` + }, } } -- cgit