Skip to content

Fixed bug in the Cron Job Schedule translation to English.#139

Merged
ExtremeFiretop merged 1 commit intoExtremeFiretop:devfrom
Martinski4GitHub:dev
Feb 23, 2024
Merged

Fixed bug in the Cron Job Schedule translation to English.#139
ExtremeFiretop merged 1 commit intoExtremeFiretop:devfrom
Martinski4GitHub:dev

Conversation

@Martinski4GitHub
Copy link
Collaborator

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.

The 2-digit numeric entries for "month" were being translated incorrectly:
"10" -->  "January0"
"11" -->  "JanuaryJanuary"
"12" -->  "JanuaryFebruary"
@Martinski4GitHub
Copy link
Collaborator Author

@ExtremeFiretop,

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... :>)

@ExtremeFiretop
Copy link
Owner

@ExtremeFiretop,

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")"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

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")"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@ExtremeFiretop ExtremeFiretop merged commit b8f13da into ExtremeFiretop:dev Feb 23, 2024
@ExtremeFiretop
Copy link
Owner

Tested with success and merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants