diff --git a/src/panels/calendar/ha-recurrence-rule-editor.ts b/src/panels/calendar/ha-recurrence-rule-editor.ts index d2965e0284..5d8af6c2a9 100644 --- a/src/panels/calendar/ha-recurrence-rule-editor.ts +++ b/src/panels/calendar/ha-recurrence-rule-editor.ts @@ -6,6 +6,7 @@ import type { Options, WeekdayStr } from "rrule"; import { ByWeekday, RRule, Weekday } from "rrule"; import { firstWeekdayIndex } from "../../common/datetime/first_weekday"; import { stopPropagation } from "../../common/dom/stop_propagation"; +import { LocalizeKeys } from "../../common/translations/localize"; import "../../components/ha-chip"; import "../../components/ha-list-item"; import "../../components/ha-select"; @@ -19,12 +20,10 @@ import { getWeekday, getWeekdays, getMonthlyRepeatItems, - intervalSuffix, RepeatEnd, RepeatFrequency, ruleByWeekDay, untilValue, - WEEKDAY_NAME, MonthlyRepeatItem, getMonthlyRepeatWeekdayFromRule, getMonthdayRepeatFromRule, @@ -174,18 +173,36 @@ export class RecurrenceRuleEditor extends LitElement { return html` - None - Yearly - Monthly - Weekly - Daily + + ${this.hass.localize("ui.components.calendar.event.repeat.freq.none")} + + + ${this.hass.localize( + "ui.components.calendar.event.repeat.freq.yearly" + )} + + + ${this.hass.localize( + "ui.components.calendar.event.repeat.freq.monthly" + )} + + + ${this.hass.localize( + "ui.components.calendar.event.repeat.freq.weekly" + )} + + + ${this.hass.localize( + "ui.components.calendar.event.repeat.freq.daily" + )} + `; } @@ -196,7 +213,9 @@ export class RecurrenceRuleEditor extends LitElement { ${this._monthlyRepeatItems.length > 0 ? html`${WEEKDAY_NAME[item]}${this.hass.localize( + `ui.components.calendar.event.repeat.weekly.weekday.${ + item.toLowerCase() as Lowercase + }` + )} ` )} @@ -241,11 +264,16 @@ export class RecurrenceRuleEditor extends LitElement { return html` `; @@ -255,26 +283,38 @@ export class RecurrenceRuleEditor extends LitElement { return html` - Never - After - On + + ${this.hass.localize("ui.components.calendar.event.repeat.end.never")} + + + ${this.hass.localize("ui.components.calendar.event.repeat.end.after")} + + + ${this.hass.localize("ui.components.calendar.event.repeat.end.on")} + ${this._end === "after" ? html` ` @@ -283,7 +323,9 @@ export class RecurrenceRuleEditor extends LitElement { ? html`