Skip to content

Commit

Permalink
fix(profile): use custom message when showing recent contributions
Browse files Browse the repository at this point in the history
See #11808
  • Loading branch information
nijel committed Jul 24, 2024
1 parent a7c2507 commit 20a714b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion weblate/templates/accounts/user.html
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ <h3>{{ page_user }}</h3>

<div class="tab-pane active" id="contributed">
<div class="list-group">
{% include "snippets/list-objects.html" with objects=page_user_translations label=_("Translation") show_admin_badge=True name_source="translation" %}
{% include "snippets/list-objects.html" with objects=page_user_translations label=_("Translation") show_admin_badge=True name_source="translation" empty_message=_("No recent contributions found.")%}
<a href="{% url 'user_contributions' user=page_user.username %}" class="btn btn-primary">{% trans "Browse all translations with contribution" %}</a>
</div>
</div>
Expand Down
10 changes: 9 additions & 1 deletion weblate/templates/snippets/list-objects.html
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,15 @@
</tbody>
</table>
{% else %}
<p><em>{% trans "Nothing to list here." %}</em></p>
<p>
<em>
{% if empty_message %}
{{ empty_message }}
{% else %}
{% trans "Nothing to list here." %}
{% endif %}
</em>
</p>

<p>
{% if add_link == "translation" %}
Expand Down

0 comments on commit 20a714b

Please sign in to comment.