From e48829c388121e9637ca9c60a3905d2cb17440de Mon Sep 17 00:00:00 2001 From: Dessalines Date: Thu, 15 Aug 2019 14:11:02 -0700 Subject: [PATCH] Adding moment translation, and to i18next.ts file. --- ui/src/components/moment-time.tsx | 1 + ui/src/i18next.ts | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/ui/src/components/moment-time.tsx b/ui/src/components/moment-time.tsx index ba1e90bbc..2179499fa 100644 --- a/ui/src/components/moment-time.tsx +++ b/ui/src/components/moment-time.tsx @@ -3,6 +3,7 @@ import * as moment from 'moment'; // import 'moment/locale/de'; import 'moment/locale/zh-cn'; import 'moment/locale/fr'; +import 'moment/locale/sv'; import { getLanguage } from '../utils'; import { i18n } from '../i18next'; diff --git a/ui/src/i18next.ts b/ui/src/i18next.ts index 756bab8b6..2bd5d5594 100644 --- a/ui/src/i18next.ts +++ b/ui/src/i18next.ts @@ -4,14 +4,16 @@ import { en } from './translations/en'; import { de } from './translations/de'; import { zh } from './translations/zh'; import { fr } from './translations/fr'; +import { sv } from './translations/sv'; // https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 // TODO don't forget to add moment locales for new languages. const resources = { - en: en, - de: de, - zh: zh, - fr, fr, + en, + de, + zh, + fr, + sv, } function format(value: any, format: any, lng: any) {