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

Local set to 'fr' doesn't work correctly when visualising a dataset #3327

Closed
stephane-lapointe opened this issue Nov 22, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@stephane-lapointe
Copy link

commented Nov 22, 2016

CKAN Version if known (or site URL)

CKAN version 2.6.0

Please describe the expected behaviour

Dataset should adjust datetime when locale is set to 'fr'.

Please describe the actual behaviour

An error is generated while accessing a dataset when local is set to fr. (http://my-domain/fr/dataset/dataset-name)

Logs show this message:

File '/usr/lib/ckan/default/src/ckan/ckan/lib/formatters.py', line 152 in localised_nice_date
.format(**details))
KeyError: u'heure'

The problem doesn't exist with locale different than 'fr'.

The problem can be fixed temporarily by changing the value in ckan/i18n/fr/LC_MESSAGES/ckan.po.

#: ckan/lib/formatters.py:148
msgid "{month} {day}, {year}, {hour:02}:{min:02} ({timezone})"
msgstr "{month} {day}, {year}, {heure:02}:{min:02} ({timezone})"

#: ckan/lib/formatters.py:148
msgid "{month} {day}, {year}, {hour:02}:{min:02} ({timezone})"
msgstr "{month} {day}, {year}, {hour:02}:{min:02} ({timezone})"

Note that the catalog is marked as fuzzy, so you'll have to force catalog compiling:
python setup.py compile_catalog -f --locale fr

What steps can be taken to reproduce the issue?

@amercader amercader self-assigned this Nov 29, 2016

amercader added a commit that referenced this issue Nov 29, 2016

@amercader

This comment has been minimized.

Copy link
Member

commented Nov 29, 2016

Thanks @stephane-lapointe

Fixed on Transifex and backported to the dev-v2.6 branch, will be part of 2.6.1

@amercader amercader closed this Nov 29, 2016

wardi added a commit that referenced this issue Jan 7, 2017

@wardi

This comment has been minimized.

Copy link
Contributor

commented Jan 7, 2017

@amercader did you intend to merge this instead?

tuffnatty added a commit to tuffnatty/ckan that referenced this issue Dec 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.