From d0a9cef72e81a68ad0603b83ed3ebeddce411240 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sat, 17 Aug 2019 13:32:59 -0700 Subject: [PATCH] Adding more settings for german. --- README.md | 2 +- ui/src/components/moment-time.tsx | 2 +- ui/src/utils.ts | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f66d3d18..d1067f57 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ Lemmy is free, open-source software, meaning no advertising, monetizing, or vent If you'd like to add translations, take a look a look at the [english translation file](ui/src/translations/en.ts). -- Languages supported: `en`, `zh`, `fr`, `sv` +- Languages supported: `en`, `zh`, `fr`, `sv`, `de` ## Credits diff --git a/ui/src/components/moment-time.tsx b/ui/src/components/moment-time.tsx index 83c97fb3..cadd4922 100644 --- a/ui/src/components/moment-time.tsx +++ b/ui/src/components/moment-time.tsx @@ -1,6 +1,6 @@ import { Component } from 'inferno'; import * as moment from 'moment'; -// import 'moment/locale/de'; +import 'moment/locale/de'; import 'moment/locale/zh-cn'; import 'moment/locale/fr'; import 'moment/locale/sv'; diff --git a/ui/src/utils.ts b/ui/src/utils.ts index c0a62114..27dcdca3 100644 --- a/ui/src/utils.ts +++ b/ui/src/utils.ts @@ -182,6 +182,8 @@ export function getMomentLanguage(): string { lang = 'sv'; } else if (lang.startsWith('fr')) { lang = 'fr'; + } else if (lang.startsWith('de')) { + lang = 'de'; } else { lang = 'en'; }