Factor out basic info

This commit is contained in:
Michal Čihař 2012-02-28 13:17:56 +01:00
parent 2a6e6a571c
commit 3c9a61f3bb
6 changed files with 27 additions and 23 deletions

View File

@ -3,11 +3,7 @@
{% block content %}
<h2>{% trans "Project Information" %}</h2>
<p>{% trans "Project website:" %} <a href="{{ object.web }}">{{ object.web }}</a></p>
<p>{% trans "Mailing list for translators:" %} <a href="mailto:{{ object.mail }}">{{ object.mail }}</a></p>
<p>{% trans "Instructions for translators:" %} <a href="{{ object.instructions }}">{{ object.instructions }}</a></p>
{% include "project_info.html" %}
<h2>{% trans "Subprojects" %}</h2>

7
html/project_info.html Normal file
View File

@ -0,0 +1,7 @@
{% load i18n %}
<h2>{% trans "Project Information" %}</h2>
<p>{% trans "Project website:" %} <a href="{{ object.web }}">{{ object.web }}</a></p>
<p>{% trans "Mailing list for translators:" %} <a href="mailto:{{ object.mail }}">{{ object.mail }}</a></p>
<p>{% trans "Instructions for translators:" %} <a href="{{ object.instructions }}">{{ object.instructions }}</a></p>

View File

@ -2,12 +2,7 @@
{% load i18n %}
{% block content %}
<h2>{% trans "Project Information" %}</h2>
<p>{% trans "Project website:" %} <a href="{{ object.project.web }}">{{ object.project.web }}</a></p>
<p>{% trans "Mailing list for translators:" %} <a href="mailto:{{ object.project.mail }}">{{ object.project.mail }}</a></p>
<p>{% trans "Instructions for translators:" %} <a href="{{ object.project.instructions }}">{{ object.project.instructions }}</a></p>
<p>{% trans "Git repository:" %} <code>{{ object.repo }}</code> ({% blocktrans with object.branch as branch %}{{ branch }} brach{% endblocktrans %})</p>
{% include "subproject_info.html" %}
<h2>{% trans "Translations" %}</h2>

View File

@ -0,0 +1,6 @@
{% load i18n %}
{% with object.project as object %}
{% include "project_info.html" %}
{% endwith %}
<p>{% trans "Git repository:" %} <code>{{ object.repo }}</code> ({% blocktrans with object.branch as branch %}{{ branch }} brach{% endblocktrans %})</p>

View File

@ -3,18 +3,7 @@
{% block content %}
<h2>{% trans "Project Information" %}</h2>
<p>{% trans "Project website:" %} <a href="{{ object.subproject.project.web }}">{{ object.subproject.project.web }}</a></p>
<p>{% trans "Mailing list for translators:" %} <a href="mailto:{{ object.subproject.project.mail }}">{{ object.subproject.project.mail }}</a></p>
<p>{% trans "Instructions for translators:" %} <a href="{{ object.subproject.project.instructions }}">{{ object.subproject.project.instructions }}</a></p>
<p>{% trans "Git repository:" %} <code>{{ object.subproject.repo }}</code> ({% blocktrans with object.subproject.branch as branch %}{{ branch }} brach{% endblocktrans %})</p>
<p>
{% blocktrans with object.unit_set.all.count as count and object.translated as translated and object.fuzzy as fuzzy %}
There are {{ count }} strings, out of which {{ translated }}% is translated
and {{ fuzzy }}% is fuzzy.
{% endblocktrans %}
</p>
{% include "translation_info.html" %}
{% endblock %}

View File

@ -0,0 +1,11 @@
{% load i18n %}
{% with object.subproject as object %}
{% include "subproject_info.html" %}
{% endwith %}
<p>
{% blocktrans with object.unit_set.all.count as count and object.translated as translated and object.fuzzy as fuzzy %}
There are {{ count }} strings, out of which {{ translated }}% is translated
and {{ fuzzy }}% is fuzzy.
{% endblocktrans %}
</p>