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

Translation string issue #4545

Open
EricSoroos opened this issue Nov 5, 2018 · 2 comments
Open

Translation string issue #4545

EricSoroos opened this issue Nov 5, 2018 · 2 comments
Assignees

Comments

@EricSoroos
Copy link
Contributor

EricSoroos commented Nov 5, 2018

https://github.com/ckan/ckan/blob/master/ckan/i18n/nl/LC_MESSAGES/ckan.po#L1556

It appears that the translator has translated the template variables in this string, rather than arrange them in the proper order preserving the template variable names.

(note, I'm not Dutch, so I can't speak to if the order is correct or not. I suspect not.)

CKAN Version if known (or site URL)

2.7.2, master

Please describe the expected behaviour

Date formatting works

Please describe the actual behaviour

Date formatting returns a 500 error

File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 78 in render_snippet
renderer='snippet')
File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 177 in render
return cached_template(template_name, render_template)
File '/usr/lib/ckan/default/lib/python2.7/site-packages/pylons/templating.py', line 249 in cached_template
return render_func()
File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 131 in render_template
return render_jinja2(template_name, globs)
File '/usr/lib/ckan/default/src/ckan/ckan/lib/base.py', line 88 in render_jinja2
return template.render(**extra_vars)
File '/usr/lib/ckan/default/lib/python2.7/site-packages/jinja2/environment.py', line 1008 in render
return self.environment.handle_exception(exc_info, True)
File '/usr/lib/ckan/default/lib/python2.7/site-packages/jinja2/environment.py', line 780 in handle_exception
reraise(exc_type, exc_value, tb)
File '/usr/lib/ckan/default/src/ckan/ckan/templates/snippets/activity_item.html', line 8 in top-level template code
{{ h.time_ago_from_timestamp(activity.timestamp) }}
File '/usr/lib/ckan/default/src/ckan/ckan/lib/helpers.py', line 1222 in render_datetime
with_hours=with_hours)
File '/usr/lib/ckan/default/src/ckan/ckan/lib/formatters.py', line 147 in localised_nice_date
.format(**details))
KeyError: u'maand'

What steps can be taken to reproduce the issue?

Visit an activity stream with CKAN_LANG set to 'nl': /dataset/activity/[[name-or-id]]

@smotornyuk
Copy link
Member

Yep, this issue was reported in #4508

@EricSoroos
Copy link
Contributor Author

Sorry, didn't catch that in the search.

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

3 participants