From: Osama Khalid Date: Sun, 7 Aug 2011 20:36:55 +0000 (+0300) Subject: Adding {% trans %} to all fixed strings in the templates X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8f4c9b813d306228e1eecec7551d46902c264189;p=mediagoblin.git Adding {% trans %} to all fixed strings in the templates --- 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 }}