{% load i18n %}
{% load permissions %}

{% can_see_git_repository user object.project as user_can_see_git_repository %}

{% with object.project as object %}
{% include "project_info.html" %}
{% endwith %}

<tr>
<th>{% trans "Translation process" %}</th>
<td colspan="2">
<ul>
{% if object.suggestion_voting and object.suggestion_autoaccept %}
<li>{% trans "Translations can be made only through suggesting." %}</li>
<li>{% blocktrans count count=object.suggestion_autoaccept %}Suggestions are automatically accepted as translations once they have {{ count }} vote.{% plural %}Suggestions are automatically accepted as translations once they have {{ count }} votes.{% endblocktrans %}</li>
{% else %}
<li>{% trans "Translations can be made directly." %}</li>
{% endif %}
{% if object.project.enable_acl %}
<li>{% trans "Only selected users can contribute." %}</li>
{% else %}
<li>{% trans "Any authenticated users can contribute." %}</li>
{% endif %}
</ul>
</td>


{% if object.license %}
<tr>
<th>{% trans "Translation license" %}</th>
<td colspan="2">
{% if object.license_url %}
<a href="{{ object.license_url }}">{{ object.license }}</a>
{% else %}
{{ object.license }}
{% endif %}
</td>
</tr>
{% endif %}

{% if user_can_see_git_repository %}
<tr>
<th>{% trans "Repository" %}</th>
<td colspan="2">
<code class="git-repo ui-corner-all">{{ object.get_repo_url }}</code>
</td>
</tr>

<tr>
<th>{% trans "Repository branch" %}</th>
<td colspan="2">
{{ object.get_repo_branch }}
{% with object.get_last_remote_commit as commit %}
{% include "git-commit-info.html" %}
{% endwith %}
</td>
</tr>

{% with object.get_export_url as export_url %}
{% if export_url %}
<tr>
<th>{% trans "Repository with Weblate translations" %}</th>
<td colspan="2"><code class="git-repo ui-corner-all">{{ export_url }}</code></td>
</tr>
{% endif %}
{% endwith %}
{% endif %}
