Remove "translation legos" and linkify the tag to more generic tag listing

By "translation legos" I mean having multiple strings to be translated
appended together.  This isn't a good idea because you can't assume
that syntax will work together in the same way in another language, so
you may be making things hard or impossible for translators.

Between this and the last commit, this means that tags now link to
user tagged media specifically, and if people want a more general tag
listing, they can click on the tag link to get to a more general
listing.  I feel this is a good and intuitive route to handling this.

This sponsored commit brought to you by Debarshi Ray!  Thank you!
This commit is contained in:
Christopher Allan Webber 2013-02-21 16:29:16 -06:00
parent 631784a2d7
commit b9d1d13743

View File

@ -34,13 +34,24 @@
{% block mediagoblin_content -%}
<h1>
{% if tag %}
{%- trans username=user.username,
user_url=request.urlgen(
'mediagoblin.user_pages.user_home',
user=user.username),
tag_url=request.urlgen(
'mediagoblin.listings.tags_listing',
tag=tag) -%}
<a href="{{ user_url }}">{{ username }}</a>'s media with tag <a href="{{ tag_url }}">{{ tag }}</a>
{%- endtrans %}
{% else %}
{%- trans username=user.username,
user_url=request.urlgen(
'mediagoblin.user_pages.user_home',
user=user.username) -%}
<a href="{{ user_url }}">{{ username }}</a>'s media
{%- endtrans %}{% if tag %}{% trans %} with tag '{{tag}}'{% endtrans %}
{%- endif %}
{%- endtrans %}
{% endif %}
</h1>
{{ object_gallery(request, media_entries, pagination) }}