From 9ebe4b60caab24b536eb67903dee8b8bb610c1d8 Mon Sep 17 00:00:00 2001 From: Jindrich Susen Date: Wed, 16 Aug 2023 15:14:19 +0200 Subject: [PATCH 1/2] Date editor was not respecting the locale set on login page --- frontend-html/src/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend-html/src/index.tsx b/frontend-html/src/index.tsx index 7afb8403bf..509625192c 100644 --- a/frontend-html/src/index.tsx +++ b/frontend-html/src/index.tsx @@ -33,7 +33,13 @@ import Cookie from "js-cookie"; import { translationsInit } from "./utils/translation"; import { getLocaleFromCookie, initLocaleCookie } from "utils/cookies"; import moment from "moment"; -import "moment/min/locales"; +import 'moment/dist/locale/de'; +import 'moment/dist/locale/de-at'; +import 'moment/dist/locale/de-ch'; +import 'moment/dist/locale/fr.js'; +import 'moment/dist/locale/fr-ch.js'; +import 'moment/dist/locale/fr-ca.js'; +import 'moment/dist/locale/cs'; import { preventDoubleclickSelect } from "utils/mouse"; import { RootError } from "RootError"; // eslint-disable-next-line @typescript-eslint/no-unused-vars From aebc29ddf1ad4236031e08828315fbc7a5caf308 Mon Sep 17 00:00:00 2001 From: Jindrich Susen Date: Wed, 16 Aug 2023 16:14:59 +0200 Subject: [PATCH 2/2] Date editor was not showing czech month names in the first case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit for example "června" instead of "červen" --- .../Editors/DateTimeEditor/CalendarWidget.tsx | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/frontend-html/src/gui/Components/ScreenElements/Editors/DateTimeEditor/CalendarWidget.tsx b/frontend-html/src/gui/Components/ScreenElements/Editors/DateTimeEditor/CalendarWidget.tsx index 45668b331f..c8cbfee284 100644 --- a/frontend-html/src/gui/Components/ScreenElements/Editors/DateTimeEditor/CalendarWidget.tsx +++ b/frontend-html/src/gui/Components/ScreenElements/Editors/DateTimeEditor/CalendarWidget.tsx @@ -129,9 +129,9 @@ export class CalendarWidget extends React.Component<{
- {this.displayedMonth.format("YYYY MMMM")} + {formatYearAndMonth(this.displayedMonth)}