Improve grammar for single periodic second/minute/hour (#17572)

This commit is contained in:
Bruce Fitzsimons 2023-08-15 22:20:35 +10:00 committed by GitHub
parent 6dff2f691e
commit f4d575f456
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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`;