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

Setting order cycle date from list persists wrong date #1924

Closed
sauloperez opened this issue Oct 24, 2017 · 14 comments
Closed

Setting order cycle date from list persists wrong date #1924

sauloperez opened this issue Oct 24, 2017 · 14 comments

Comments

@sauloperez
Copy link
Contributor

sauloperez commented Oct 24, 2017

What

The date persisted in the order cycle doesn't match the one selected in the order cycle when doing so from the order cycles list. See the gif below:

Steps to reproduce

  1. Go to order cycles
  2. Modify a date of one of the available cycles through the datepicker
  3. Click on the update button at the bottom of the page

Once reloaded the displayed date it's not the one we selected.

Acceptance Criteria

As an admin I want to see the actual date that I selected in the order cycle datepicker.

@sauloperez sauloperez added the bug label Oct 24, 2017
@kirstenalarsen
Copy link
Contributor

kirstenalarsen commented Oct 25, 2017 via email

@sigmundpetersen
Copy link
Contributor

what tool are you using for recording @sauloperez ? 😄 #META

@sauloperez
Copy link
Contributor Author

sauloperez commented Oct 26, 2017

I have to admit I was on my good ol' mac 😅 using Recordit, but normally I use Peek in my daily day Ubuntu

@sauloperez
Copy link
Contributor Author

The issue turned out to be due to a wrong translation of the key js_format. The date picker does not understand aa as year (año in Spanish). Changing it from aa-mm-dd to yy-mm-dd.

By quickly checking the locales I believe you will experience the same problem @myriamboure @ltrls and @sigmundpetersen. You have to stick to the English syntax (y, m, d).

@sigmundpetersen
Copy link
Contributor

Changing it from aa-mm-dd to yy-mm-dd.

This worked on Scandinavian instance @sauloperez @myriamboure

@myriamboure
Copy link
Contributor

@sauloperez @sigmundpetersen do we need to commit any PR or is it something we are supposed to do on our local server configuration ? Sorry non tech ;-)

@sauloperez
Copy link
Contributor Author

It's just a translation that you need to change in Transifex. Look for https://github.com/openfoodfoundation/openfoodnetwork/blob/master/config/locales/fr.yml#L2079

@sigmundpetersen
Copy link
Contributor

@sauloperez do you think these keys should be removed from en.yml as translation of them breaks functionality? 😄

There are 2 date picker keys spree.date_picker.js_format: yy-mm-dd and spree.date_picker.format: %Y-%M-%D

@sauloperez
Copy link
Contributor Author

I wouldn't remove them as it seems to be the mechanism to localize the date format. For instance in Spain the standard is dd-mm-yyyy. Perhaps is worth adding a comment to note the special syntax cocumented in http://api.jqueryui.com/datepicker/#option-dateFormat

@myriamboure
Copy link
Contributor

Standard in France is also dd-mm-yyyy :-)

@myriamboure
Copy link
Contributor

That works in France ! Should we close that issue then @sauloperez ?

@daniellemoorhead
Copy link
Contributor

@lin-d-hop @sineadfenton @NickWeir63 is this relevant for the UK instance?

@sineadfenton
Copy link

@daniellemoorhead No from testing now and work on order cycles last week I cant say this cropped up for me, so we look grand on this end.

@daniellemoorhead
Copy link
Contributor

Thanks @sineadfenton then I imagine it would be ok to close this @sauloperez @myriamboure 😄

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

No branches or pull requests

6 participants