Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
@@ -818,11 +818,21 @@ function makeRecurrenceString(
|
|||||||
];
|
];
|
||||||
|
|
||||||
const recurType: Record<string, string> = {
|
const recurType: Record<string, string> = {
|
||||||
daily: t("eventPreview.days"),
|
daily: t("event.repeat.frequency.days"),
|
||||||
monthly: t("eventPreview.months"),
|
weekly: t("event.repeat.frequency.weeks"),
|
||||||
yearly: t("eventPreview.years"),
|
monthly: t("event.repeat.frequency.months"),
|
||||||
|
yearly: t("event.repeat.frequency.years"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (event.repetition.interval && event.repetition.interval > 1) {
|
||||||
|
recur.push(
|
||||||
|
t("eventPreview.everyInterval", {
|
||||||
|
interval: event.repetition.interval,
|
||||||
|
unit: recurType[event.repetition.freq] ?? event.repetition.freq,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if (event.repetition.byday) {
|
if (event.repetition.byday) {
|
||||||
recur.push(
|
recur.push(
|
||||||
t("eventPreview.recurrenceOnDays", {
|
t("eventPreview.recurrenceOnDays", {
|
||||||
@@ -832,14 +842,7 @@ function makeRecurrenceString(
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (event.repetition.interval && event.repetition.interval > 1) {
|
|
||||||
recur.push(
|
|
||||||
t("eventPreview.everyInterval", {
|
|
||||||
interval: event.repetition.interval,
|
|
||||||
unit: recurType[event.repetition.freq],
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if (event.repetition.occurrences) {
|
if (event.repetition.occurrences) {
|
||||||
recur.push(
|
recur.push(
|
||||||
t("eventPreview.forOccurrences", {
|
t("eventPreview.forOccurrences", {
|
||||||
|
|||||||
Reference in New Issue
Block a user