Hi everybody,

I really enjoy writing applications in Django but I ran into something
very strange while doing my first internationalized app. I'm using the
newforms-admin branch, revision 7192. All translations work fine,
except in these cases:

When I mark a string that spans multiple lines to be translated with
{% blocktrans %}, make-messages.py shows the string and compile-
messages.py works fine but the translation simply does not appear in
the output. This does not work:

  {% blocktrans %}
    This is a test string
  {% endblocktrans %}

This, however, does:

  {% blocktrans %}This is a test string{% endblocktrans %}

I found this - possibly related - bug, but it has been closed as
"worksforme":  http://code.djangoproject.com/ticket/4535

This would be easy to work around, though. I'd just put everything in
one line. What's worse is the behaviour when using bound variables:

  {% blocktrans with item.count as xyz %}This is the count: {{ xyz }}
{% endblocktrans %}

This works at first. When I add another variable, it stops working:

  {% blocktrans with item.count as xyz and item.name as abc %}This is
{{ abc }}'s count: {{ xyz }}{% endblocktrans %}

It appars in the .po file just fine but again, the translated string
does not appear in the output. And the final straw: when I go back to

  {% blocktrans with item.count as xyz %}This is the count: {{ xyz }}
{% endblocktrans %}

it doesn't work anymore! Does anyone have any idea what might cause
this behaviour?

After every change to the template I run
  make-messages.py -a
then after redoing the .po file I do
  compile-messages.py
and then restart the test server.

I'd be very grateful for any pointers, I'm running my head against the
wall here. It's probably something simple that I overlooked... but I
tried it about a million times.

Cheers,

Jonas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to