Просмотр исходного кода

Translate email template. Clean up in home view

Camille Masset лет назад: 9
Родитель
Сommit
56c2c804fe
4 измененных файлов с 43 добавлено и 10 удалено
  1. 4 4
      counter/templates/resetEmail.txt
  2. 0 3
      counter/views/home.py
  3. 17 1
      locale/en/LC_MESSAGES/django.po
  4. 22 2
      locale/fr/LC_MESSAGES/django.po

+ 4 - 4
counter/templates/resetEmail.txt

1
-T'as perdu ton mot de passe et t'as le seum. Il te reste plus qu'à suivre le lien pour le réinitialiser :
1
+{% load i18n %}
2
+{% blocktrans %}You have lost your password and you've got the seum. You have to follow this link (or copy-paste it in your browser) to reinitialise it:{% endblocktrans %}
2
 {% block reset_link %}
3
 {% block reset_link %}
3
 {{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
4
 {{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
4
 {% endblock %}
5
 {% endblock %}
5
-
6
-Ton nom d'utilisateur c'est {{ user.username }} au cas où tu l'aurais oublié aussi.
6
+{% trans "Your login is {{ user.username }} in case you have forgotten it too." %}
7
 
7
 
8
 --
8
 --
9
 SeumBook™ - http://seum.merigoux.ovh
9
 SeumBook™ - http://seum.merigoux.ovh
10
 
10
 
11
-P.S. : Pour ne plus recevoir ces messages, envoie un mail à denis.merigoux@gmail.com
11
+{% trans "P.S.: If you don't want to receive these mails anymore, contact us at denis.merigoux@gmail.com" %}

+ 0 - 3
counter/views/home.py

1
 import copy
1
 import copy
2
 from datetime import datetime, timedelta
2
 from datetime import datetime, timedelta
3
-import functools
4
 import math
3
 import math
5
-import random
6
-from time import clock
7
 
4
 
8
 from django import forms
5
 from django import forms
9
 from django.contrib.auth.decorators import login_required
6
 from django.contrib.auth.decorators import login_required

+ 17 - 1
locale/en/LC_MESSAGES/django.po

8
 msgstr ""
8
 msgstr ""
9
 "Project-Id-Version: PACKAGE VERSION\n"
9
 "Project-Id-Version: PACKAGE VERSION\n"
10
 "Report-Msgid-Bugs-To: \n"
10
 "Report-Msgid-Bugs-To: \n"
11
-"POT-Creation-Date: 2017-01-22 14:12+0100\n"
11
+"POT-Creation-Date: 2017-01-22 14:19+0100\n"
12
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
 "Language-Team: LANGUAGE <LL@li.org>\n"
14
 "Language-Team: LANGUAGE <LL@li.org>\n"
490
 "password."
490
 "password."
491
 msgstr ""
491
 msgstr ""
492
 
492
 
493
+#: counter/templates/resetEmail.txt:3
494
+msgid ""
495
+"You have lost your password and you've got the seum. You have to follow this "
496
+"link (or copy-paste it in your browser) to reinitialise it:"
497
+msgstr ""
498
+
499
+#: counter/templates/resetEmail.txt:7
500
+msgid "Your login is {{ user.username }} in case you have forgotten it too."
501
+msgstr ""
502
+
503
+#: counter/templates/resetEmail.txt:18
504
+msgid ""
505
+"P.S.: If you don't want to receive these mails anymore, contact us at denis."
506
+"merigoux@gmail.com"
507
+msgstr ""
508
+
493
 #: counter/views/counter.py:41
509
 #: counter/views/counter.py:41
494
 msgid "unknown"
510
 msgid "unknown"
495
 msgstr ""
511
 msgstr ""

+ 22 - 2
locale/fr/LC_MESSAGES/django.po

8
 msgstr ""
8
 msgstr ""
9
 "Project-Id-Version: PACKAGE VERSION\n"
9
 "Project-Id-Version: PACKAGE VERSION\n"
10
 "Report-Msgid-Bugs-To: \n"
10
 "Report-Msgid-Bugs-To: \n"
11
-"POT-Creation-Date: 2017-01-22 14:12+0100\n"
11
+"POT-Creation-Date: 2017-01-22 14:19+0100\n"
12
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
 "Language-Team: LANGUAGE <LL@li.org>\n"
14
 "Language-Team: LANGUAGE <LL@li.org>\n"
493
 
493
 
494
 #: counter/templates/passwordResetConfirm.html:60
494
 #: counter/templates/passwordResetConfirm.html:60
495
 msgid "You've got the seum, the link that we sent you has already been used."
495
 msgid "You've got the seum, the link that we sent you has already been used."
496
-msgstr "T'as le seum, le lien qui t'as été donné pour visiter cette page est déjà utilisé."
496
+msgstr ""
497
+"T'as le seum, le lien qui t'as été donné pour visiter cette page est déjà "
498
+"utilisé."
497
 
499
 
498
 #: counter/templates/passwordResetDone.html:5
500
 #: counter/templates/passwordResetDone.html:5
499
 msgid "Email sent!"
501
 msgid "Email sent!"
507
 "Un mail t'a été envoyé, suis les instructions pour aller réinitialiser ton "
509
 "Un mail t'a été envoyé, suis les instructions pour aller réinitialiser ton "
508
 "mot de passe."
510
 "mot de passe."
509
 
511
 
512
+#: counter/templates/resetEmail.txt:3
513
+msgid ""
514
+"You have lost your password and you've got the seum. You have to follow this "
515
+"link (or copy-paste it in your browser) to reinitialise it:"
516
+msgstr ""
517
+"T'as perdu ton mot de passe et t'as le seum. "
518
+"Il te reste plus qu'à suivre le lien pour le réinitialiser :"
519
+
520
+#: counter/templates/resetEmail.txt:7
521
+msgid "Your login is {{ user.username }} in case you have forgotten it too."
522
+msgstr "Ton nom d'utilisateur c'est {{ user.username }} au cas où tu l'aurais oublié aussi."
523
+
524
+#: counter/templates/resetEmail.txt:18
525
+msgid ""
526
+"P.S.: If you don't want to receive these mails anymore, contact us at denis."
527
+"merigoux@gmail.com"
528
+msgstr "P.S. : Pour ne plus recevoir ces messages, envoie un mail à denis.merigoux@gmail.com"
529
+
510
 #: counter/views/counter.py:41
530
 #: counter/views/counter.py:41
511
 msgid "unknown"
531
 msgid "unknown"
512
 msgstr "inconnu"
532
 msgstr "inconnu"