Ask Your Question
1

Make "answer must be ..." translatable

asked 2013-05-20 07:06:41 -0600

wowas gravatar image

In file forms.py (rows 356,357) need change:

self.length_error_template_singular = 'answer must be > %d character'
self.length_error_template_plural = 'answer must be > %d characters'

on

self.length_error_template_singular = _('answer must be > %d character')
self.length_error_template_plural = _('answer must be > %d characters')
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-05-20 13:40:26 -0600

Evgeny gravatar image

Not sure if this is exactly the way to go - take a look how this phrase is used - it later becomes an argument to ugettext_lazy. Maybe we should add a dummy _() just within that class on top of your changes.

Maybe there is another way to simplify this.

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

Stats

Asked: 2013-05-20 07:06:41 -0600

Seen: 35 times

Last updated: May 20 '13