Closed GoogleCodeExporter closed 9 years ago
Hmm, the IMAGE_FILTERS_HELP_TEXT issue seems to be a pain. Here are the two
obvious
options of coupling printf with gettext (where 'bar' is actually some
dynamically
generated value):
1. _('foo %s' % 'bar') # wrong: same as _('foo bar')
2. _('foo %s') % 'bar' # correct
But despite the second option is correct, calling gettext at that point (where
the
code currently resides) means that Django translation is not ready yet, so the
string
still remains untranslated.
The only working solution I've found is this one:
from django.utils.functional import lazy
MYTEXT = _('foo %s')
get_MYTEXT = lazy(lambda: _(MYTEXT) % 'bar', unicode)
...help_text=get_MYTEXT()... # instead of ...help_text=_(MYTEXT)...
Ugly, but the gettext call is effectively postponed.
Original comment by neithere
on 25 Oct 2008 at 7:53
Original comment by justin.d...@gmail.com
on 22 Dec 2008 at 3:05
Original comment by justin.d...@gmail.com
on 23 Dec 2008 at 2:13
Translation is quite good, thanks neithere.
Original comment by glader...@gmail.com
on 29 May 2009 at 10:28
Is there any chance for translations to get into the trunk? There are tons of
them stuck in the issues list,
unresolved for years. Who is going to verify them and when?
Of the eight apps I've contributed translations to, this is the only one where
the translation isn't instantly
processed by the maintainer. I'm puzzled. Any help needed?
Original comment by neithere
on 22 Oct 2009 at 4:51
See #106.
Original comment by richardb...@gmail.com
on 3 Sep 2012 at 9:49
Original issue reported on code.google.com by
neithere
on 25 Oct 2008 at 7:30Attachments: