From 8f4c9b813d306228e1eecec7551d46902c264189 Mon Sep 17 00:00:00 2001 From: Osama Khalid Date: Sun, 7 Aug 2011 23:36:55 +0300 Subject: [PATCH] Adding {% trans %} to all fixed strings in the templates --- .../templates/mediagoblin/auth/login.html | 16 ++++--- .../templates/mediagoblin/auth/register.html | 5 ++- .../auth/resent_verification_email.html | 2 +- .../mediagoblin/auth/verification_email.txt | 8 ++-- mediagoblin/templates/mediagoblin/base.html | 12 +++--- .../templates/mediagoblin/edit/edit.html | 6 +-- .../mediagoblin/edit/edit_profile.html | 4 +- .../templates/mediagoblin/listings/tag.html | 4 +- mediagoblin/templates/mediagoblin/root.html | 11 ++--- .../templates/mediagoblin/submit/start.html | 4 +- .../mediagoblin/user_pages/gallery.html | 8 ++-- .../mediagoblin/user_pages/media.html | 26 +++++------ .../mediagoblin/user_pages/user.html | 43 +++++++++++-------- 13 files changed, 81 insertions(+), 68 deletions(-) diff --git a/mediagoblin/templates/mediagoblin/auth/login.html b/mediagoblin/templates/mediagoblin/auth/login.html index e25783ea..8b1e2296 100644 --- a/mediagoblin/templates/mediagoblin/auth/login.html +++ b/mediagoblin/templates/mediagoblin/auth/login.html @@ -23,21 +23,23 @@
-

Log in

+

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

{% if login_failed %} -
Login failed!
- {% endif %} - {{ wtforms_util.render_divs(login_form) }} +
{% trans %}Login failed!{% + endtrans %}
{% endif %} {{ + wtforms_util.render_divs(login_form) }}
- +
{% if next %} {% endif %} {% if allow_registration %} -

Don't have an account yet?
Create one here!

- {% 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 f77b3782..5d512829 100644 --- a/mediagoblin/templates/mediagoblin/auth/register.html +++ b/mediagoblin/templates/mediagoblin/auth/register.html @@ -24,10 +24,11 @@
-

Create an account!

+

{% trans %}Create an account!{% endtrans %}

{{ wtforms_util.render_divs(register_form) }}
- +
diff --git a/mediagoblin/templates/mediagoblin/auth/resent_verification_email.html b/mediagoblin/templates/mediagoblin/auth/resent_verification_email.html index da3a9e99..8fd80ee9 100644 --- a/mediagoblin/templates/mediagoblin/auth/resent_verification_email.html +++ b/mediagoblin/templates/mediagoblin/auth/resent_verification_email.html @@ -19,6 +19,6 @@ {% block mediagoblin_content %}

- Resent your verification email. + {% trans %}Resent your verification email.{% endtrans %}

{% endblock %} diff --git a/mediagoblin/templates/mediagoblin/auth/verification_email.txt b/mediagoblin/templates/mediagoblin/auth/verification_email.txt index 7863374d..cb01600d 100644 --- a/mediagoblin/templates/mediagoblin/auth/verification_email.txt +++ b/mediagoblin/templates/mediagoblin/auth/verification_email.txt @@ -15,8 +15,10 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . #} -Hi {{ username }}, -to activate your GNU MediaGoblin account, open the following URL in your web browser +{% trans username=username, verification_url=verification_url %}Hi {{ username }}, -{{ verification_url|safe }} +to activate your GNU MediaGoblin account, open the following URL in +your web browser: + +{{ verification_url|safe }}{% endtrans %} diff --git a/mediagoblin/templates/mediagoblin/base.html b/mediagoblin/templates/mediagoblin/base.html index 4da685f9..b9c98ef6 100644 --- a/mediagoblin/templates/mediagoblin/base.html +++ b/mediagoblin/templates/mediagoblin/base.html @@ -19,7 +19,7 @@ - {% block title %}GNU MediaGoblin{% endblock title %} + {% block title %}{% trans %}GNU MediaGoblin{% endtrans %}{% endblock title %} Mediagoblin logo + alt="{% trans %}Mediagoblin logo{% endtrans %}" /> {% endblock %} {% if request.user and request.user['status'] == 'active' %} - Submit media + {% trans %}Submit media{% endtrans %} {% endif %} {% block mediagoblin_header_title %}{% endblock %} @@ -59,7 +59,7 @@ - verify your email! + {% trans %}verify your email!{% endtrans %} {% endif %} logout) {% else %} - Login + {% trans %}Login{% endtrans %} {% endif %} @@ -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 }}

-- 2.25.1