xmpp.chapril.org-conversejs/html/translate.html
2012-03-06 13:44:45 +01:00

125 lines
4.3 KiB
HTML

{% extends "base.html" %}
{% load url from future %}
{% load i18n %}
{% load weblate %}
{% block breadcums %}
<li><a href="{{ unit.translation.subproject.project.get_absolute_url }}">{{ unit.translation.subproject.project }}</a></li>
<li><a href="{{ unit.translation.subproject.get_absolute_url }}">{{ unit.translation.subproject.name }}</a></li>
<li><a href="{{ unit.translation.get_absolute_url }}">{% trans unit.translation.language.name %}</a></li>
<li><a href="{{ unit.translation.get_translate_url }}">{% trans "translate" %}</a></li>
{% endblock %}
{% block content %}
<h2>{% trans "Translate" %}</h2>
<p>{% blocktrans with unit.position as position %}Showing string {{ position }} out of {{ total }}.{% endblocktrans %}
<span class="navi">
<a class="button-first" href="{{ unit.translation.get_translate_url }}?type={{ type }}&amp;oldpos=1&amp;dir=stay{{ search_url }}">{% trans "First" %}</a>
<a class="button-prev" href="{{ unit.translation.get_translate_url }}?type={{ type }}&amp;oldpos={{ unit.position }}&amp;dir=back{{ search_url }}">{% trans "Previous" %}</a>
<a class="button-next" href="{{ unit.translation.get_translate_url }}?type={{ type }}&amp;oldpos={{ unit.position }}{{ search_url }}">{% trans "Next" %}</a>
<a class="button-end" href="{{ unit.translation.get_translate_url }}?type={{ type }}&amp;oldpos={{ total }}&amp;dir=stay{{ search_url }}">{% trans "Last" %}</a>
</span>
</p>
<p>{% blocktrans %}Searching for "{{ search_query }}".{% endblocktrans %}</p>
<form action="{{ unit.translation.get_translate_url }}" method="post">
{% csrf_token %}
<input type="hidden" name="type" value="{{ type }}" />
<input type="hidden" name="oldpos" value="{{ unit.position }}" />
<input type="hidden" name="q" value="{{ search_query }}" />
<input type="hidden" name="src" value="{{ search_source }}" />
<input type="hidden" name="tgt" value="{{ search_target }}" />
<input type="hidden" name="ctx" value="{{ search_context }}" />
<table class="translator">
<tr>
<th class="source">{% trans "Source" %}</th>
<td class="translatetext">{{ unit.source|fmttranslation }}</td>
</tr>
{% if unit.context %}
<tr>
<th>{% trans "Context" %}</th>
<td>{{ unit.context }}</td>
</tr>
{% endif %}
{% if unit.comment %}
<tr>
<th>{% trans "Comments" %}</th>
<td>{{ unit.comment }}</td>
</tr>
{% endif %}
<tr>
<td></td>
<td><a href="#" id="copy-text">{% trans "Copy" %}</td>
</tr>
<tr>
<th>{% if unit.is_plural %}{% trans "Translations" %}{% else %}{% trans "Translation" %}{% endif %}</th>
<td class="translator">
{{ form.checksum }}
{{ form.target }}
<br />
{{ form.fuzzy }}<label for="id_fuzzy">{% trans "Fuzzy" %}</label>
</td></tr>
{% with unit.suggestions as suggestions %}
{% if suggestions %}
<tr>
<th>{% trans "Suggestions" %}</th>
<td class="suggestions">
<table>
{% for suggestion in suggestions %}
<tr><td class="translatetext">{{ suggestion.target|fmttranslation }}</td></tr>
<tr><td>
{% if suggestion.user %}
{% blocktrans with suggestion.user.get_full_name as user %}Suggested by {{ user }}{% endblocktrans %}
{% else %}
{% trans "Suggested by anonymous user" %}
{% endif %}
{% if user.is_authenticated %}
<div class="suggestionactions">
<a href="{{ suggestion.get_translate_url }}?type={{ type }}&amp;oldpos={{ unit.position }}&amp;accept={{ suggestion.id }}{{ search_url }}" class="sug-accept">Accept</a>
<a href="{{ suggestion.get_translate_url }}?type={{ type }}&amp;oldpos={{ unit.position }}&amp;delete={{ suggestion.id }}{{ search_url }}" class="sug-delete">Delete</a>
</div>
{% endif %}
</td>
{% endfor %}
</table>
</td>
</tr>
{% endif %}
{% endwith %}
{% if unit.location %}
<tr>
<th>{% trans "Used in" %}</th>
<td>{{ unit.get_location_links }}</td>
</tr>
{% endif %}
{% if unit.flags %}
<tr>
<th>{% trans "Flags" %}</th>
<td>{{ unit.flags }}</td>
</tr>
{% endif %}
<tr><td></td><td>
{% if user.is_authenticated %}
<input class="button" type="submit" value="{% trans "Save" %}" name="save" />
{% else %}
{% url 'django.contrib.auth.views.login' as login_url %}
{% with unit.translation.get_translate_url as translate_url %}
{% blocktrans %}<a href="{{ login_url }}?next={{ translate_url }}">Login</a> for saving translations.{% endblocktrans %}
{% endwith %}
{% endif %}
<input class="button" type="submit" value="{% trans "Suggest" %}" name="suggest" />
</td></tr>
</table>
</form>
{% include "translation_info.html" %}
{% endblock %}