Przeglądaj źródła

Fix default settings for i18n

Camille Masset 9 lat temu
rodzic
commit
682f371a06

+ 5 - 0
README.md

11
 cd seum && cp settings.py.default settings.py
11
 cd seum && cp settings.py.default settings.py
12
 ```
12
 ```
13
 
13
 
14
+In order to use correctly the internationalisation, compile the locale files:
15
+```
16
+python manage.py compilemessages
17
+```
18
+
14
 ## Running the server
19
 ## Running the server
15
 
20
 
16
 ### Developement
21
 ### Developement

+ 21 - 21
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:19+0100\n"
11
+"POT-Creation-Date: 2017-01-22 18:05+0000\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"
221
 msgstr ""
221
 msgstr ""
222
 
222
 
223
 #: counter/templates/createUser.html:36 counter/templates/homeTemplate.html:76
223
 #: counter/templates/createUser.html:36 counter/templates/homeTemplate.html:76
224
-#: counter/views/home.py:203 counter/views/home.py:209
225
-#: counter/views/home.py:247 counter/views/home.py:253
226
-#: counter/views/home.py:285 counter/views/home.py:291
224
+#: counter/views/home.py:200 counter/views/home.py:206
225
+#: counter/views/home.py:244 counter/views/home.py:250
226
+#: counter/views/home.py:282 counter/views/home.py:288
227
 msgid "Trigram"
227
 msgid "Trigram"
228
 msgstr ""
228
 msgstr ""
229
 
229
 
490
 "password."
490
 "password."
491
 msgstr ""
491
 msgstr ""
492
 
492
 
493
-#: counter/templates/resetEmail.txt:3
493
+#: counter/templates/resetEmail.txt:2
494
 msgid ""
494
 msgid ""
495
 "You have lost your password and you've got the seum. You have to follow this "
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:"
496
 "link (or copy-paste it in your browser) to reinitialise it:"
497
 msgstr ""
497
 msgstr ""
498
 
498
 
499
-#: counter/templates/resetEmail.txt:7
499
+#: counter/templates/resetEmail.txt:6
500
 msgid "Your login is {{ user.username }} in case you have forgotten it too."
500
 msgid "Your login is {{ user.username }} in case you have forgotten it too."
501
 msgstr ""
501
 msgstr ""
502
 
502
 
503
-#: counter/templates/resetEmail.txt:18
503
+#: counter/templates/resetEmail.txt:11
504
 msgid ""
504
 msgid ""
505
 "P.S.: If you don't want to receive these mails anymore, contact us at denis."
505
 "P.S.: If you don't want to receive these mails anymore, contact us at denis."
506
 "merigoux@gmail.com"
506
 "merigoux@gmail.com"
515
 msgid "From %(who)s: %(reason)s"
515
 msgid "From %(who)s: %(reason)s"
516
 msgstr ""
516
 msgstr ""
517
 
517
 
518
-#: counter/views/home.py:161
518
+#: counter/views/home.py:158
519
 #, python-format
519
 #, python-format
520
 msgid "%(counter)s: %(reason)s"
520
 msgid "%(counter)s: %(reason)s"
521
 msgstr ""
521
 msgstr ""
522
 
522
 
523
-#: counter/views/home.py:163
523
+#: counter/views/home.py:160
524
 #, python-format
524
 #, python-format
525
 msgid "%(who)s to %(counter)s: %(reason)s"
525
 msgid "%(who)s to %(counter)s: %(reason)s"
526
 msgstr ""
526
 msgstr ""
527
 
527
 
528
-#: counter/views/home.py:167
528
+#: counter/views/home.py:164
529
 msgid "Seum"
529
 msgid "Seum"
530
 msgstr ""
530
 msgstr ""
531
 
531
 
532
-#: counter/views/home.py:184
532
+#: counter/views/home.py:181
533
 msgid "24h ago"
533
 msgid "24h ago"
534
 msgstr ""
534
 msgstr ""
535
 
535
 
536
-#: counter/views/home.py:185
536
+#: counter/views/home.py:182
537
 msgid "Now"
537
 msgid "Now"
538
 msgstr ""
538
 msgstr ""
539
 
539
 
540
-#: counter/views/home.py:203 counter/views/home.py:208
541
-#: counter/views/home.py:228 counter/views/home.py:233
540
+#: counter/views/home.py:200 counter/views/home.py:205
541
+#: counter/views/home.py:225 counter/views/home.py:230
542
 msgid "Number of seums"
542
 msgid "Number of seums"
543
 msgstr ""
543
 msgstr ""
544
 
544
 
545
-#: counter/views/home.py:228 counter/views/home.py:234
545
+#: counter/views/home.py:225 counter/views/home.py:231
546
 msgid "Month"
546
 msgid "Month"
547
 msgstr ""
547
 msgstr ""
548
 
