First time here? Check out the FAQ!

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

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.

jimt's avatar
asked 2012-05-17 17:28:29 -0500
edit flag offensive 0 remove flag close merge delete


add a comment see more comments

1 Answer


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!

Evgeny's avatar
answered 2012-05-17 17:41:30 -0500, updated 2012-05-17 17:42:05 -0500
edit flag offensive 0 remove flag delete link


add a comment see more comments