[refactor] translation engines: common interface
This commit is contained in:
@@ -23,14 +23,20 @@
|
||||
<div id="answers" role="complementary" aria-labelledby="answers-title"><h4 class="title" id="answers-title">{{ _('Answers') }} : </h4>
|
||||
{%- for answer in answers.values() -%}
|
||||
<div class="answer">
|
||||
<span>{{ answer.answer }}</span>
|
||||
{%- if answer.url -%}
|
||||
<a href="{{ answer.url }}" class="answer-url"
|
||||
{%- if results_on_new_tab %} target="_blank" rel="noopener noreferrer"
|
||||
{%- else -%} rel="noreferrer"
|
||||
{%- endif -%}
|
||||
>{{ urlparse(answer.url).hostname }}</a>
|
||||
{% endif -%}
|
||||
{%- if answer.answer_type == 'translations' -%}
|
||||
{% with translations=answer.translations %}
|
||||
{% include 'simple/answerers/translate.html' %}
|
||||
{% endwith %}
|
||||
{%- else -%}
|
||||
<span>{{ answer.answer }}</span>
|
||||
{%- if answer.url -%}
|
||||
<a href="{{ answer.url }}" class="answer-url"
|
||||
{%- if results_on_new_tab %} target="_blank" rel="noopener noreferrer"
|
||||
{%- else -%} rel="noreferrer"
|
||||
{%- endif -%}
|
||||
>{{ urlparse(answer.url).hostname }}</a>
|
||||
{% endif -%}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user