Skip to content

Commit

Permalink
Show button to start new translation always
Browse files Browse the repository at this point in the history
Show it even if the user does not have permission, as that still gives
indication that the option is there (especially for not authenticated
users).

Fixes #1950

Signed-off-by: Michal Čihař <michal@cihar.com>
  • Loading branch information
nijel committed May 21, 2018
1 parent fb68df8 commit 02cbef3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion weblate/templates/component.html
Expand Up @@ -110,9 +110,13 @@
{% include "list-translations.html" %}
<p>{% include "legend.html" %}</p>

{% if object.can_add_language and user_can_add_translation %}
{% if object.can_add_language %}
<p>
{% if user_can_add_translation %}
<a class="btn btn-default" href="{% url "new-language" project=object.project.slug component=object.slug %}">{% trans "Start new translation" %}</a>
{% else %}
<button disabled="disabled" class="btn btn-default text-tooltip" title="{% if user.is_authenticated %}{% trans "You don't have permission to start new translation" %}{% else %}{% trans "Please login to start new translation "%}{% endif %}">{% trans "Start new translation" %}</button>
{% endif %}
</p>
{% endif %}

Expand Down

0 comments on commit 02cbef3

Please sign in to comment.