Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix future date issue #1646

Merged
merged 4 commits into from
Jun 24, 2020
Merged

Fix future date issue #1646

merged 4 commits into from
Jun 24, 2020

Conversation

sethherr
Copy link
Member

The month was off by 1 when translating the date!

Running this in console and getting the shown responses back was wild!

Time.current
=> "Wed, 24 Jun 2020 11:20:48 CDT -05:00"
I18n.l(Time.current)
=> "Wed, 24 Jul 2020 11:02:51 -0500" # wtf?
I18n.l(Time.current.beginning_of_year)
=> "Wed, 01 Feb 2020 00:00:00 -0600" # WHOAH, WHAT!!?
I18n.l(Time.current, format: :dotted)
=> "2020.6.24" # and this is CORRECT!

I found an answer in this stack overflow question.

In PR #1630 I removed the nil columns because they were causing problems with the translation normalizing. Reverting that - putting a nil row back in month_names and abbr_month_names fixed the issue.

@sethherr
Copy link
Member Author

sethherr commented Jun 24, 2020

So... still running into the issue that led to deleting those nil values - where my local bundle exec bin/rake prepare_translations doesn't normalize in the same way that CircleCI does.

I tried to figure out a quick fix but couldn't. I opened an issue in the i18n-tasks gem.

For now, I just manually edited the file locally to match the CircleCI whitespace, after running bin/rake prepare_translations

@sethherr sethherr merged commit 546db95 into main Jun 24, 2020
@sethherr sethherr deleted the hot_sheet_date branch June 24, 2020 18:37
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.

1 participant