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 calendar picker day selection #6170

Closed
Gr33nR10t opened this issue Oct 14, 2020 · 8 comments
Closed

Fix calendar picker day selection #6170

Gr33nR10t opened this issue Oct 14, 2020 · 8 comments
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround.

Comments

@Gr33nR10t
Copy link

What? Why?
In the Italian instance when a user open a cycle order the calendar picker doesn't show the correct date on the text box.
After choosing the day there are AA and GG instead 2020 and 12.

screenshot_2020-10-12_at_22 52 56_720

What should we test?
Log in as enterprise user or super admin
Change your language to other than english
Go to the order cycles menu
Create a new order cycle or edit a current one
See the calendar dropdown
This dropdown also appears in the "reports" menu

@luisramos0
Copy link
Contributor

this must be caused by this PR #5995

@andresgutgon
Copy link
Contributor

I can't reproduce in my local Docker dev env
image

Must be something related with the italian instance but not sure how to reproduce :/

@andresgutgon
Copy link
Contributor

Ok, for some reason I see all site in italian but not javascript translations.

What I see the error (Is my theory) comes from Ruby / SpreeI18n gem misconfiguration:
image

@andresgutgon
Copy link
Contributor

We're overriting italian locale 😅
image

@luisramos0 luisramos0 changed the title Fix calendar piker day selection Fix calendar picker day selection Oct 26, 2020
@luisramos0
Copy link
Contributor

As per discussion in the PR #6218 this problem is caused by translators that change the date format to something not valid, in this case aa-mm-gg where it should always be something with yy/mm/dd

This is happening in quite a few languages in transifex. The fix to this is to update the translation in transifex to use valid formats with yy mm dd. Same applies to the format key where entries like %Y and %m should always be used.

I think we should keep this issue open because we should eliminate the root cause: the root cause is the fact that we are mixing configurations with translations. These entries should not be translations but more configurations. I'd make this issue a request to move these entries from en.yml to some config file.

@andresgutgon
Copy link
Contributor

andresgutgon commented Oct 26, 2020

To keep everything working the same way, with Rails locales system I would just move these copies to another .yml file:

locales/
  en.yml
  skip_translators/
    en.yml

And exclude skip_translators folder from Transifex process

@luisramos0
Copy link
Contributor

nice Andres, thanks a lot for that suggestion 👌
We have a few more candidate translation keys for that already...

@RachL RachL added the bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround. label Oct 28, 2020
@lin-d-hop
Copy link
Contributor

💥

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s3 The bug is stopping a critical or non-critical feature but there is a usable workaround.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants