diff options
author | Dessalines <tyhou13@gmx.com> | 2019-08-29 11:20:21 -0700 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2019-08-29 11:20:21 -0700 |
commit | e196ccd47f9149f053199e8e87a7a454f87a0942 (patch) | |
tree | 8f4b5756a54f1a3cd957d28a2f10913229fce3ed /ui | |
parent | 14ae99000db3df67170f77f0ab27d3f0dc785952 (diff) |
Some additions for Dutch.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/src/i18next.ts | 4 | ||||
-rw-r--r-- | ui/src/utils.ts | 3 | ||||
-rw-r--r-- | ui/translation_report.ts | 4 |
3 files changed, 9 insertions, 2 deletions
diff --git a/ui/src/i18next.ts b/ui/src/i18next.ts index ba81b8d4..069c820d 100644 --- a/ui/src/i18next.ts +++ b/ui/src/i18next.ts @@ -4,10 +4,11 @@ import { en } from './translations/en'; import { eo } from './translations/eo'; import { es } from './translations/es'; import { de } from './translations/de'; -import { zh } from './translations/zh'; import { fr } from './translations/fr'; import { sv } from './translations/sv'; import { ru } from './translations/ru'; +import { zh } from './translations/zh'; +import { nl } from './translations/nl'; // 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. @@ -20,6 +21,7 @@ const resources = { fr, sv, ru, + nl, } function format(value: any, format: any, lng: any) { diff --git a/ui/src/utils.ts b/ui/src/utils.ts index c7de7a51..d69bf421 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -5,6 +5,7 @@ import 'moment/locale/zh-cn'; import 'moment/locale/fr'; import 'moment/locale/sv'; import 'moment/locale/ru'; +import 'moment/locale/nl'; import { UserOperation, Comment, User, SortType, ListingType } from './interfaces'; import * as markdown_it from 'markdown-it'; @@ -198,6 +199,8 @@ export function getMomentLanguage(): string { lang = 'es'; } else if (lang.startsWith('eo')) { lang = 'eo'; + } else if (lang.startsWith('nl')) { + lang = 'nl'; } else { lang = 'en'; } diff --git a/ui/translation_report.ts b/ui/translation_report.ts index 93579a37..8e579f27 100644 --- a/ui/translation_report.ts +++ b/ui/translation_report.ts @@ -6,12 +6,14 @@ import { zh } from './src/translations/zh'; import { fr } from './src/translations/fr'; import { sv } from './src/translations/sv'; import { ru } from './src/translations/ru'; +import { nl } from './src/translations/nl'; let files = [ {t: de, n: 'de'}, - {t: es, n: 'es'}, {t: eo, n: 'eo'}, + {t: es, n: 'es'}, {t: fr, n: 'fr'}, + {t: nl, n: 'nl'}, {t: ru, n: 'ru'}, {t: sv, n: 'sv'}, {t: zh, n: 'zh'}, |