diff options
author | David <thedaviddelta@gmail.com> | 2020-01-26 19:53:57 +0100 |
---|---|---|
committer | David <thedaviddelta@gmail.com> | 2020-01-26 19:53:57 +0100 |
commit | 6718e2eb234cd754ac0c3fe05a7193a708bf6d82 (patch) | |
tree | f5ab70798c9372a65c9c10a6f07a498627af0f01 /ui/src/i18next.ts | |
parent | a7f2b2927d7ce12b2077c8989fa33aebe5a9c0a4 (diff) |
TS func refactoring
Diffstat (limited to 'ui/src/i18next.ts')
-rw-r--r-- | ui/src/i18next.ts | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/ui/src/i18next.ts b/ui/src/i18next.ts index 2da3dfbe..a1fda907 100644 --- a/ui/src/i18next.ts +++ b/ui/src/i18next.ts @@ -27,10 +27,7 @@ const resources = { fi, }; -function format(value: any, format: any, lng: any) { - if (format === 'uppercase') return value.toUpperCase(); - return value; -} +const format = (value, format, lng) => format === 'uppercase' ? value.toUpperCase() : value; i18next.init({ debug: false, @@ -40,9 +37,7 @@ i18next.init({ lng: getLanguage(), fallbackLng: 'en', resources, - interpolation: { - format: format, - }, + interpolation: { format }, }); export { i18next as i18n, resources }; |