✨ 🌐 Add Localization feature
This commit is contained in:
@ -6,10 +6,19 @@ import {
|
||||
fetchHistory,
|
||||
loading,
|
||||
} from "../store";
|
||||
import { dayNames } from "../definitions";
|
||||
import dayjs from "dayjs";
|
||||
import ArrowIcon from "./icons/arrow-icon.vue";
|
||||
|
||||
const dayNames = [
|
||||
"days.sunday",
|
||||
"days.monday",
|
||||
"days.tuesday",
|
||||
"days.wednesday",
|
||||
"days.thursday",
|
||||
"days.friday",
|
||||
"days.saturday",
|
||||
];
|
||||
|
||||
function nextDay() {
|
||||
var newDate = dayjs(selectedDate.value).add(1, "day");
|
||||
// Skip weekend
|
||||
@ -35,7 +44,7 @@ async function changeDate(newDate) {
|
||||
<div class="selector">
|
||||
<ArrowIcon @click="previousDay" />
|
||||
<span class="day" @click="changeDate(dayjs())">
|
||||
{{ dayNames[selectedDay + 1] }},
|
||||
{{ $t(dayNames[selectedDay + 1]) }},
|
||||
{{ dayjs(selectedDate).format("DD.MM.YYYY") }}
|
||||
</span>
|
||||
<ArrowIcon style="transform: rotate(180deg)" @click="nextDay" />
|
||||
|
Reference in New Issue
Block a user