The title might not be clear, but I don't know how else to put it..
In the Django documentation it's pretty clear how to mark a text block for translation .. Take this example:
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Donec quam sem, sodales in fringilla nec, lacinia a lorem.
Vivamus vel molestie ante.
So far so good. You just either use the trans or blocktrans tag.
But now consider this:
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Donec quam sem, sodales in fringilla nec, lacinia a lorem.
<a href="{% url some-view %}">Vivamus vel</a> molestie ante.
How should I deal with this ? Do I just wrap it in a block trans ?
Edit:
I think I've found out how it should be done ..
{% url some-view as some_view_url %}
{% blocktrans %}
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Donec quam sem, sodales in fringilla nec, lacinia a lorem.
<a href="{{ some_view_url }}">Vivamus vel</a> molestie ante.
{% endblocktrans %}
<a href="{{url}}">{{blah}}</a>
- I don't want translators to add HTML. It would be nicer to have{% blocktranslate %} This is a link to {{ link }}.{% endblocktranslate %}
. Any chance? (yes, I know I can generate this in the view before, but in the template?) – Macadamia