mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-16 05:46:35 +00:00
Improve grammar for single periodic second/minute/hour (#17572)
This commit is contained in:
parent
6dff2f691e
commit
f4d575f456
@ -425,7 +425,7 @@ const tryDescribeTrigger = (
|
||||
return "Invalid Time Pattern Seconds";
|
||||
}
|
||||
|
||||
if (seconds_all) {
|
||||
if (seconds_all || (seconds_interval && seconds === 1)) {
|
||||
result += "every second of ";
|
||||
} else if (seconds_interval) {
|
||||
result += `every ${seconds} seconds of `;
|
||||
@ -454,7 +454,7 @@ const tryDescribeTrigger = (
|
||||
return "Invalid Time Pattern Minutes";
|
||||
}
|
||||
|
||||
if (minutes_all) {
|
||||
if (minutes_all || (minutes_interval && minutes === 1)) {
|
||||
result += "every minute of ";
|
||||
} else if (minutes_interval) {
|
||||
result += `every ${minutes} minutes of `;
|
||||
@ -491,7 +491,7 @@ const tryDescribeTrigger = (
|
||||
return "Invalid Time Pattern Hours";
|
||||
}
|
||||
|
||||
if (hours_all) {
|
||||
if (hours_all || (hours_interval && hours === 1)) {
|
||||
result += "every hour";
|
||||
} else if (hours_interval) {
|
||||
result += `every ${hours} hours`;
|
||||
|
Loading…
x
Reference in New Issue
Block a user