开发者

Django Internazionalization: what's wrong with my {% blocktrans %}?

In template:

{% blocktrans with event.title|capfirst as title and event.event_date|date:"d/m/Y" as event_date  %}
<p>To book a VIP Table at <b>{{ title }}</b> on <b>{{ event_date }}</b> fill the following form an开发者_运维知识库d indicate the details in the message.</p>
{% endblocktrans %}

in app/locale/es/LC_MESSAGES/django.po (done with django-admin.py makemessages -l es)

#: agenda/booking.html:18
#, fuzzy, python-format
msgid ""
"\n"
"    <p>To book a VIP Table at <b>%(title)s</b> on <b>%(event_date)s</b> fill "
"the following form and indicate the details in the message.</p>\n"
"    "
msgstr ""
"\n"
"    Para reservar una mesa VIP a <b>\"%(title)s\"</b> on <b>%(event_date)s</"
"b> rellena el siguiente formulario y indicanos los detalles en el mensaje."

It doesn't work. What am I doing wrong?

Same for:

{% blocktrans with request.POST.email as email %}
<p>Thank you for using the booking form.</p>
<p>We will forward the reply to <b>{{ email }}</b> in the next 48 hours.</p>
<br />
{% endblocktrans %}


Try to remove ", fuzzy" and then compile messages

python manage.py compilemessages

Does it work then? The fuzzy markers are "flags" for the translators so they validate the messages.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