Fixed bug in the Cron Job Schedule translation to English.#139
Fixed bug in the Cron Job Schedule translation to English.#139ExtremeFiretop merged 1 commit intoExtremeFiretop:devfrom
Conversation
The 2-digit numeric entries for "month" were being translated incorrectly: "10" --> "January0" "11" --> "JanuaryJanuary" "12" --> "JanuaryFebruary"
|
I woke up this morning and found an email that my friend had sent me late last night (after I had gone to bed). He found the bug that I just fixed in this PR. He's certainly earning another free lunch :>). BTW, these last 2 PRs gave me a good idea to write a validator for the cron job schedule. I've already planned out the logic and it's pretty much written in my head. I've got quite a bit of work to do for my day job today, but I'll finish the validator by this evening. Stay tuned... :>) |
I like the fact that you take these ideas and run with them to try and achieve something universal applicable and useable. It's really cool to see! Your friend sure is good! I haven't had the opportunity to test but I'll test this out later this afternoon! |
| month_number="$(echo "$month_pair" | cut -d':' -f1)" | ||
| month_name="$(echo "$month_pair" | cut -d':' -f2)" | ||
| month_text="$(echo "$month_text" | sed "s/$month_number/$month_name/g")" | ||
| month_text="$(echo "$month_text" | sed "s/\b${month_number}\b/$month_name/g")" |
| dow_name="$(echo "$dow_pair" | cut -d':' -f2)" | ||
| if [ "$day_of_week_text" != "Any week day" ]; then | ||
| day_of_week_text="$(echo "$day_of_week_text" | sed "s/$dow_number/$dow_name/g")" | ||
| day_of_week_text="$(echo "$day_of_week_text" | sed "s/\b${dow_number}\b/$dow_name/g")" |
|
Tested with success and merged! |
The 2-digit numeric entries for "month" were being translated incorrectly:
"10" --> "January0"
"11" --> "JanuaryJanuary"
"12" --> "JanuaryFebruary"
Some trivial changes in the email body title.