548
 
549
-#: counter/views/home.py:247 counter/views/home.py:252
549
+#: counter/views/home.py:244 counter/views/home.py:249
550
 msgid "Number of given likes"
550
 msgid "Number of given likes"
551
 msgstr ""
551
 msgstr ""
552
 
552
 
553
-#: counter/views/home.py:266 counter/views/home.py:272
553
+#: counter/views/home.py:263 counter/views/home.py:269
554
 msgid "Hashtag"
554
 msgid "Hashtag"
555
 msgstr ""
555
 msgstr ""
556
 
556
 
557
-#: counter/views/home.py:266 counter/views/home.py:271
557
+#: counter/views/home.py:263 counter/views/home.py:268
558
 msgid "Number of seums containing the hashtag"
558
 msgid "Number of seums containing the hashtag"
559
 msgstr ""
559
 msgstr ""
560
 
560
 
561
-#: counter/views/home.py:285 counter/views/home.py:290
561
+#: counter/views/home.py:282 counter/views/home.py:287
562
 msgid "Number of received likes"
562
 msgid "Number of received likes"
563
 msgstr ""
563
 msgstr ""
564
 
564
 
574
 msgid "Use another email address, another user has already this login."
574
 msgid "Use another email address, another user has already this login."
575
 msgstr ""
575
 msgstr ""
576
 
576
 
577
-#: seum/settings.py:111
577
+#: seum/settings.py:109
578
 msgid "English"
578
 msgid "English"
579
 msgstr ""
579
 msgstr ""
580
 
580
 
581
-#: seum/settings.py:112
581
+#: seum/settings.py:110
582
 msgid "French"
582
 msgid "French"
583
 msgstr ""
583
 msgstr ""

+ 29 - 25
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:19+0100\n"
11
+"POT-Creation-Date: 2017-01-22 18:05+0000\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"
229
 "sera ton identité seumesque !"
229
 "sera ton identité seumesque !"
230
 
230
 
231
 #: counter/templates/createUser.html:36 counter/templates/homeTemplate.html:76
231
 #: counter/templates/createUser.html:36 counter/templates/homeTemplate.html:76
232
-#: counter/views/home.py:203 counter/views/home.py:209
233
-#: counter/views/home.py:247 counter/views/home.py:253
234
-#: counter/views/home.py:285 counter/views/home.py:291
232
+#: counter/views/home.py:200 counter/views/home.py:206
233
+#: counter/views/home.py:244 counter/views/home.py:250
234
+#: counter/views/home.py:282 counter/views/home.py:288
235
 msgid "Trigram"
235
 msgid "Trigram"
236
 msgstr "Trigramme"
236
 msgstr "Trigramme"
237
 
237
 
509
 "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 "
510
 "mot de passe."
510
 "mot de passe."
511
 
511
 
512
-#: counter/templates/resetEmail.txt:3
512
+#: counter/templates/resetEmail.txt:2
513
 msgid ""
513
 msgid ""
514
 "You have lost your password and you've got the seum. You have to follow this "
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:"
515
 "link (or copy-paste it in your browser) to reinitialise it:"
516
 msgstr ""
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 :"
517
+"T'as perdu ton mot de passe et t'as le seum. Il te reste plus qu'à suivre le "
518
+"lien pour le réinitialiser :"
519
 
519
 
520
-#: counter/templates/resetEmail.txt:7
520
+#: counter/templates/resetEmail.txt:6
521
 msgid "Your login is {{ user.username }} in case you have forgotten it too."
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."
522
+msgstr ""
523
+"Ton nom d'utilisateur c'est {{ user.username }} au cas où tu l'aurais oublié "
524
+"aussi."
523
 
525
 
524
-#: counter/templates/resetEmail.txt:18
526
+#: counter/templates/resetEmail.txt:11
525
 msgid ""
527
 msgid ""
526
 "P.S.: If you don't want to receive these mails anymore, contact us at denis."
528
 "P.S.: If you don't want to receive these mails anymore, contact us at denis."
527
 "merigoux@gmail.com"
529
 "merigoux@gmail.com"
528
-msgstr "P.S. : Pour ne plus recevoir ces messages, envoie un mail à denis.merigoux@gmail.com"
530
+msgstr ""
531
+"P.S. : Pour ne plus recevoir ces messages, envoie un mail à denis."
532
+"merigoux@gmail.com"
529
 
533
 
530
 #: counter/views/counter.py:41
534
 #: counter/views/counter.py:41
531
 msgid "unknown"
535
 msgid "unknown"
536
 msgid "From %(who)s: %(reason)s"
540
 msgid "From %(who)s: %(reason)s"
537
 msgstr "De %(who)s : %(reason)s"
541
 msgstr "De %(who)s : %(reason)s"
538
 
542
 
539
-#: counter/views/home.py:161
543
+#: counter/views/home.py:158
540
 #, python-format
