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

pickadate widget doesn't use the correct 24h format in some languages #3134

Closed
vincentfretin opened this issue Jun 29, 2020 · 4 comments
Closed

Comments

@vincentfretin
Copy link
Member

BUG

See https://community.plone.org/t/datetime-widget-format-not-am-pm/12491

What I did:

Plone in French language, create a Page, click on the Dates tab and pick a date.

What I expect to happen:

In French and Norwegian, the hours should be in 24h format, so showing 17:27 in the afternoon.

What actually happened:

It shows "05:27 p.m." instead of "17:27"
Note, in German, which uses 24h format too, it works properly.

in French
Capture d’écran de 2020-06-29 17-32-10

in German
Capture d’écran de 2020-06-29 17-32-04

What version of Plone/ Addons I am using:

Plone 5.2.2rc1

@vincentfretin
Copy link
Member Author

In German, the page source contains

data-pat-pickadate="{..., "time": {..., "format": "HH:i"}}"

in French:

data-pat-pickadate="{..., "time": {..., "format": "h:i a"}}"

but this really should be like German.
Where is the format configured?

@vincentfretin
Copy link
Member Author

Oh my, for German, we have the following translation in plone.app.locales/plone/app/locales/locales/de/LC_MESSAGES/plone.po

#. Default: "h:i a"
#: plone.app.widgets/plone/app/widgets/utils.py:72
msgid "pickadate_time_format"
msgstr "HH:i"

So that's it @espenmn @zopyx

@vincentfretin
Copy link
Member Author

We can edit the date format too!

#. Default: "mmmm d, yyyy"                                                      
#: plone.app.widgets/plone/app/widgets/utils.py:59                              
msgid "pickadate_date_format"                                                   
msgstr "mmmm d, yyyy"

I don't know who translated these two strings in French by just copy and paste but it wasn't me, at least I don't remember :)

@vincentfretin
Copy link
Member Author

vincentfretin commented Jun 29, 2020

Here is an example for French : collective/plone.app.locales@712267a

Capture d’écran de 2020-06-29 17-57-27

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

1 participant