2012-02-28 15:00:42 +01:00
{% extends "base.html" %}
2012-03-05 16:38:04 +01:00
{% load url from future %}
2012-02-28 15:00:42 +01:00
{% load i18n %}
2012-03-01 11:11:25 +01:00
{% load weblate %}
2012-02-28 15:00:42 +01:00
2012-03-01 10:22:20 +01:00
{% 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 >
2012-03-02 15:29:58 +01:00
< li > < a href = "{{ unit.translation.get_absolute_url }}" > {% trans unit.translation.language.name %}< / a > < / li >
2012-03-01 10:46:50 +01:00
< li > < a href = "{{ unit.translation.get_translate_url }}" > {% trans "translate" %}< / a > < / li >
2012-03-01 10:22:20 +01:00
{% endblock %}
2012-02-28 15:00:42 +01:00
{% block content %}
2012-02-28 15:09:03 +01:00
< h2 > {% trans "Translate" %}< / h2 >
2012-03-02 16:55:51 +01:00
< p > {% blocktrans with unit.position as position %}Showing string {{ position }} out of {{ total }}.{% endblocktrans %}
2012-03-02 17:02:58 +01:00
< span class = "navi" >
2012-03-06 13:41:19 +01:00
< a class = "button-first" href = "{{ unit.translation.get_translate_url }}?type={{ type }}&oldpos=1&dir=stay{{ search_url }}" > {% trans "First" %}< / a >
< a class = "button-prev" href = "{{ unit.translation.get_translate_url }}?type={{ type }}&oldpos={{ unit.position }}&dir=back{{ search_url }}" > {% trans "Previous" %}< / a >
< a class = "button-next" href = "{{ unit.translation.get_translate_url }}?type={{ type }}&oldpos={{ unit.position }}{{ search_url }}" > {% trans "Next" %}< / a >
< a class = "button-end" href = "{{ unit.translation.get_translate_url }}?type={{ type }}&oldpos={{ total }}&dir=stay{{ search_url }}" > {% trans "Last" %}< / a >
2012-03-02 17:02:58 +01:00
< / span >
2012-03-02 16:55:51 +01:00
< / p >
2012-02-28 15:00:42 +01:00
2012-03-06 14:55:47 +01:00
{% if search_query %}
2012-03-06 13:41:19 +01:00
< p > {% blocktrans %}Searching for "{{ search_query }}".{% endblocktrans %}< / p >
2012-03-06 14:55:47 +01:00
{% endif %}
2012-03-06 13:41:19 +01:00
2012-02-28 15:40:08 +01:00
< form action = "{{ unit.translation.get_translate_url }}" method = "post" >
{% csrf_token %}
< input type = "hidden" name = "type" value = "{{ type }}" / >
2012-02-28 15:40:51 +01:00
< input type = "hidden" name = "oldpos" value = "{{ unit.position }}" / >
2012-03-06 13:41:19 +01:00
< 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 }}" / >
2012-02-28 15:54:04 +01:00
< table class = "translator" >
2012-03-01 16:21:53 +01:00
< tr >
< th class = "source" > {% trans "Source" %}< / th >
2012-03-01 16:25:05 +01:00
< td class = "translatetext" > {{ unit.source|fmttranslation }}< / td >
2012-03-01 16:21:53 +01:00
< / tr >
2012-03-06 13:43:37 +01:00
{% if unit.context %}
< tr >
< th > {% trans "Context" %}< / th >
< td > {{ unit.context }}< / td >
< / tr >
{% endif %}
2012-03-06 13:44:45 +01:00
{% if unit.comment %}
< tr >
< th > {% trans "Comments" %}< / th >
< td > {{ unit.comment }}< / td >
< / tr >
{% endif %}
2012-03-01 16:21:53 +01:00
< tr >
2012-03-02 16:01:53 +01:00
< td > < / td >
< td > < a href = "#" id = "copy-text" > {% trans "Copy" %}< / td >
< / tr >
< tr >
2012-03-01 16:25:05 +01:00
< th > {% if unit.is_plural %}{% trans "Translations" %}{% else %}{% trans "Translation" %}{% endif %}< / th >
< td class = "translator" >
2012-02-29 11:41:08 +01:00
{{ form.checksum }}
{{ form.target }}
< br / >
{{ form.fuzzy }}< label for = "id_fuzzy" > {% trans "Fuzzy" %}< / label >
< / td > < / tr >
2012-03-01 11:01:48 +01:00
{% with unit.suggestions as suggestions %}
{% if suggestions %}
2012-03-01 16:28:17 +01:00
< tr >
< th > {% trans "Suggestions" %}< / th >
< td class = "suggestions" >
2012-03-01 11:28:51 +01:00
< table >
2012-03-01 11:01:48 +01:00
{% for suggestion in suggestions %}
2012-03-01 11:28:51 +01:00
< tr > < td class = "translatetext" > {{ suggestion.target|fmttranslation }}< / td > < / tr >
2012-03-01 11:31:52 +01:00
< tr > < td >
2012-03-05 10:45:58 +01:00
{% if suggestion.user %}
2012-03-01 11:31:52 +01:00
{% blocktrans with suggestion.user.get_full_name as user %}Suggested by {{ user }}{% endblocktrans %}
2012-03-05 10:45:58 +01:00
{% else %}
{% trans "Suggested by anonymous user" %}
{% endif %}
2012-03-05 10:45:01 +01:00
{% if user.is_authenticated %}
2012-03-01 11:31:52 +01:00
< div class = "suggestionactions" >
2012-03-06 13:41:19 +01:00
< a href = "{{ suggestion.get_translate_url }}?type={{ type }}&oldpos={{ unit.position }}&accept={{ suggestion.id }}{{ search_url }}" class = "sug-accept" > Accept< / a >
< a href = "{{ suggestion.get_translate_url }}?type={{ type }}&oldpos={{ unit.position }}&delete={{ suggestion.id }}{{ search_url }}" class = "sug-delete" > Delete< / a >
2012-03-01 11:31:52 +01:00
< / div >
2012-03-05 10:45:01 +01:00
{% endif %}
2012-03-01 11:31:52 +01:00
< / td >
2012-03-01 11:01:48 +01:00
{% endfor %}
2012-03-01 11:28:51 +01:00
< / table >
2012-03-01 16:28:17 +01:00
< / td >
< / tr >
2012-03-01 11:01:48 +01:00
{% endif %}
{% endwith %}
2012-03-05 14:33:11 +01:00
{% if unit.location %}
2012-03-01 16:28:17 +01:00
< tr >
< th > {% trans "Used in" %}< / th >
< td > {{ unit.get_location_links }}< / td >
2012-03-01 11:01:48 +01:00
< / tr >
2012-03-05 14:33:11 +01:00
{% endif %}
2012-03-05 14:33:57 +01:00
{% if unit.flags %}
2012-03-01 16:42:36 +01:00
< tr >
< th > {% trans "Flags" %}< / th >
< td > {{ unit.flags }}< / td >
< / tr >
2012-03-05 14:33:57 +01:00
{% endif %}
2012-03-02 16:55:51 +01:00
< tr > < td > < / td > < td >
2012-02-29 14:50:50 +01:00
{% if user.is_authenticated %}
2012-02-29 14:46:18 +01:00
< input class = "button" type = "submit" value = "{% trans " Save " % } " name = "save" / >
2012-02-29 14:52:09 +01:00
{% else %}
2012-03-05 16:38:04 +01:00
{% 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 %}
2012-02-29 14:50:50 +01:00
{% endif %}
2012-02-29 14:46:18 +01:00
< input class = "button" type = "submit" value = "{% trans " Suggest " % } " name = "suggest" / >
2012-02-29 13:19:02 +01:00
< / td > < / tr >
2012-02-28 15:54:04 +01:00
< / table >
2012-02-28 15:40:08 +01:00
< / form >
2012-03-05 14:36:12 +01:00
{% include "translation_info.html" %}
2012-02-28 15:00:42 +01:00
{% endblock %}