messages.add_message(
request, messages.SUCCESS,
- "You added the attachment %s!" \
+ _("You added the attachment %s!") \
% (request.form['attachment_name']
or request.files['attachment_file'].filename))
{% block mediagoblin_header_title %}{% endblock %}
<div class="header_right">
{% if request.user %}
- <a href="{{ request.urlgen('mediagoblin.user_pages.user_home', user= request.user.username) }}">{{ request.user.username }}</a>{% trans %}'s account{% endtrans %}
+ {% trans
+ user_url=request.urlgen('mediagoblin.user_pages.user_home',
+ user= request.user.username),
+ user_name=request.user.username -%}
+ <a href="{{ user_url }}">{{ user_name }}</a>'s account
+ {%- endtrans %}
(<a href="{{ request.urlgen('mediagoblin.auth.logout') }}">{% trans %}log out{% endtrans %}</a>)
{% if request.user and request.user.status == 'active' %}
<a class="button_action" href="{{ request.urlgen('mediagoblin.submit.start') }}">{% trans %}Add media{% endtrans %}</a>
</ul>
{% endif %}
- <h2>{% trans %]Add attachment{% endtrans %}</h2>
+ <h2>{% trans %}Add attachment{% endtrans %}</h2>
{{ wtforms_util.render_divs(form) }}
<div class="form_submit_buttons">
- <a href="{{ media.url_for_self(request.urlgen) }}">Cancel</a>
- <input type="submit" value="Save changes" class="button_form" />
+ <a href="{{ media.url_for_self(request.urlgen) }}">
+ {%- trans %}Cancel{% endtrans -%}
+ </a>
+ <input type="submit" value="{% trans %}Save changes{% endtrans %}"
+ class="button_form" />
{{ csrf_token }}
</div>
</div>
</a>
{% if item.note %}
- {%- trans note=item.note -%}
<br />
- <a href="{{ entry_url }}">{{ note }}</a>
- {%- endtrans -%}
+ <a href="{{ entry_url }}">{{ item.note }}</a>
{% endif %}
{% if request.user and
(item.in_collection.creator == request.user._id or
request.user.is_admin) %}
- {%- trans remove_url=request.urlgen(
+ {%- set remove_url=request.urlgen(
'mediagoblin.user_pages.collection_item_confirm_remove',
user=item.in_collection.get_creator.username,
collection=item.in_collection.slug,
collection_item=item.id) -%}
- <br /><a href="{{ remove_url }}" class="remove">(remove)</a>
- {%- endtrans -%}
+ <br />
+ <a href="{{ remove_url }}" class="remove">
+ {%- trans %}(remove){% endtrans -%}
+ </a>
{% endif %}
</td>
{% endfor %}