From 884a1c644b84cb281a36c7bfaac2ecf565cf7eb1 Mon Sep 17 00:00:00 2001
From: Dessalines <happydooby@gmail.com>
Date: Sat, 17 Aug 2019 10:22:38 -0700
Subject: Fix moment locale issue.

- Fixes #206
---
 ui/src/components/moment-time.tsx | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

(limited to 'ui/src/components/moment-time.tsx')

diff --git a/ui/src/components/moment-time.tsx b/ui/src/components/moment-time.tsx
index 2179499f..83c97fb3 100644
--- a/ui/src/components/moment-time.tsx
+++ b/ui/src/components/moment-time.tsx
@@ -4,7 +4,7 @@ import * as moment from 'moment';
 import 'moment/locale/zh-cn';
 import 'moment/locale/fr';
 import 'moment/locale/sv';
-import { getLanguage } from '../utils';
+import { getMomentLanguage } from '../utils';
 import { i18n } from '../i18next';
 
 interface MomentTimeProps {
@@ -20,11 +20,7 @@ export class MomentTime extends Component<MomentTimeProps, any> {
   constructor(props: any, context: any) {
     super(props, context);
 
-    // Moment doesnt have zh, only zh-cn
-    let lang = getLanguage();
-    if (lang == 'zh') {
-      lang = 'zh-cn';
-    }
+    let lang = getMomentLanguage();
 
     moment.locale(lang);
   }
-- 
cgit v1.2.3

