Ask Your Question

What is the correct use of template substitution within translate section?

asked 2012-05-17 17:28:29 -0600

jimt's avatar

The askbot/skins/default/templates/faq_static.html file contains:

{% trans %}Please <a href='%(ask_question_url)s'>ask</a> your question, help make our community better!{% endtrans %}

which is rendered with a link of: I suspect it should be href="{{ ask_question_url }}" but I am not certain if that will work with the translation mechanism.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-05-17 17:41:30 -0600

Evgeny's avatar

updated 2012-05-17 17:42:05 -0600

Yes, that is wrong, the error happened when the strings were moved from django.po file to the templates.

It is better to use url template tags {% url ask %} and get rid of the unnecessary context variable in the template and in the view askbot.views.meta.faq. There are actually two urls like that.

If you fix that and make a pull request I will merge the patch. Thanks!

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


Asked: 2012-05-17 17:28:29 -0600

Seen: 237 times

Last updated: May 17 '12