carlxaeron / django-rosetta

Automatically exported from code.google.com/p/django-rosetta
MIT License
0 stars 0 forks source link

.mo file is not built properly for {% blocktrans count #53

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use a plural blocktrans in your template:

{% blocktrans count tour.history__count as counter %}{{counter}} entry{% 
plural %}{{counter}} entries{% endblocktrans %}

2. Add the two translations in rosetta and save. Restart web server.

3. The translated text will not be seen in the resulting web page. Instead, 
the fallback text is used. 

If you manually run "django-admin.py compilemessages" and restart the web 
server the text will now show up... so I'm guessing the .mo file is not 
getting generated properly for plural text.

What is the expected output? What do you see instead?

Should be seeing the translated text, but instead the fallback text is 
seen. The call to 

tmsg = self._catalog[(msgid1, self.plural(n))]

in ungettext(self, msgid1, msgid2, n) results in a KeyError.

What version of the product are you using? On what operating system?

(0, 4, 0), WinXP, Django 1.1

Please provide any additional information below.

This is a great application! Thanks!

Original issue reported on code.google.com by tba...@gmail.com on 6 Aug 2009 at 5:57

GoogleCodeExporter commented 8 years ago
Well spotted, this is odd.

Original comment by mbonetti on 19 Aug 2009 at 10:33

GoogleCodeExporter commented 8 years ago
Update: this is a bug in polib 0.4.1 which was fixed in 0.4.2. I'll upgrade 
polib as soon as bug #17 is ironed out 
http://code.google.com/p/polib/issues/detail?id=17

Original comment by mbonetti on 20 Aug 2009 at 7:29

GoogleCodeExporter commented 8 years ago
Cool... thanks so much for looking into this...

Original comment by tba...@gmail.com on 20 Aug 2009 at 9:22

GoogleCodeExporter commented 8 years ago
This is fixed as of r77

Original comment by mbonetti on 19 Oct 2009 at 10:10