544
 #, python-format
541
 msgid "%(counter)s: %(reason)s"
545
 msgid "%(counter)s: %(reason)s"
542
 msgstr "%(counter)s : %(reason)s"
546
 msgstr "%(counter)s : %(reason)s"
543
 
547
 
544
-#: counter/views/home.py:163
548
+#: counter/views/home.py:160
545
 #, python-format
549
 #, python-format
546
 msgid "%(who)s to %(counter)s: %(reason)s"
550
 msgid "%(who)s to %(counter)s: %(reason)s"
547
 msgstr "%(who)s pour %(counter)s : %(reason)s"
551
 msgstr "%(who)s pour %(counter)s : %(reason)s"
548
 
552
 
549
-#: counter/views/home.py:167
553
+#: counter/views/home.py:164
550
 msgid "Seum"
554
 msgid "Seum"
551
 msgstr "Seum"
555
 msgstr "Seum"
552
 
556
 
553
-#: counter/views/home.py:184
557
+#: counter/views/home.py:181
554
 msgid "24h ago"
558
 msgid "24h ago"
555
 msgstr "il y a 24h"
559
 msgstr "il y a 24h"
556
 
560
 
557
-#: counter/views/home.py:185
561
+#: counter/views/home.py:182
558
 msgid "Now"
562
 msgid "Now"
559
 msgstr "Présent"
563
 msgstr "Présent"
560
 
564
 
561
-#: counter/views/home.py:203 counter/views/home.py:208
562
-#: counter/views/home.py:228 counter/views/home.py:233
565
+#: counter/views/home.py:200 counter/views/home.py:205
566
+#: counter/views/home.py:225 counter/views/home.py:230
563
 msgid "Number of seums"
567
 msgid "Number of seums"
564
 msgstr "Nombre de seums"
568
 msgstr "Nombre de seums"
565
 
569
 
566
-#: counter/views/home.py:228 counter/views/home.py:234
570
+#: counter/views/home.py:225 counter/views/home.py:231
567
 msgid "Month"
571
 msgid "Month"
568
 msgstr "Mois"
572
 msgstr "Mois"
569
 
573
 
570
-#: counter/views/home.py:247 counter/views/home.py:252
574
+#: counter/views/home.py:244 counter/views/home.py:249
571
 msgid "Number of given likes"
575
 msgid "Number of given likes"
572
 msgstr "Nombre de likes distribués"
576
 msgstr "Nombre de likes distribués"
573
 
577
 
574
-#: counter/views/home.py:266 counter/views/home.py:272
578
+#: counter/views/home.py:263 counter/views/home.py:269
575
 msgid "Hashtag"
579
 msgid "Hashtag"
576
 msgstr "Hashtag"
580
 msgstr "Hashtag"
577
 
581
 
578
-#: counter/views/home.py:266 counter/views/home.py:271
582
+#: counter/views/home.py:263 counter/views/home.py:268
579
 msgid "Number of seums containing the hashtag"
583
 msgid "Number of seums containing the hashtag"
580
 msgstr "Nombre de seums contenant le hashtag"
584
 msgstr "Nombre de seums contenant le hashtag"
581
 
585
 
582
-#: counter/views/home.py:285 counter/views/home.py:290
586
+#: counter/views/home.py:282 counter/views/home.py:287
583
 msgid "Number of received likes"
587
 msgid "Number of received likes"
584
 msgstr "Nombre de likes reçus"
588
 msgstr "Nombre de likes reçus"
585
 
589
 
595
 msgid "Use another email address, another user has already this login."
599
 msgid "Use another email address, another user has already this login."
596
 msgstr "Utilise une autre adresse email, un autre utilisateur a déjà ce login."
600
 msgstr "Utilise une autre adresse email, un autre utilisateur a déjà ce login."
597
 
601
 
598
-#: seum/settings.py:111
602
+#: seum/settings.py:109
599
 msgid "English"
603
 msgid "English"
600
 msgstr "Anglais"
604
 msgstr "Anglais"
601
 
605
 
602
-#: seum/settings.py:112
606
+#: seum/settings.py:110
603
 msgid "French"
607
 msgid "French"
604
 msgstr "Français"
608
 msgstr "Français"

+ 4 - 0
seum/settings.py.default

105
     ('fr', _('French')),
105
     ('fr', _('French')),
106
 ]
106
 ]
107
 
107
 
108
+LOCALE_PATHS = [
109
+    os.path.join(BASE_DIR, 'locale'),
110
+]
111
+
108
 
112
 
109
 # Static files (CSS, JavaScript, Images)
113
 # Static files (CSS, JavaScript, Images)
110
 # https://docs.djangoproject.com/en/1.9/howto/static-files/
114
 # https://docs.djangoproject.com/en/1.9/howto/static-files/