From 0b1fcaebf5954bc1cc672145b1411b499ebb1bf7 Mon Sep 17 00:00:00 2001 From: tilly-Q Date: Tue, 8 Oct 2013 18:42:59 -0400 Subject: This was a quick update to clean up some of my templates and fix the formatting in some of my other bits of code. In migrations.py, I clarified the comments & fixed the code to stay within 80 columns. In each of the templates, I fixed the spacing as well to stay within 80 columns and I also corrected my improper uses of the trans tag to ensure that these pages can be translated correctly. --- mediagoblin/templates/mediagoblin/banned.html | 2 +- mediagoblin/templates/mediagoblin/base.html | 4 ++- .../templates/mediagoblin/moderation/report.html | 21 ++++++++++----- .../mediagoblin/moderation/report_panel.html | 6 +++-- .../templates/mediagoblin/moderation/user.html | 30 +++++++++++++++------- 5 files changed, 43 insertions(+), 20 deletions(-) (limited to 'mediagoblin/templates') diff --git a/mediagoblin/templates/mediagoblin/banned.html b/mediagoblin/templates/mediagoblin/banned.html index cd54158a..0b5a6884 100644 --- a/mediagoblin/templates/mediagoblin/banned.html +++ b/mediagoblin/templates/mediagoblin/banned.html @@ -25,7 +25,7 @@

{% trans %}You have been banned{% endtrans %} {% if expiration_date %} - {% trans %}until{% endtrans %} {{ expiration_date }} + {% trans until_when=expiration_date %}until {{ until_when }}{% endtrans %} {% else %} {% trans %}indefinitely{% endtrans %} {% endif %} diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html index 94ca7aa5..6394fa4f 100644 --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@ -62,7 +62,9 @@ {% block mediagoblin_header_title %}{% endblock %}
{%- if request.user %} - {% if request.user and request.user.has_privilege('active') and not request.user.is_banned() %} + {% if request.user and + request.user.has_privilege('active') and + not request.user.is_banned() %} {% set notification_count = get_notification_count(request.user.id) %} {% if notification_count %} diff --git a/mediagoblin/templates/mediagoblin/moderation/report.html b/mediagoblin/templates/mediagoblin/moderation/report.html index cb717cde..b05992b7 100644 --- a/mediagoblin/templates/mediagoblin/moderation/report.html +++ b/mediagoblin/templates/mediagoblin/moderation/report.html @@ -18,12 +18,13 @@ {%- extends "mediagoblin/base.html" %} {% import "/mediagoblin/utils/wtforms.html" as wtforms_util %} {%- block mediagoblin_head %} - + {% endblock %} {%- block mediagoblin_content %} {% if not report %} - Sorry, no such report found. + {% trans %}Sorry, no such report found.{% endtrans %} {% else %}
- {% if not report.is_archived_report() and not (report.reported_user.has_privilege('admin') and not request.user.has_privilege('admin')) %} - + {% if not report.is_archived_report() and + not (report.reported_user.has_privilege('admin') and + not request.user.has_privilege('admin')) %} +
{{ wtforms_util.render_divs(form) }} {{ csrf_token }} - +
+ {% endblock %} {% block mediagoblin_content -%} @@ -58,9 +59,11 @@

{%- trans username=user.username %}{{ username }}'s profile{% endtrans -%} {% if user_banned and user_banned.expiration_date %} - — BANNED until {{ user_banned.expiration_date }} + — {% trans expiration_date=user_banned.expiration_date %} + BANNED until {{ expiration_date }} + {% endtrans %} {% elif user_banned %} - — Banned Indefinitely + — {% trans %}Banned Indefinitely{% endtrans %} {% endif %}

{% if not user.url and not user.bio %} @@ -90,7 +93,11 @@ {% endif %} {% if user %} -

{%- trans %}Active Reports on {% endtrans -%}{{ user.username }}

+

+ {%- trans username=user.username %} + Active Reports on {{ username }} + {% endtrans -%} +

{% if reports.count() %} @@ -104,7 +111,9 @@ - {%- trans %}Report #{% endtrans -%}{{ report.id }} + {%- trans report_number=report.id %} + Report #{{ report_number }} + {% endtrans -%}
@@ -122,7 +131,9 @@
{% else %} - {%- trans %}No active reports filed on {% endtrans -%} {{ user.username }} + {%- trans + username=user.username %}No active reports filed on {{ username }} + {% endtrans -%} {% endif %} {%- trans - username=user.username %}All reports that {{ username }} has filed{% endtrans %} + username=user.username %}All reports that {{ username }} has filed + {% endtrans %}

{{ user.username }}'s Privileges

@@ -166,9 +178,9 @@ {{ privilege.privilege_name }} {% if privilege in user.all_privileges %} - Yes{% else %} + {% trans %}Yes{% endtrans %}{% else %} - No{% endif %} + {% trans %}No{% endtrans %}{% endif %} {% if request.user.has_privilege('admin') %} -- cgit v1.2.3