From aaa46f5a156093c4295e4cb0d85eae72e28468ea Mon Sep 17 00:00:00 2001 From: Jef van Schendel Date: Tue, 2 Aug 2011 21:17:30 +0200 Subject: [PATCH 01/11] Sidebar changes: correct tags header to be

, show action buttons header only to owner --- mediagoblin/templates/mediagoblin/user_pages/media.html | 5 +---- mediagoblin/templates/mediagoblin/utils/tags.html | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index a1382518..ddcf3ce9 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -103,11 +103,9 @@
{% include "mediagoblin/utils/prev_next.html" %} -

Sidebar content here!

- -

{% if media['uploader'] == request.user['_id'] or request.user['is_admin'] %} +

Temporary button holder

delete

{% endif %} -

{% if media.tags %} {% include "mediagoblin/utils/tags.html" %} diff --git a/mediagoblin/templates/mediagoblin/utils/tags.html b/mediagoblin/templates/mediagoblin/utils/tags.html index ade41944..32db6e31 100644 --- a/mediagoblin/templates/mediagoblin/utils/tags.html +++ b/mediagoblin/templates/mediagoblin/utils/tags.html @@ -17,7 +17,7 @@ #} {% block tags_content -%} -

Tags

+

Tags

@@ -85,7 +85,7 @@ {% block mediagoblin_footer %}
{% endblock %} diff --git a/mediagoblin/templates/mediagoblin/edit/edit.html b/mediagoblin/templates/mediagoblin/edit/edit.html index d19034cb..3dc170c8 100644 --- a/mediagoblin/templates/mediagoblin/edit/edit.html +++ b/mediagoblin/templates/mediagoblin/edit/edit.html @@ -26,15 +26,15 @@ media= media._id) }}" method="POST" enctype="multipart/form-data">
-

Editing {{ media.title }}

+

{% trans media_title=media.title %}Editing {{ media_title }}{% endtrans %}

{{ wtforms_util.render_divs(form) }}
diff --git a/mediagoblin/templates/mediagoblin/edit/edit_profile.html b/mediagoblin/templates/mediagoblin/edit/edit_profile.html index a11b86d7..4171cb4d 100644 --- a/mediagoblin/templates/mediagoblin/edit/edit_profile.html +++ b/mediagoblin/templates/mediagoblin/edit/edit_profile.html @@ -25,10 +25,10 @@ user['username'] }}" method="POST" enctype="multipart/form-data">
-

Editing {{ user['username'] }}'s profile

+

{% trans username=user['username'] %}Editing {{ username }}'s profile{% endtrans %}

{{ wtforms_util.render_divs(form) }}
- +
diff --git a/mediagoblin/templates/mediagoblin/listings/tag.html b/mediagoblin/templates/mediagoblin/listings/tag.html index 6f10ec8d..18123dbd 100644 --- a/mediagoblin/templates/mediagoblin/listings/tag.html +++ b/mediagoblin/templates/mediagoblin/listings/tag.html @@ -26,7 +26,7 @@ {% block mediagoblin_content -%}

- Media tagged with: {{ tag_name }} + {% trans %}Media tagged with:{% endtrans %} {{ tag_name }}

From 58b79b159e15335a0d8c82ba329543088cabfd49 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Mon, 8 Aug 2011 10:19:21 -0500 Subject: [PATCH 10/11] Just some indentation changes to the templates because I'm picky about such things :) --- .../templates/mediagoblin/auth/login.html | 19 ++++--- .../templates/mediagoblin/auth/register.html | 2 +- .../mediagoblin/auth/verification_email.txt | 8 +-- mediagoblin/templates/mediagoblin/base.html | 4 +- .../mediagoblin/edit/edit_profile.html | 6 ++- .../templates/mediagoblin/listings/tag.html | 4 +- mediagoblin/templates/mediagoblin/root.html | 15 +++--- .../mediagoblin/user_pages/gallery.html | 18 ++++--- .../mediagoblin/user_pages/media.html | 16 +++--- .../mediagoblin/user_pages/user.html | 50 +++++++++++-------- 10 files changed, 88 insertions(+), 54 deletions(-) diff --git a/mediagoblin/templates/mediagoblin/auth/login.html b/mediagoblin/templates/mediagoblin/auth/login.html index 8b1e2296..5750feb0 100644 --- a/mediagoblin/templates/mediagoblin/auth/login.html +++ b/mediagoblin/templates/mediagoblin/auth/login.html @@ -25,9 +25,11 @@

