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

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


Copy link

@stephane-lapointe stephane-lapointe 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/', line 152 in localised_nice_date
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/
msgid "{month} {day}, {year}, {hour:02}:{min:02} ({timezone})"
msgstr "{month} {day}, {year}, {heure:02}:{min:02} ({timezone})"

#: ckan/lib/
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 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
Copy link

@amercader amercader 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
Copy link

@wardi wardi 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
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants