Added relative days translations
This commit is contained in:
@@ -59,7 +59,11 @@ export default defineI18nConfig(() => ({
|
|||||||
date: {
|
date: {
|
||||||
start: "Start date",
|
start: "Start date",
|
||||||
end: "End date",
|
end: "End date",
|
||||||
|
afterTomorrow: "In 2 days",
|
||||||
|
tomorrow: "Tomorrow",
|
||||||
today: "Today",
|
today: "Today",
|
||||||
|
yesterday: "Yesterday",
|
||||||
|
beforeYesterday: "2 days ago",
|
||||||
fromTo: "From {startDate} to {endDate}",
|
fromTo: "From {startDate} to {endDate}",
|
||||||
while: "During {duration}",
|
while: "During {duration}",
|
||||||
},
|
},
|
||||||
@@ -199,7 +203,11 @@ export default defineI18nConfig(() => ({
|
|||||||
date: {
|
date: {
|
||||||
start: "Date de début",
|
start: "Date de début",
|
||||||
end: "Date de fin",
|
end: "Date de fin",
|
||||||
|
afterTomorrow: "Après-demain",
|
||||||
|
tomorrow: "Demain",
|
||||||
today: "Aujourd'hui",
|
today: "Aujourd'hui",
|
||||||
|
yesterday: "Hier",
|
||||||
|
beforeYesterday: "Avant-hier",
|
||||||
fromTo: "Du {startDate} au {endDate}",
|
fromTo: "Du {startDate} au {endDate}",
|
||||||
while: "Pendant {duration}",
|
while: "Pendant {duration}",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -495,19 +495,19 @@ export const useCalendar = defineStore("calendar", () => {
|
|||||||
if (formatting === "complex") {
|
if (formatting === "complex") {
|
||||||
// Handle if it's the same date
|
// Handle if it's the same date
|
||||||
if (direction === "present") {
|
if (direction === "present") {
|
||||||
return "Aujourd'hui"
|
return t("entity.calendar.date.today")
|
||||||
}
|
}
|
||||||
if (differenceInDays === -2) {
|
if (differenceInDays === -2) {
|
||||||
return "Avant-hier"
|
return t("entity.calendar.date.beforeYesterday")
|
||||||
}
|
}
|
||||||
if (differenceInDays === -1) {
|
if (differenceInDays === -1) {
|
||||||
return "Hier"
|
return t("entity.calendar.date.yesterday")
|
||||||
}
|
}
|
||||||
if (differenceInDays === 1) {
|
if (differenceInDays === 1) {
|
||||||
return "Demain"
|
return t("entity.calendar.date.tomorrow")
|
||||||
}
|
}
|
||||||
if (differenceInDays === 2) {
|
if (differenceInDays === 2) {
|
||||||
return "Après-demain"
|
return t("entity.calendar.date.afterTomorrow")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get relevant prefix for the string
|
// Get relevant prefix for the string
|
||||||
|
|||||||
Reference in New Issue
Block a user