{% trans %}Log in{% endtrans %}

{% if login_failed %} -
{% trans %}Login failed!{% - endtrans %}
{% endif %} {{ - wtforms_util.render_divs(login_form) }} +
+ {% trans %}Login failed!{% endtrans %} +
+ {% endif %} + {{ wtforms_util.render_divs(login_form) }}
@@ -36,10 +38,13 @@ style="display: none;"/> {% endif %} {% if allow_registration %} -

{% trans %}Don't have an account yet?{% endtrans - %}
{% trans %}Create one here!{% endtrans %}

{% endif - %} +

+ {% trans %}Don't have an account yet?{% endtrans %} +
+ + {%- trans %}Create one here!{% endtrans %} +

+ {% endif %}
{% endblock %} diff --git a/mediagoblin/templates/mediagoblin/auth/register.html b/mediagoblin/templates/mediagoblin/auth/register.html index 5d512829..623cbdfd 100644 --- a/mediagoblin/templates/mediagoblin/auth/register.html +++ b/mediagoblin/templates/mediagoblin/auth/register.html @@ -28,7 +28,7 @@ {{ wtforms_util.render_divs(register_form) }}
+ class="button" />
diff --git a/mediagoblin/templates/mediagoblin/auth/verification_email.txt b/mediagoblin/templates/mediagoblin/auth/verification_email.txt index cb01600d..32053101 100644 --- a/mediagoblin/templates/mediagoblin/auth/verification_email.txt +++ b/mediagoblin/templates/mediagoblin/auth/verification_email.txt @@ -14,11 +14,13 @@ # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . -#} +-#} -{% trans username=username, verification_url=verification_url %}Hi {{ username }}, +{% trans username=username, verification_url=verification_url|safe -%} +Hi {{ username }}, to activate your GNU MediaGoblin account, open the following URL in your web browser: -{{ verification_url|safe }}{% endtrans %} +{{ verification_url }} +{%- endtrans %} diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html index b9c98ef6..986e0995 100644 --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@ -85,7 +85,9 @@ {% block mediagoblin_footer %}
{% endblock %} diff --git a/mediagoblin/templates/mediagoblin/edit/edit_profile.html b/mediagoblin/templates/mediagoblin/edit/edit_profile.html index 4171cb4d..534e5f20 100644 --- a/mediagoblin/templates/mediagoblin/edit/edit_profile.html +++ b/mediagoblin/templates/mediagoblin/edit/edit_profile.html @@ -25,7 +25,11 @@ user['username'] }}" method="POST" enctype="multipart/form-data">
-

{% trans username=user['username'] %}Editing {{ username }}'s profile{% endtrans %}

+

+ {%- trans username=user['username'] -%} + Editing {{ username }}'s profile + {%- endtrans %} +

{{ wtforms_util.render_divs(form) }}
diff --git a/mediagoblin/templates/mediagoblin/listings/tag.html b/mediagoblin/templates/mediagoblin/listings/tag.html index 18123dbd..a013797f 100644 --- a/mediagoblin/templates/mediagoblin/listings/tag.html +++ b/mediagoblin/templates/mediagoblin/listings/tag.html @@ -36,6 +36,8 @@
{% trans %}atom feed{% endtrans %} + tag=tag_slug) }}"> + {%- trans %}atom feed{% endtrans -%} +
{% endblock %} diff --git a/mediagoblin/templates/mediagoblin/root.html b/mediagoblin/templates/mediagoblin/root.html index 3570374e..a4e19984 100644 --- a/mediagoblin/templates/mediagoblin/root.html +++ b/mediagoblin/templates/mediagoblin/root.html @@ -22,18 +22,21 @@ {% if request.user %}

