bookwyrm-social / bookwyrm

Social reading and reviewing, decentralized with ActivityPub
http://joinbookwyrm.com/
Other
2.23k stars 263 forks source link

Datepicker date format should correspond to user's locale #3137

Open soshial opened 10 months ago

soshial commented 10 months ago

Describe the bug Currently, when choosing other languages in settings datepicker shows mm/dd/yyyy in locales that have different date order. Also, there is no English locale that uses dd/mm/yyyy format and no way to override the American one.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Settings' and switch language to Polish (or any other European language)
  2. Open any book page and click on "Add progress"
  3. Data format should be yyyy/mm/dd or dd/mm/yyyy and those letters should be translated. So for Polish this would be rrrr/mm/dd (year, month, day)

Expected behavior A clear and concise description of what you expected to happen.

Screenshots

Screenshot 2023-11-26 at 06 29 12 Screenshot 2023-11-26 at 06 29 31

Instance On which BookWyrm instance did you encounter this problem.


Desktop (please complete the following information):

mouse-reeve commented 8 months ago

For better or worse, this is your browser's built-in date picker. If your locale is set at the browser level, it should use an appropriate date picker (and if it doesn't, that's on your browser). If your locale in bookwyrm is different than your browser locale, I don't know of a way to request the correct datepicker from the browser.

soshial commented 8 months ago

This is good news, thank you, @mouse-reeve. I tested with Latvian locale on Firefox and it showed correctly.

Not sure, maybe, the website locale settings should override the browser locale. But this is quite minor issue, I think.