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

Recurring WebApp Error: <type 'exceptions.KeyError'>: u'mins' #900

Merged
merged 1 commit into from May 31, 2013

Conversation

amercader
Copy link
Member

I'm getting loads of these, apparently mostly caused by googlebot. A quick inspection doesn't show any mins key in the code, so not sure what is going on.

Full traceback: https://gist.github.com/amercader/5575150

File '/usr/lib/ckan/beta/src/ckan/ckan/templates/page.html', line 65 in block "main_content"
  {% block primary %}
File '/usr/lib/ckan/beta/src/ckan/ckan/templates/page.html', line 78 in block "primary"
  {% block primary_content %}{% endblock %}
File '/usr/lib/ckan/beta/src/ckan/ckan/templates/package/resource_read.html', line 70 in block "primary_content"
  {% block resource_additional_information %}
File '/usr/lib/ckan/beta/src/ckan/ckan/templates/package/resource_read.html', line 99 in block "resource_additional_information"
  {% for key, value in h.format_resource_items(res.items()) %}
File '/usr/lib/ckan/beta/src/ckan/ckan/lib/helpers.py', line 1459 in format_resource_items
  value = formatters.localised_nice_date(datetime_)
File '/usr/lib/ckan/beta/src/ckan/ckan/lib/formatters.py', line 91 in localised_nice_date
  days).format(days=days)
KeyError: u'mins'

@tobes
Copy link
Contributor

tobes commented May 14, 2013

@amercader this is a translation error with the cs_CZ

one: {days} day ago
other: {days} days ago

one: před {mins} dnem
few: před {mins} dny
other: před {mins} dny

This probably should

a) be fixed in a point release
b) We should write tests to check translations are correct. I'd be happy to do this as part of my coding standards tests or as part of the translation paster jobs.

@amercader
Copy link
Member Author

Thanks for looking into this. +1 to both.

@tobes
Copy link
Contributor

tobes commented May 15, 2013

I've created #903 for translation checking/tests - so this issue is only for this specific issue now

There were wrong keys in some of the strings that raised an exception on
the resource page. Also updated the translations on Transifex.
@ghost ghost assigned tobes May 31, 2013
@amercader
Copy link
Member Author

@tobes can you have a quick look at this one? I've also updated the translations on Transifex

@tobes
Copy link
Contributor

tobes commented May 31, 2013

@amercader this looks good to me. Can you do the merge into the 2.0.1 release :)

If I have time I'll look at creating a translation tester next week to check them all for such errors

@amercader
Copy link
Member Author

@tobes, ok do you want to merge this into master or should I close it?

@tobes
Copy link
Contributor

tobes commented May 31, 2013

@amercader I'm not sure what the state of translations in master is. If we have the current 2.0 ones then we should update these I suppose. @seanh is this the sort of thing we want to merge into master or do we just wait till we do the next translation pull? I suppose if some one installs from source this might be an issue but their translations will be incomplete anyhow.

@amercader
Copy link
Member Author

@seanh updated the translations on master from 2.0 some days ago (82f45de), so I think is worth merging, as the translations on master are up to date

@tobes tobes merged commit 9789d76 into master May 31, 2013
@tobes tobes deleted the 900-fix-cz-translation branch May 31, 2013 15:31
@tobes
Copy link
Contributor

tobes commented May 31, 2013

merged

amercader added a commit that referenced this pull request May 31, 2013
There were wrong keys in some of the strings that raised an exception on
the resource page. Also updated the translations on Transifex.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants