fix: an automation's schedule shows in English on its page and in the Create dialog (#34428)

The Schedule value on an automation's page and on the Schedule button of the Create dialog always read in English ("Daily", "Weekly", "Once"), whatever language the app was set to. It now shows in the chosen language, with the names the Schedule menu already lists.

Fixes #34426
This commit is contained in:
Classic298 authored and GitHub committed 2026-11-16 15:35:22 +09:00
1 parent 292e7a155d
commit c9eb0b2bfb
1 file changed
+2 -9
@@ -153,15 +153,8 @@
return 'Schedule';
};
$: scheduleLabel = (() => {
if (frequency === 'ONCE') return 'Once';
if (frequency === 'HOURLY') return 'Hourly';
if (frequency === 'DAILY') return 'Daily';
if (frequency === 'WEEKLY') return 'Weekly';
if (frequency === 'MONTHLY') return 'Monthly';
if (frequency === 'CUSTOM') return 'Custom';
return 'Schedule';
})();
$: scheduleLabel =
FREQUENCIES.find((option) => option.key === frequency)?.label ?? $i18n.t('Schedule');
</script>
<Dropdown bind:show={showDropdown} {side} {align}>