From: Dessalines Date: Thu, 15 Aug 2019 21:11:02 +0000 (-0700) Subject: Adding moment translation, and to i18next.ts file. X-Git-Url: http://these/git/%7B%60/feeds/u/static/gitweb.js?a=commitdiff_plain;h=e48829c388121e9637ca9c60a3905d2cb17440de;p=lemmy.git Adding moment translation, and to i18next.ts file. --- diff --git a/ui/src/components/moment-time.tsx b/ui/src/components/moment-time.tsx index ba1e90bb..2179499f 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 756bab8b..2bd5d559 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) {