This repository has been archived by the owner on Oct 15, 2021. It is now read-only.
/
search_translation.html
83 lines (62 loc) · 2.4 KB
/
search_translation.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{% extends "base.html" %}
{% load staticfiles %}
{% load i18n %}
{% load pagination_tags %}
{% load search_filters %}
{% load resources_common_tags %}
{% block extracss %}
<link media="screen" href="{% static "trans_memory/css/search_translation.css" %}" type="text/css" rel="stylesheet" />
{% endblock %}
{% block breadcrumb %}{% endblock %}
{% block title %}{{ block.super }} | {% trans "Search translations" %}{% endblock %}
{% block body_class %}search project_list{% endblock %}
{% block content_title %}
<h2 class="pagetitle">
{% trans "Search translations" %} {% if translations.count %}<sup>({{ translations.count }})</sup> {% endif %}
</h2>
{% endblock %}
{% block content_main %}
<fieldset>
{% include "search_translation_form.html" %}
</fieldset>
{% autopaginate translations 25 %}
{% if query %}
{% if translations %}
<div class="project_list">
{% for translation in translations %}
{% with translation.language as translation_language %}
{% ifchanged translation_language %}
<h3>
{% blocktrans with source_language as source_language %}{{ source_language }} → {{ translation_language }}{% endblocktrans %}
</h3>
{% endifchanged %}
<div class="entry">
{% with translation.source_entity as source_entity %}
{% highlight terms as source_highlighted %}
{{ source_entity|entity_translation:source_language }}
{% endhighlight %}
<p class="i16 text" title="{% trans "Source string" %}">{{ source_highlighted.highlighted }}</p>
<p class="i16 comment" title="{% trans "Translation" %}">{{ translation.string }}</p>
{% if source_entity.description %}
<p class="long_description"><span>{% trans "Description:"</span>{{ source_entity.string }}</p>
{% endif %}
{% with source_entity.resource as resource %}
<p class="long_description">
<span>{% trans "Location:" %}</span>
<a href="{{ resource.project.get_absolute_url}}">{{ resource.project }}</a> »
<a href="{{ resource.get_absolute_url}}">{{ resource.name }}</a>
</p>
{% endwith %}
{% endwith %}
{% endwith %}
</div>
{% endfor %}
</div>
{% else %}
{% trans "Tough luck! No translations obtained." %}
{% endif %}
{% endif %}
<div class="pagination top">{% paginate %}</div>
{% endblock %}
{% block content_footer %}
{% endblock %}