feat(calendar_view): translate buttons

This commit is contained in:
Elian Doran 2025-02-15 20:15:54 +02:00
parent 03282e12b7
commit 0bcabacd3a
No known key found for this signature in database
3 changed files with 24 additions and 1 deletions

View File

@ -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 = `
<div class="calendar-view">
@ -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();

View File

@ -1655,5 +1655,12 @@
"minutes": "Minutes",
"hours": "Hours",
"days": "Days"
},
"calendar_view": {
"today": "today",
"month": "month",
"week": "week",
"day": "day",
"list": "list"
}
}

View File

@ -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ă"
}
}