Bläddra i källkod

Fix default settings for i18n

Camille Masset 9 år sedan
förälder
incheckning
682f371a06
4 ändrade filer med 59 tillägg och 46 borttagningar
  1. 5 0
      README.md
  2. 21 21
      locale/en/LC_MESSAGES/django.po
  3. 29 25
      locale/fr/LC_MESSAGES/django.po
  4. 4 0
      seum/settings.py.default

+ 5 - 0
README.md

@@ -11,6 +11,11 @@ Then copy and paste the settings file template located in folder `seum`:
11 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 19
 ## Running the server
15 20
 
16 21
 ### Developement

+ 21 - 21
locale/en/LC_MESSAGES/django.po

@@ -8,7 +8,7 @@ msgid ""
8 8
 msgstr ""
9 9
 "Project-Id-Version: PACKAGE VERSION\n"
10 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 12
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 13
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 14
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -221,9 +221,9 @@ msgid ""
221 221
 msgstr ""
222 222
 
223 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 227
 msgid "Trigram"
228 228
 msgstr ""
229 229
 
@@ -490,17 +490,17 @@ msgid ""
490 490
 "password."
491 491
 msgstr ""
492 492
 
493
-#: counter/templates/resetEmail.txt:3
493
+#: counter/templates/resetEmail.txt:2
494 494
 msgid ""
495 495
 "You have lost your password and you've got the seum. You have to follow this "
496 496
 "link (or copy-paste it in your browser) to reinitialise it:"
497 497
 msgstr ""
498 498
 
499
-#: counter/templates/resetEmail.txt:7
499
+#: counter/templates/resetEmail.txt:6
500 500
 msgid "Your login is {{ user.username }} in case you have forgotten it too."
501 501
 msgstr ""
502 502
 
503
-#: counter/templates/resetEmail.txt:18
503
+#: counter/templates/resetEmail.txt:11
504 504
 msgid ""
505 505
 "P.S.: If you don't want to receive these mails anymore, contact us at denis."
506 506
 "merigoux@gmail.com"
@@ -515,50 +515,50 @@ msgstr ""
515 515
 msgid "From %(who)s: %(reason)s"
516 516
 msgstr ""
517 517
 
518
-#: counter/views/home.py:161
518
+#: counter/views/home.py:158
519 519
 #, python-format
520 520
 msgid "%(counter)s: %(reason)s"
521 521
 msgstr ""
522 522
 
523
-#: counter/views/home.py:163
523
+#: counter/views/home.py:160
524 524
 #, python-format
525 525
 msgid "%(who)s to %(counter)s: %(reason)s"
526 526
 msgstr ""
527 527
 
528
-#: counter/views/home.py:167
528
+#: counter/views/home.py:164
529 529
 msgid "Seum"
530 530
 msgstr ""
531 531
 
532
-#: counter/views/home.py:184
532
+#: counter/views/home.py:181
533 533
 msgid "24h ago"
534 534
 msgstr ""
535 535
 
536
-#: counter/views/home.py:185
536
+#: counter/views/home.py:182
537 537
 msgid "Now"
538 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 542
 msgid "Number of seums"
543 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 546
 msgid "Month"
547 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 550
 msgid "Number of given likes"
551 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 554
 msgid "Hashtag"
555 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 558
 msgid "Number of seums containing the hashtag"
559 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 562
 msgid "Number of received likes"
563 563
 msgstr ""
564 564
 
@@ -574,10 +574,10 @@ msgstr ""
574 574
 msgid "Use another email address, another user has already this login."
575 575
 msgstr ""
576 576
 
577
-#: seum/settings.py:111
577
+#: seum/settings.py:109
578 578
 msgid "English"
579 579
 msgstr ""
580 580
 
581
-#: seum/settings.py:112
581
+#: seum/settings.py:110
582 582
 msgid "French"
583 583
 msgstr ""

+ 29 - 25
locale/fr/LC_MESSAGES/django.po

@@ -8,7 +8,7 @@ msgid ""
8 8
 msgstr ""
9 9
 "Project-Id-Version: PACKAGE VERSION\n"
10 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 12
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 13
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 14
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -229,9 +229,9 @@ msgstr ""
229 229
 "sera ton identité seumesque !"
230 230
 
231 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 235
 msgid "Trigram"
236 236
 msgstr "Trigramme"
237 237
 
@@ -509,23 +509,27 @@ msgstr ""
509 509
 "Un mail t'a été envoyé, suis les instructions pour aller réinitialiser ton "
510 510
 "mot de passe."
511 511
 
512
-#: counter/templates/resetEmail.txt:3
512
+#: counter/templates/resetEmail.txt:2
513 513
 msgid ""
514 514
 "You have lost your password and you've got the seum. You have to follow this "
515 515
 "link (or copy-paste it in your browser) to reinitialise it:"
516 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 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 527
 msgid ""
526 528
 "P.S.: If you don't want to receive these mails anymore, contact us at denis."
527 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 534
 #: counter/views/counter.py:41
531 535
 msgid "unknown"
@@ -536,50 +540,50 @@ msgstr "inconnu"
536 540
 msgid "From %(who)s: %(reason)s"
537 541
 msgstr "De %(who)s : %(reason)s"
538 542
 
539
-#: counter/views/home.py:161
543
+#: counter/views/home.py:158
540 544
 #, python-format
541 545
 msgid "%(counter)s: %(reason)s"
542 546
 msgstr "%(counter)s : %(reason)s"
543 547
 
544
-#: counter/views/home.py:163
548
+#: counter/views/home.py:160
545 549
 #, python-format
546 550
 msgid "%(who)s to %(counter)s: %(reason)s"
547 551
 msgstr "%(who)s pour %(counter)s : %(reason)s"
548 552
 
549
-#: counter/views/home.py:167
553
+#: counter/views/home.py:164
550 554
 msgid "Seum"
551 555
 msgstr "Seum"
552 556
 
553
-#: counter/views/home.py:184
557
+#: counter/views/home.py:181
554 558
 msgid "24h ago"
555 559
 msgstr "il y a 24h"
556 560
 
557
-#: counter/views/home.py:185
561
+#: counter/views/home.py:182
558 562
 msgid "Now"
559 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 567
 msgid "Number of seums"
564 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 571
 msgid "Month"
568 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 575
 msgid "Number of given likes"
572 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 579
 msgid "Hashtag"
576 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 583
 msgid "Number of seums containing the hashtag"
580 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 587
 msgid "Number of received likes"
584 588
 msgstr "Nombre de likes reçus"
585 589
 
@@ -595,10 +599,10 @@ msgstr "Un utilisateur avec cette adresse email existe déjà."
595 599
 msgid "Use another email address, another user has already this login."
596 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 603
 msgid "English"
600 604
 msgstr "Anglais"
601 605
 
602
-#: seum/settings.py:112
606
+#: seum/settings.py:110
603 607
 msgid "French"
604 608
 msgstr "Français"

+ 4 - 0
seum/settings.py.default

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