[#499] changed russian translations and changed way standalone months are handled (#506)

This commit is contained in:
Camille Moussu
2026-02-05 11:05:02 +01:00
committed by GitHub
parent 2d8196fc8e
commit c1f50b8719
5 changed files with 79 additions and 21 deletions
+5 -11
View File
@@ -25,19 +25,11 @@ import ChevronRightIcon from "@mui/icons-material/ChevronRight";
import LogoutIcon from "@mui/icons-material/Logout";
import RefreshIcon from "@mui/icons-material/Refresh";
import SettingsIcon from "@mui/icons-material/Settings";
import { format } from "date-fns";
import {
enGB,
fr as frLocale,
ru as ruLocale,
vi as viLocale,
} from "date-fns/locale";
import React, { useEffect, useState } from "react";
import { push } from "redux-first-history";
import { useI18n } from "twake-i18n";
import SearchBar from "./EventSearchBar";
import "./Menubar.styl";
const dateLocales = { en: enGB, fr: frLocale, ru: ruLocale, vi: viLocale };
export type AppIconProps = {
name: string;
@@ -151,9 +143,11 @@ export function Menubar({
handleUserMenuClose();
};
const dateLabel = format(currentDate, "MMMM yyyy", {
locale: dateLocales[lang as keyof typeof dateLocales] || enGB,
});
// Use i18n for month names instead of date-fns
const monthIndex = currentDate.getMonth();
const year = currentDate.getFullYear();
const monthName = t(`months.standalone.${monthIndex}`);
const dateLabel = `${monthName} ${year}`;
return (
<>