From 0bcabacd3adf413531073a450315ce831bbc7c5d Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 15 Feb 2025 20:15:54 +0200 Subject: [PATCH] feat(calendar_view): translate buttons --- src/public/app/widgets/view_widgets/calendar_view.ts | 8 ++++++++ src/public/translations/en/translation.json | 7 +++++++ src/public/translations/ro/translation.json | 10 +++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/view_widgets/calendar_view.ts b/src/public/app/widgets/view_widgets/calendar_view.ts index 75e812703..f2dbaa971 100644 --- a/src/public/app/widgets/view_widgets/calendar_view.ts +++ b/src/public/app/widgets/view_widgets/calendar_view.ts @@ -5,6 +5,7 @@ import type FNote from "../../entities/fnote.js"; import server from "../../services/server.js"; import ws from "../../services/ws.js"; import type { EventDragStopArg, EventResizeDoneArg } from "@fullcalendar/interaction"; +import { t } from "../../services/i18n.js"; const TPL = `
@@ -76,6 +77,13 @@ export default class CalendarView extends ViewMode { events: await CalendarView.#buildEvents(this.noteIds), editable, eventChange: (e) => this.#onEventMoved(e), + buttonText: { + today: t("calendar_view.today"), + month: t("calendar_view.month"), + week: t("calendar_view.week"), + day: t("calendar_view.day"), + list: t("calendar_view.list") + } }); calendar.render(); diff --git a/src/public/translations/en/translation.json b/src/public/translations/en/translation.json index 45eec36c5..e9ff9d146 100644 --- a/src/public/translations/en/translation.json +++ b/src/public/translations/en/translation.json @@ -1655,5 +1655,12 @@ "minutes": "Minutes", "hours": "Hours", "days": "Days" + }, + "calendar_view": { + "today": "today", + "month": "month", + "week": "week", + "day": "day", + "list": "list" } } diff --git a/src/public/translations/ro/translation.json b/src/public/translations/ro/translation.json index eabe682d1..ca35fe475 100644 --- a/src/public/translations/ro/translation.json +++ b/src/public/translations/ro/translation.json @@ -281,7 +281,8 @@ "grid": "Grilă", "invalid_view_type": "Mod de afișare incorect „{{type}}”", "list": "Listă", - "view_type": "Mod de afișare" + "view_type": "Mod de afișare", + "calendar": "Calendar" }, "bookmark_switch": { "bookmark": "Semn de carte", @@ -1657,5 +1658,12 @@ }, "help-button": { "title": "Deschide ghidul relevant" + }, + "calendar_view": { + "day": "zi", + "list": "listă", + "month": "lună", + "today": "azi", + "week": "săptămână" } }