From fad2db8fd88e1dd012630438f4f53b763fd5269a Mon Sep 17 00:00:00 2001 From: toyg Date: Thu, 22 Aug 2013 00:34:55 +0100 Subject: [PATCH] marked all strings for i18n --- .../templates/registration/activate.html | 12 ++++++++---- .../registration/activation_complete.html | 8 ++++++-- .../templates/registration/activation_email.html | 14 +++++++++----- .../templates/registration/activation_email.txt | 12 ++++++++---- .../registration/activation_email_subject.txt | 2 +- .../templates/registration/login.html | 16 ++++++++++------ .../templates/registration/logout.html | 5 +++-- .../registration/password_change_done.html | 5 +++-- .../registration/password_change_form.html | 5 +++-- .../registration/password_reset_complete.html | 7 ++++--- .../registration/password_reset_confirm.html | 7 ++++--- .../registration/password_reset_done.html | 7 ++++--- .../registration/password_reset_email.html | 13 +++++++------ .../registration/password_reset_form.html | 9 +++++---- .../registration/registration_base.html | 1 + .../registration/registration_complete.html | 6 ++++-- .../registration/registration_form.html | 5 +++-- 17 files changed, 83 insertions(+), 51 deletions(-) diff --git a/registration_defaults/templates/registration/activate.html b/registration_defaults/templates/registration/activate.html index b9a929c..4a869d1 100644 --- a/registration_defaults/templates/registration/activate.html +++ b/registration_defaults/templates/registration/activate.html @@ -1,10 +1,14 @@ {% extends "registration/registration_base.html" %} -{% block title %}{% if account %}Activation complete{% else %}Activation problem{% endif %}{% endblock %} +{% load i18n %} +{% url 'auth_login' as auth_login_url %} +{% block title %}{% if account %}{% trans "Activation complete" %}{% else %}{% trans "Activation problem" %}{% endif %}{% endblock %} {% block content %} {% if account %} -Thanks {{ account }}, activation complete! You may now login using the username and password you set at registration. +{% blocktrans %} +Thanks {{ account }}, activation complete! +You may now login using the username and password you set at registration. +{% endblocktrans %} {% else %} -Oops – it seems that your activation key is invalid. Please check the url again. +{% blocktrans %}Oops – it seems that your activation key is invalid. Please check the url again.{% endblocktrans %} {% endif %} {% endblock %} - diff --git a/registration_defaults/templates/registration/activation_complete.html b/registration_defaults/templates/registration/activation_complete.html index 4a6c61a..77da5d1 100644 --- a/registration_defaults/templates/registration/activation_complete.html +++ b/registration_defaults/templates/registration/activation_complete.html @@ -1,7 +1,11 @@ {% extends "registration/registration_base.html" %} -{% block title %}Activation complete{% endblock %} +{% load i18n %} +{% url 'auth_login' as auth_login_url %} +{% block title %}{% trans "Activation complete" %}{% endblock %} {% block content %} -Thanks, activation complete! You may now login using the username and password you set at registration. +{% blocktrans %} +Thanks, activation complete! You may now login using the username and password you set at registration. +{% endblocktrans %} {% endblock %} diff --git a/registration_defaults/templates/registration/activation_email.html b/registration_defaults/templates/registration/activation_email.html index 0c641bb..c6ebc26 100644 --- a/registration_defaults/templates/registration/activation_email.html +++ b/registration_defaults/templates/registration/activation_email.html @@ -1,22 +1,26 @@ +{% load i18n %} {% comment %} This template is used for the html alternative of the activation email if you use a django-registration backend that looks for it. e.g. https://github.com/huseyinyilmaz/django-registration-extended-backend -{% endcomment %} -

Account registration for {{ site.name }}

+{% endcomment %} +{% url 'registration_activate' activation_key as activation_key_url %} +{% blocktrans with sitename=site.name sitedomain=site.domain%} +

Account registration for {{ sitename }}

You (or someone pretending to be you) have asked to register an account at -{{ site.name }}.
+{{ sitename }}.
If this wasn't you, please ignore this email and your address will be removed from our records.

To activate this account, please click the following link within the next {{ expiration_days }} days:
-http://{{site.domain}}{% url 'registration_activate' activation_key %} +http://{{ sitedomain }}{{ activation_key_url }}

Sincerely,
-{{ site.name }} Management +{{ sitename }} Management

