Ask Your Question

Maybe bug with plurals and internationalization

asked 2013-11-10 17:09:25 -0500

bluebyte gravatar image

updated 2013-11-11 07:19:12 -0500

I'am trying to migrate to the latest version. But faced with a problem:

IndexError at /questions/
list index out of range
Request Method: GET
Request URL:
Django Version: 1.4
Exception Type: IndexError
Exception Value:    
list index out of range
Exception Location: /Users/bluebyte/projects/test_project/askbot/utils/ in py_pluralize, line 143
Python Executable:      /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/
Python Version: 2.7.5

Steps: 1. turn on russian localization 2. add one question

I think there is something wrong with loading plurals. In we decide which form of plural to use. Where are 3 forms in russian language. So, askbot crashes if system decides that we need the third one. In in method py_pluralize system passes default english plurals despite settings. But there are just 2 forms in english... So, we get list index out of range error.

I don't understand how plurals work. Need help with fixing that.

Also, there is tiny bug in method py_pluralize in

if form_number > num_forms:

num_forms starts with 1 and form_number start with 0. So, you should use >= I think.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-11-23 14:19:33 -0500

Evgeny gravatar image

This is fixed in the repository.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-11-10 17:09:25 -0500

Seen: 46 times

Last updated: Nov 23 '13