From b9d1d13743ce58d293b1670b8884f86f64aae3b7 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Thu, 21 Feb 2013 16:29:16 -0600 Subject: [PATCH] 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! --- .../mediagoblin/user_pages/gallery.html | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/mediagoblin/templates/mediagoblin/user_pages/gallery.html b/mediagoblin/templates/mediagoblin/user_pages/gallery.html index 097cec54..f23bb156 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/gallery.html +++ b/mediagoblin/templates/mediagoblin/user_pages/gallery.html @@ -34,13 +34,24 @@ {% block mediagoblin_content -%}

- {%- trans username=user.username, - user_url=request.urlgen( - 'mediagoblin.user_pages.user_home', - user=user.username) -%} - {{ username }}'s media - {%- endtrans %}{% if tag %}{% trans %} with tag '{{tag}}'{% endtrans %} - {%- endif %} + {% 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) -%} + {{ username }}'s media with tag {{ tag }} + {%- endtrans %} + {% else %} + {%- trans username=user.username, + user_url=request.urlgen( + 'mediagoblin.user_pages.user_home', + user=user.username) -%} + {{ username }}'s media + {%- endtrans %} + {% endif %}

{{ object_gallery(request, media_entries, pagination) }}