aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/i18n-provider.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/i18n-provider.js')
-rw-r--r--ui/app/i18n-provider.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/app/i18n-provider.js b/ui/app/i18n-provider.js
index d46911f7c..936b185f7 100644
--- a/ui/app/i18n-provider.js
+++ b/ui/app/i18n-provider.js
@@ -13,6 +13,9 @@ class I18nProvider extends Component {
t (key, ...args) {
return t(current, key, ...args) || t(en, key, ...args) || `[${key}]`
},
+ tOrDefault (key, ...args) {
+ return t(current, key, ...args) || t(en, key, ...args) || key
+ },
}
}
@@ -28,6 +31,7 @@ I18nProvider.propTypes = {
I18nProvider.childContextTypes = {
t: PropTypes.func,
+ tOrDefault: PropTypes.func,
}
const mapStateToProps = state => {