- {% trans %}Submit an item{% endtrans %} + + {%- trans %}Submit an item{% endtrans -%} +

{% else %}

- {% trans login_url=request.urlgen('mediagoblin.auth.login') %}If you have an account, you can - Login.{% endtrans %} + {% trans login_url=request.urlgen('mediagoblin.auth.login') -%} + If you have an account, you can Login. + {%- endtrans %}

{% if allow_registration %}

- {% trans - register_url=request.urlgen('mediagoblin.auth.register') %}If you don't have an account, please - Register.{% endtrans %} + {% trans register_url=request.urlgen('mediagoblin.auth.register') -%} + If you don't have an account, please Register. + {%- endtrans %}

{% endif %} {% endif %} diff --git a/mediagoblin/templates/mediagoblin/user_pages/gallery.html b/mediagoblin/templates/mediagoblin/user_pages/gallery.html index 71f14da4..a66a547e 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/gallery.html +++ b/mediagoblin/templates/mediagoblin/user_pages/gallery.html @@ -27,20 +27,24 @@ {% block mediagoblin_content -%} {% if user %}

- {% trans - username=user.username %}{{ username }}'s - media{% endtrans %}

+ {%- trans username=user.username, + user_url=request.urlgen( + 'mediagoblin.user_pages.user_home', + user=user.username) -%} + {{ username }}'s media + {%- endtrans %} +
{% else %} {# This *should* not occur as the view makes sure we pass in a user. #} diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 2acf7a3d..afc0d903 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -38,13 +38,15 @@ {% endautoescape %}

- {% trans date="%4d-%02d-%02d"|format(media.created.year, - media.created.month, media.created.day), user_url= - request.urlgen('mediagoblin.user_pages.user_home',user= - media.uploader().username), - username=media.uploader().username %} - — uploaded on {{ date }} by {{ username }}{% endtrans %} + {% trans date="%4d-%02d-%02d"|format( + media.created.year, + media.created.month, media.created.day), + user_url=request.urlgen( + 'mediagoblin.user_pages.user_home', + user=media.uploader().username), + username=media.uploader().username -%} + — uploaded on {{ date }} by {{ username }} + {%- endtrans %}


diff --git a/mediagoblin/templates/mediagoblin/user_pages/user.html b/mediagoblin/templates/mediagoblin/user_pages/user.html index c3ad07db..1115fc56 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/user.html +++ b/mediagoblin/templates/mediagoblin/user_pages/user.html @@ -36,11 +36,15 @@

{% trans %}Verification needed{% endtrans %}

-

{% trans %}Almost done! Your account still needs to be - verified.{% endtrans %}

- {% trans %}An email should arrive in a few moments with - instructions on how to do so.{% endtrans %} + {% trans -%} + Almost done! Your account still needs to be verified. + {%- endtrans %} +

+

+ {% trans -%} + An email should arrive in a few moments with instructions on how to do so. + {%- endtrans %}

{% trans %}In case it doesn't:{% endtrans %}

@@ -53,30 +57,32 @@

{% trans %}Verification needed{% endtrans %}

- {% trans %}Someone has registered an account with this - username, but it still has to be verified.{% endtrans %} + {% trans -%} + Someone has registered an account with this username, but it still has to be verified. + {%- endtrans %}

- {% trans login_url=request.urlgen('mediagoblin.auth.login') - %}If you are that person but you've lost your verification - email, you can - log in and resend it.{% - endtrans %} + {% trans login_url=request.urlgen('mediagoblin.auth.login') -%} + If you are that person but you've lost your verification email, you can log in and resend it. + {%- endtrans %}

{% endif %} {# Active(?) (or at least verified at some point) user, horray! #} {% else %} -

{% trans username=user.username %}{{ username }}'s profile{% - endtrans %}

+

+ {%- trans username=user.username %}{{ username }}'s profile{% endtrans -%} +

{% include "mediagoblin/utils/profile.html" %} {% if request.user['_id'] == user['_id'] or request.user['is_admin'] %} {% trans %}Edit profile{% endtrans %} + user.username }}"> + {%- trans %}Edit profile{% endtrans -%} + {% endif %}
@@ -84,12 +90,16 @@ {% set pagination_base_url = user_gallery_url %} {% include "mediagoblin/utils/object_gallery.html" %}
-