+{% endblocktrans %} \ No newline at end of file diff --git a/registration_defaults/templates/registration/activation_email.txt b/registration_defaults/templates/registration/activation_email.txt index b8fb1a4..9ca54b3 100644 --- a/registration_defaults/templates/registration/activation_email.txt +++ b/registration_defaults/templates/registration/activation_email.txt @@ -1,11 +1,15 @@ -You (or someone pretending to be you) have asked to register an account at -{{ site.name }}. If this wasn't you, please ignore this email +{% load i18n %} +{% url 'registration_activate' activation_key as activation_key_url%} +{% blocktrans with sitename=site.name siteurl=site.domain %} +You (or someone pretending to be you) have asked to register an account at +{{ sitename }}. If this wasn't you, please ignore this email and your address will be removed from our records. To activate this account, please click the following link within the next {{ expiration_days }} days: -http://{{site.domain}}{% url 'registration_activate' activation_key %} +http://{{ siteurl }}{{ activation_key_url }} Sincerely, -{{ site.name }} Management +{{ sitename }} Management +{% endblocktrans %} \ No newline at end of file diff --git a/registration_defaults/templates/registration/activation_email_subject.txt b/registration_defaults/templates/registration/activation_email_subject.txt index 13912aa..bdb8399 100644 --- a/registration_defaults/templates/registration/activation_email_subject.txt +++ b/registration_defaults/templates/registration/activation_email_subject.txt @@ -1 +1 @@ -Account registration for {{ site.name }} +{% load i18n %}{% blocktrans with sitename=site.name %}Account registration for {{ sitename }}{% endblocktrans %} diff --git a/registration_defaults/templates/registration/login.html b/registration_defaults/templates/registration/login.html index 80b79dd..0bacc2d 100644 --- a/registration_defaults/templates/registration/login.html +++ b/registration_defaults/templates/registration/login.html @@ -1,25 +1,29 @@ {% extends "registration/registration_base.html" %} -{% block title %}Login{% endblock %} +{% load i18n %} +{% url 'auth_password_reset' as auth_pwd_reset_url %} +{% url 'registration_register' as register_url%} +{% block title %}{% trans "Login" %}{% endblock %} {% block content %} {% if form.errors %} -

Your username and password didn't match. Please try again.

+

{% blocktrans %}Your username and password didn't match. Please try again.{% endblocktrans %}

{% endif %}
{% csrf_token %} - + - +
{{ form.username.label_tag }}{% trans form.username.label_tag %} {{ form.username }}
{{ form.password.label_tag }}{% trans form.password.label_tag %} {{ form.password }}
-

Forgot your password? Need an account?

+

{% blocktrans %}Forgot your password? + Need an account?{% endblocktrans %}

- +
diff --git a/registration_defaults/templates/registration/logout.html b/registration_defaults/templates/registration/logout.html index 39a6e99..6759e11 100644 --- a/registration_defaults/templates/registration/logout.html +++ b/registration_defaults/templates/registration/logout.html @@ -1,5 +1,6 @@ {% extends "registration/registration_base.html" %} -{% block title %}Logged out{% endblock %} +{% load i18n %} +{% block title %}{% trans "Logged out" %}{% endblock %} {% block content %} -Successfully logged out! +{% trans "Successfully logged out!" %} {% endblock %} diff --git a/registration_defaults/templates/registration/password_change_done.html b/registration_defaults/templates/registration/password_change_done.html index c836504..d49d6cc 100644 --- a/registration_defaults/templates/registration/password_change_done.html +++ b/registration_defaults/templates/registration/password_change_done.html @@ -1,6 +1,7 @@ {% extends "registration/registration_base.html" %} -{% block title %}Password changed{% endblock %} +{% load i18n %} +{% block title %}{% trans "Password changed" %}{% endblock %} {% block content %} -Password successfully changed! +{% trans "Password successfully changed!" %} {% endblock %} diff --git a/registration_defaults/templates/registration/password_change_form.html b/registration_defaults/templates/registration/password_change_form.html index 95939d1..9e04d04 100644 --- a/registration_defaults/templates/registration/password_change_form.html +++ b/registration_defaults/templates/registration/password_change_form.html @@ -1,10 +1,11 @@ {% extends "registration/registration_base.html" %} -{% block title %}Change password{% endblock %} +{% load i18n %} +{% block title %}{% trans "Change password" %}{% endblock %} {% block content %}
{% csrf_token %} {{ form }} - +
{% endblock %} diff --git a/registration_defaults/templates/registration/password_reset_complete.html b/registration_defaults/templates/registration/password_reset_complete.html index 0457b20..064701e 100644 --- a/registration_defaults/templates/registration/password_reset_complete.html +++ b/registration_defaults/templates/registration/password_reset_complete.html @@ -1,5 +1,6 @@ {% extends "registration/registration_base.html" %} -{% block title %}Password reset complete{% endblock %} -{% block content %} +{% load i18n %} +{% block title %}{% trans "Password reset complete" %}{% endblock %} +{% block content %}{% blocktrans %} Your password has been reset! You may now log in. -{% endblock %} +{% endblocktrans %}{% endblock %} diff --git a/registration_defaults/templates/registration/password_reset_confirm.html b/registration_defaults/templates/registration/password_reset_confirm.html index 6c4e150..5006abd 100644 --- a/registration_defaults/templates/registration/password_reset_confirm.html +++ b/registration_defaults/templates/registration/password_reset_confirm.html @@ -1,11 +1,12 @@ {% extends "registration/registration_base.html" %} -{% block title %}Confirm password reset{% endblock %} +{% load i18n %} +{% block title %}{% trans "Confirm password reset" %}{% endblock %} {% block content %} -Enter your new password below to reset your password: +{% trans "Enter your new password below to reset your password:" %}
{% csrf_token %} {{ form.as_table }} - +
{% endblock %} diff --git a/registration_defaults/templates/registration/password_reset_done.html b/registration_defaults/templates/registration/password_reset_done.html index 47a8c49..9d283e3 100644 --- a/registration_defaults/templates/registration/password_reset_done.html +++ b/registration_defaults/templates/registration/password_reset_done.html @@ -1,8 +1,9 @@ {% extends "registration/registration_base.html" %} -{% block title %}Password reset{% endblock %} +{% load i18n %} +{% block title %}{% trans "Password reset" %}{% endblock %} {% block content %}

