Merge pull request #5913 from christianbeeznest/ofaj-22151-4

Calendar: Simplify reminder message formatting - refs BT#22151
pull/5914/head
christianbeeznest 2 weeks ago committed by GitHub
commit 2ab0069776
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 13
      assets/vue/composables/calendar/calendarReminders.js

@ -14,15 +14,16 @@ export function useCalendarReminders() {
* @returns {string}
*/
function decodeDateInterval(reminder) {
let unit;
if (reminder.period === "i") {
return t("%d minutes before", [reminder.count])
unit = t("minutes before");
} else if (reminder.period === "h") {
unit = t("hours before");
} else {
unit = t("days before");
}
if (reminder.period === "h") {
return t("%d hours before", [reminder.count])
}
return t("%d days before", [reminder.count])
return `${reminder.count} ${unit}`;
}
return {

Loading…
Cancel
Save