{% trans - username=user.username %}View all of {{ username }}'s media{% - endtrans %}

- {% trans %}atom feed1{% - endtrans %} +

+ + {% trans username=user.username -%} + View all of {{ username }}'s media{% endtrans -%} + +

+ + {%- trans %}atom feed{% endtrans -%} +
From 4100798b86106832373b5afca77960edec5cdcc8 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Mon, 8 Aug 2011 10:21:17 -0500 Subject: [PATCH 11/11] New extracted strings from the templates! --- .../i18n/en/LC_MESSAGES/mediagoblin.po | 200 ++++++++++++++++-- 1 file changed, 181 insertions(+), 19 deletions(-) diff --git a/mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po b/mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po index 67830c2e..5e54390d 100644 --- a/mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po +++ b/mediagoblin/i18n/en/LC_MESSAGES/mediagoblin.po @@ -1,26 +1,14 @@ -# Translations template for GNU MediaGoblin. -# -# GNU MediaGoblin -- federated, autonomous media hosting -# Copyright (C) 2011 Free Software Foundation, Inc -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# Translations template for PROJECT. +# Copyright (C) 2011 ORGANIZATION +# This file is distributed under the same license as the PROJECT project. +# FIRST AUTHOR , 2011. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: GNU MediaGoblin\n" -"POT-Creation-Date: 2011-08-06 23:01-0500\n" +"Project-Id-Version: PROJECT VERSION\n" +"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" +"POT-Creation-Date: 2011-08-08 10:20-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -29,7 +17,181 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.6\n" +#: mediagoblin/templates/mediagoblin/base.html:22 +msgid "GNU MediaGoblin" +msgstr "" + +#: mediagoblin/templates/mediagoblin/base.html:45 +msgid "Mediagoblin logo" +msgstr "" + +#: mediagoblin/templates/mediagoblin/base.html:51 +msgid "Submit media" +msgstr "" + +#: mediagoblin/templates/mediagoblin/base.html:62 +msgid "verify your email!" +msgstr "" + +#: mediagoblin/templates/mediagoblin/base.html:72 +msgid "Login" +msgstr "" + +#: mediagoblin/templates/mediagoblin/base.html:88 +msgid "" +"Powered by MediaGoblin, a GNU project" +msgstr "" + #: mediagoblin/templates/mediagoblin/root.html:21 msgid "Welcome to GNU MediaGoblin!" msgstr "" +#: mediagoblin/templates/mediagoblin/root.html:26 +msgid "Submit an item" +msgstr "" + +#: mediagoblin/templates/mediagoblin/root.html:31 +#, python-format +msgid "If you have an account, you can Login." +msgstr "" + +#: mediagoblin/templates/mediagoblin/root.html:37 +#, python-format +msgid "" +"If you don't have an account, please Register." +msgstr "" + +#: mediagoblin/templates/mediagoblin/auth/login.html:26 +msgid "Log in" +msgstr "" + +#: mediagoblin/templates/mediagoblin/auth/login.html:29 +msgid "Login failed!" +msgstr "" + +#: mediagoblin/templates/mediagoblin/auth/login.html:34 +#: mediagoblin/templates/mediagoblin/auth/register.html:30 +#: mediagoblin/templates/mediagoblin/edit/edit_profile.html:35 +#: mediagoblin/templates/mediagoblin/submit/start.html:32 +msgid "Submit" +msgstr "" + +#: mediagoblin/templates/mediagoblin/auth/login.html:42 +msgid "Don't have an account yet?" +msgstr "" + +#: mediagoblin/templates/mediagoblin/auth/login.html:45 +msgid "Create one here!" +msgstr "" + +#: mediagoblin/templates/mediagoblin/auth/register.html:27 +msgid "Create an account!" +msgstr "" + +#: mediagoblin/templates/mediagoblin/auth/resent_verification_email.html:22 +msgid "Resent your verification email." +msgstr "" + +#: mediagoblin/templates/mediagoblin/auth/verification_email.txt:19 +#, python-format +msgid "" +"Hi %(username)s,\n" +"\n" +"to activate your GNU MediaGoblin account, open the following URL in\n" +"your web browser:\n" +"\n" +"%(verification_url)s" +msgstr "" + +#: mediagoblin/templates/mediagoblin/edit/edit.html:29 +#, python-format +msgid "Editing %(media_title)s" +msgstr "" + +#: mediagoblin/templates/mediagoblin/edit/edit.html:36 +msgid "Cancel" +msgstr "" + +#: mediagoblin/templates/mediagoblin/edit/edit.html:37 +msgid "Save changes" +msgstr "" + +#: mediagoblin/templates/mediagoblin/edit/edit_profile.html:29 +#, python-format +msgid "Editing %(username)s's profile" +msgstr "" + +#: mediagoblin/templates/mediagoblin/listings/tag.html:29 +msgid "Media tagged with:" +msgstr "" + +#: mediagoblin/templates/mediagoblin/listings/tag.html:40 +#: mediagoblin/templates/mediagoblin/user_pages/gallery.html:46 +#: mediagoblin/templates/mediagoblin/user_pages/user.html:101 +msgid "atom feed" +msgstr "" + +#: mediagoblin/templates/mediagoblin/submit/start.html:26 +msgid "Submit yer media" +msgstr "" + +#: mediagoblin/templates/mediagoblin/user_pages/gallery.html:30 +#, python-format +msgid "%(username)s's media" +msgstr "" + +#: mediagoblin/templates/mediagoblin/user_pages/gallery.html:51 +#: mediagoblin/templates/mediagoblin/user_pages/user.html:30 +msgid "Sorry, no such user found." +msgstr "" + +#: mediagoblin/templates/mediagoblin/user_pages/user.html:37 +#: mediagoblin/templates/mediagoblin/user_pages/user.html:57 +msgid "Verification needed" +msgstr "" + +#: mediagoblin/templates/mediagoblin/user_pages/user.html:40 +msgid "Almost done! Your account still needs to be verified." +msgstr "" + +#: mediagoblin/templates/mediagoblin/user_pages/user.html:45 +msgid "An email should arrive in a few moments with instructions on how to do so." +msgstr "" + +#: mediagoblin/templates/mediagoblin/user_pages/user.html:49 +msgid "In case it doesn't:" +msgstr "" + +#: mediagoblin/templates/mediagoblin/user_pages/user.html:52 +msgid "Resend verification email" +msgstr "" + +#: mediagoblin/templates/mediagoblin/user_pages/user.html:60 +msgid "" +"Someone has registered an account with this username, but it still has to" +" be verified." +msgstr "" + +#: mediagoblin/templates/mediagoblin/user_pages/user.html:66 +#, python-format +msgid "" +"If you are that person but you've lost your verification email, you can " +"log in and resend it." +msgstr "" + +#: mediagoblin/templates/mediagoblin/user_pages/user.html:76 +#, python-format +msgid "%(username)s's profile" +msgstr "" + +#: mediagoblin/templates/mediagoblin/user_pages/user.html:84 +msgid "Edit profile" +msgstr "" + +#: mediagoblin/templates/mediagoblin/user_pages/user.html:95 +#, python-format +msgid "View all of %(username)s's media" +msgstr "" +