-We have sent you an email with a link to reset your password. Please check -your email and click the link to continue. +{% blocktrans %}We have sent you an email with a link to reset your password. +Please check your email and click the link to continue.{% endblocktrans %}

{% endblock %} diff --git a/registration_defaults/templates/registration/password_reset_email.html b/registration_defaults/templates/registration/password_reset_email.html index 60a011e..287737f 100644 --- a/registration_defaults/templates/registration/password_reset_email.html +++ b/registration_defaults/templates/registration/password_reset_email.html @@ -1,16 +1,17 @@ -Greetings {% if user.get_full_name %}{{ user.get_full_name }}{% else %}{{ user }}{% endif %}, +{% load i18n %}{% trans "Greetings" %} {% if user.get_full_name %}{{ user.get_full_name }}{% else %}{{ user }}{% endif %}, -You are receiving this email because you (or someone pretending to be you) +{% blocktrans %}You are receiving this email because you (or someone pretending to be you) requested that your password be reset on the {{ domain }} site. If you do not wish to reset your password, please ignore this message. To reset your password, please click the following link, or copy and paste it -into your web browser: +into your web browser:{% endblocktrans %} {{ protocol }}://{{ domain }}{% url 'auth_password_reset_confirm' uid token %} -Your username, in case you've forgotten: {{ user.username }} - +{% blocktrans with username=user.username %} +Your username, in case you've forgotten: {{ username }} Best regards, -{{ site_name }} Management \ No newline at end of file +{{ site_name }} Management +{% endblocktrans %} \ No newline at end of file diff --git a/registration_defaults/templates/registration/password_reset_form.html b/registration_defaults/templates/registration/password_reset_form.html index 3bf1f99..4a7be82 100644 --- a/registration_defaults/templates/registration/password_reset_form.html +++ b/registration_defaults/templates/registration/password_reset_form.html @@ -1,12 +1,13 @@ {% extends "registration/registration_base.html" %} -{% block title %}Reset password{% endblock %} -{% block content %} +{% load i18n %} +{% block title %}{% trans "Reset password" %}{% endblock %} +{% block content %}{% blocktrans %} Forgot your password? Enter your email in the form below and we'll send you -instructions for creating a new one. +instructions for creating a new one.{% endblocktrans %}
{% csrf_token %} {{ form }} - +
{% endblock %} diff --git a/registration_defaults/templates/registration/registration_base.html b/registration_defaults/templates/registration/registration_base.html index 94d9808..c4c0b0f 100644 --- a/registration_defaults/templates/registration/registration_base.html +++ b/registration_defaults/templates/registration/registration_base.html @@ -1 +1,2 @@ {% extends "base.html" %} +{% load i18n %} diff --git a/registration_defaults/templates/registration/registration_complete.html b/registration_defaults/templates/registration/registration_complete.html index 0e3ceaa..872292b 100644 --- a/registration_defaults/templates/registration/registration_complete.html +++ b/registration_defaults/templates/registration/registration_complete.html @@ -1,6 +1,8 @@ {% extends "registration/registration_base.html" %} -{% block title %}Activation email sent{% endblock %} +{% load i18n %} +{% block title %}{% trans "Activation email sent" %}{% endblock %} {% block content %} -An activation email has been sent. Please check your email and click on the link to activate your account. +{% blocktrans %}An activation email has been sent. +Please check your email and click on the link to activate your account.{% endblocktrans %} {% endblock %} diff --git a/registration_defaults/templates/registration/registration_form.html b/registration_defaults/templates/registration/registration_form.html index 1f16a80..6ca5759 100644 --- a/registration_defaults/templates/registration/registration_form.html +++ b/registration_defaults/templates/registration/registration_form.html @@ -1,10 +1,11 @@ {% extends "registration/registration_base.html" %} -{% block title %}Register for an account{% endblock %} +{% load i18n %} +{% block title %}{% trans "Register for an account" %}{% endblock %} {% block content %} {% csrf_token %} {{ form }} - +
{% endblock %}