Adding moment translation, and to i18next.ts file.

This commit is contained in:
Dessalines 2019-08-15 14:11:02 -07:00
parent fd282df730
commit e48829c388
2 changed files with 7 additions and 4 deletions

View file

@ -3,6 +3,7 @@ import * as moment from 'moment';
// import 'moment/locale/de'; // import 'moment/locale/de';
import 'moment/locale/zh-cn'; import 'moment/locale/zh-cn';
import 'moment/locale/fr'; import 'moment/locale/fr';
import 'moment/locale/sv';
import { getLanguage } from '../utils'; import { getLanguage } from '../utils';
import { i18n } from '../i18next'; import { i18n } from '../i18next';

View file

@ -4,14 +4,16 @@ import { en } from './translations/en';
import { de } from './translations/de'; import { de } from './translations/de';
import { zh } from './translations/zh'; import { zh } from './translations/zh';
import { fr } from './translations/fr'; import { fr } from './translations/fr';
import { sv } from './translations/sv';
// https://github.com/nimbusec-oss/inferno-i18next/blob/master/tests/T.test.js#L66 // 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. // TODO don't forget to add moment locales for new languages.
const resources = { const resources = {
en: en, en,
de: de, de,
zh: zh, zh,
fr, fr, fr,
sv,
} }
function format(value: any, format: any, lng: any) { function format(value: any, format: any, lng: any) {