瀏覽代碼

fixes search and unit test

Damien ACCORSI 10 年之前
父節點
當前提交
b2e4664ae2

二進制
tracim/tracim/i18n/fr/LC_MESSAGES/tracim.mo 查看文件


+ 231 - 137
tracim/tracim/i18n/fr/LC_MESSAGES/tracim.po 查看文件

@@ -7,8 +7,8 @@ msgid ""
7 7
 msgstr ""
8 8
 "Project-Id-Version: pod 0.1\n"
9 9
 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
10
-"POT-Creation-Date: 2014-11-11 10:45+0100\n"
11
-"PO-Revision-Date: 2014-11-11 10:52+0100\n"
10
+"POT-Creation-Date: 2015-03-09 16:56+0100\n"
11
+"PO-Revision-Date: 2015-03-09 17:00+0100\n"
12 12
 "Last-Translator: Damien Accorsi <damien.accorsi@free.fr>\n"
13 13
 "Language-Team: fr_FR <LL@li.org>\n"
14 14
 "Plural-Forms: nplurals=2; plural=(n > 1)\n"
@@ -17,12 +17,12 @@ msgstr ""
17 17
 "Content-Transfer-Encoding: 8bit\n"
18 18
 "Generated-By: Babel 1.3\n"
19 19
 
20
-#: tracim/config/app_cfg.py:127
20
+#: tracim/config/app_cfg.py:135
21 21
 msgid "Password reset request"
22 22
 msgstr "Réinitialisation du mot de passe"
23 23
 
24
-#: tracim/config/app_cfg.py:128
25
-#: tracim/config/app_cfg.py:157
24
+#: tracim/config/app_cfg.py:136
25
+#: tracim/config/app_cfg.py:165
26 26
 #, python-format
27 27
 msgid ""
28 28
 "\n"
@@ -41,164 +41,171 @@ msgstr ""
41 41
 "\n"
42 42
 "Si vous ne souhaitez plus procéder à ce changement, ou si vous n'êtes pas à l'originie de cette requête, merci d'ignorer et/ou supprimer cet e-mail.\n"
43 43
 
44
-#: tracim/config/app_cfg.py:144
44
+#: tracim/config/app_cfg.py:152
45 45
 #: tracim/templates/user_workspace_forms.mak:251
46 46
 #: tracim/templates/user_workspace_forms.mak:252
47 47
 msgid "New password"
48 48
 msgstr "Nouveau mot de passe"
49 49
 
50
-#: tracim/config/app_cfg.py:145
50
+#: tracim/config/app_cfg.py:153
51 51
 msgid "Confirm new password"
52 52
 msgstr "Confirmer le nouveau mot de passe"
53 53
 
54
-#: tracim/config/app_cfg.py:146
54
+#: tracim/config/app_cfg.py:154
55 55
 msgid "Save new password"
56 56
 msgstr "Enregistrer le nouveau mot de passe"
57 57
 
58
-#: tracim/config/app_cfg.py:147
58
+#: tracim/config/app_cfg.py:155
59 59
 #: tracim/templates/user_get_all.mak:34
60 60
 msgid "Email address"
61 61
 msgstr "Adresse email"
62 62
 
63
-#: tracim/config/app_cfg.py:148
63
+#: tracim/config/app_cfg.py:156
64 64
 msgid "Send Request"
65 65
 msgstr "Valider"
66 66
 
67
-#: tracim/config/app_cfg.py:151
67
+#: tracim/config/app_cfg.py:159
68 68
 msgid "Password reset request sent"
69 69
 msgstr "Requête de réinitialisation du mot de passe envoyée"
70 70
 
71
-#: tracim/config/app_cfg.py:152
72
-#: tracim/config/app_cfg.py:154
71
+#: tracim/config/app_cfg.py:160
72
+#: tracim/config/app_cfg.py:162
73 73
 msgid "Invalid password reset request"
74 74
 msgstr "Requête de réinitialisation du mot de passe invalide"
75 75
 
76
-#: tracim/config/app_cfg.py:153
76
+#: tracim/config/app_cfg.py:161
77 77
 msgid "Password reset request timed out"
78 78
 msgstr "Echec de la requête de réinitialisation du mot de passe"
79 79
 
80
-#: tracim/config/app_cfg.py:155
80
+#: tracim/config/app_cfg.py:163
81 81
 msgid "Password changed successfully"
82 82
 msgstr "Mot de passe changé"
83 83
 
84
-#: tracim/controllers/__init__.py:141
85
-#: tracim/templates/dashboard.mak:36
86
-#: tracim/templates/master_authenticated.mak:88
87
-#: tracim/templates/master_no_toolbar_no_login.mak:112
88
-#: tracim/templates/user_get_one.mak:39
89
-#: tracim/templates/user_profile.mak:39
90
-#: tracim/templates/user_workspace_folder_file_get_one.mak:10
91
-#: tracim/templates/user_workspace_folder_get_one.mak:11
92
-#: tracim/templates/user_workspace_folder_page_get_one.mak:11
93
-#: tracim/templates/user_workspace_folder_thread_get_one.mak:11
94
-#: tracim/templates/user_workspace_get_all.mak:11
95
-#: tracim/templates/user_workspace_get_one.mak:11
96
-#: tracim/templates/workspace_get_all.mak:13
97
-msgid "Workspaces"
98
-msgstr "Espaces de travail"
99
-
100
-#: tracim/controllers/__init__.py:276
101
-#: tracim/controllers/content.py:206
84
+#: tracim/controllers/__init__.py:247
85
+#: tracim/controllers/content.py:283
102 86
 msgid "{} updated"
103 87
 msgstr "{} mis(e) à jour"
104 88
 
105
-#: tracim/controllers/__init__.py:281
106
-#: tracim/controllers/content.py:211
89
+#: tracim/controllers/__init__.py:252
90
+#: tracim/controllers/content.py:288
107 91
 msgid "{} not updated - error: {}"
108 92
 msgstr "{} pas mis(e) à jour - erreur : {}"
109 93
 
110
-#: tracim/controllers/__init__.py:295
94
+#: tracim/controllers/__init__.py:266
111 95
 msgid "{} status updated"
112 96
 msgstr "Statut de {} mis(e) à jour"
113 97
 
114
-#: tracim/controllers/__init__.py:299
98
+#: tracim/controllers/__init__.py:270
115 99
 msgid "{} status not updated: {}"
116 100
 msgstr "Statut de {} non mis(e) à jour : {}"
117 101
 
118
-#: tracim/controllers/__init__.py:331
102
+#: tracim/controllers/__init__.py:302
103
+#: tracim/controllers/content.py:748
119 104
 msgid "{} archived. <a class=\"alert-link\" href=\"{}\">Cancel action</a>"
120 105
 msgstr "{} archivé(e). <a class=\"alert-link\" href=\"{}\">Annuler l'opération</a>"
121 106
 
122
-#: tracim/controllers/__init__.py:340
107
+#: tracim/controllers/__init__.py:311
108
+#: tracim/controllers/content.py:757
123 109
 msgid "{} not archived: {}"
124 110
 msgstr "{} non archivé(e) : {}"
125 111
 
126
-#: tracim/controllers/__init__.py:354
112
+#: tracim/controllers/__init__.py:325
113
+#: tracim/controllers/content.py:771
127 114
 msgid "{} unarchived."
128 115
 msgstr "{} désarchivé(e)"
129 116
 
130
-#: tracim/controllers/__init__.py:362
117
+#: tracim/controllers/__init__.py:333
118
+#: tracim/controllers/content.py:779
131 119
 msgid "{} not un-archived: {}"
132 120
 msgstr "{} non désarchivé(e) : {}"
133 121
 
134
-#: tracim/controllers/__init__.py:380
122
+#: tracim/controllers/__init__.py:351
123
+#: tracim/controllers/content.py:88
124
+#: tracim/controllers/content.py:796
135 125
 msgid "{} deleted. <a class=\"alert-link\" href=\"{}\">Cancel action</a>"
136 126
 msgstr "{} supprimé(e). <a class=\"alert-link\" href=\"{}\">Annuler l'opération</a>"
137 127
 
138
-#: tracim/controllers/__init__.py:389
128
+#: tracim/controllers/__init__.py:360
129
+#: tracim/controllers/content.py:99
130
+#: tracim/controllers/content.py:805
139 131
 msgid "{} not deleted: {}"
140 132
 msgstr "{} non supprimé(e) : {}"
141 133
 
142
-#: tracim/controllers/__init__.py:404
134
+#: tracim/controllers/__init__.py:375
135
+#: tracim/controllers/content.py:116
136
+#: tracim/controllers/content.py:820
143 137
 msgid "{} undeleted."
144 138
 msgstr "{} restauré(e)."
145 139
 
146
-#: tracim/controllers/__init__.py:414
140
+#: tracim/controllers/__init__.py:385
141
+#: tracim/controllers/content.py:128
142
+#: tracim/controllers/content.py:830
147 143
 msgid "{} not un-deleted: {}"
148 144
 msgstr "{} non restauré(e) : {}"
149 145
 
150
-#: tracim/controllers/content.py:55
146
+#: tracim/controllers/content.py:42
147
+#| msgid "Item commented"
148
+msgid "Comment"
149
+msgstr "Commentaire"
150
+
151
+#: tracim/controllers/content.py:65
151 152
 msgid "Comment added"
152 153
 msgstr "Commentaire créé"
153 154
 
154
-#: tracim/controllers/content.py:78
155
+#: tracim/controllers/content.py:152
156
+#: tracim/templates/user_workspace_folder_file_get_one.mak:70
155 157
 msgid "File"
156 158
 msgstr "Fichier"
157 159
 
158
-#: tracim/controllers/content.py:185
160
+#: tracim/controllers/content.py:259
159 161
 msgid "File created"
160 162
 msgstr "Fichier créé"
161 163
 
162
-#: tracim/controllers/content.py:236
164
+#: tracim/controllers/content.py:313
163 165
 msgid "Page"
164 166
 msgstr "Page"
165 167
 
166
-#: tracim/controllers/content.py:304
168
+#: tracim/controllers/content.py:381
167 169
 msgid "Page created"
168 170
 msgstr "Page créée"
169 171
 
170
-#: tracim/controllers/content.py:344
172
+#: tracim/controllers/content.py:421
171 173
 msgid "Thread"
172 174
 msgstr "Discussion"
173 175
 
174
-#: tracim/controllers/content.py:385
176
+#: tracim/controllers/content.py:462
175 177
 msgid "Thread created"
176 178
 msgstr "Discussion créée"
177 179
 
178
-#: tracim/controllers/content.py:464
180
+#: tracim/controllers/content.py:547
179 181
 msgid "Item moved to {}"
180 182
 msgstr "Element déplacé vers {}"
181 183
 
182
-#: tracim/controllers/content.py:466
184
+#: tracim/controllers/content.py:549
183 185
 msgid "Item moved to workspace root"
184 186
 msgstr "Element déplacé à la racine de l'espace de travail"
185 187
 
186
-#: tracim/controllers/content.py:586
188
+#: tracim/controllers/content.py:669
187 189
 msgid "Folder created"
188 190
 msgstr "Dossier créé"
189 191
 
190
-#: tracim/controllers/content.py:592
192
+#: tracim/controllers/content.py:675
191 193
 msgid "Folder not created: {}"
192 194
 msgstr "Dossier non créé : {}"
193 195
 
194
-#: tracim/controllers/content.py:627
196
+#: tracim/controllers/content.py:710
195 197
 msgid "Folder updated"
196 198
 msgstr "Dossier mis à jour"
197 199
 
198
-#: tracim/controllers/content.py:632
200
+#: tracim/controllers/content.py:715
199 201
 msgid "Folder not updated: {}"
200 202
 msgstr "Dossier non mis à jour : {}"
201 203
 
204
+#: tracim/controllers/content.py:730
205
+#| msgid "Folders"
206
+msgid "Folder"
207
+msgstr "Dossiers"
208
+
202 209
 #: tracim/controllers/root.py:72
203 210
 msgid "Wrong credentials"
204 211
 msgstr "Mauvais identifiant et/ou mot de passe"
@@ -342,130 +349,182 @@ msgstr "Espace de travail {} restauré."
342 349
 msgid "%B %d at %I:%M%p"
343 350
 msgstr "le %d %B à %H:%M"
344 351
 
345
-#: tracim/lib/predicates.py:12
352
+#: tracim/lib/content.py:98
353
+#: tracim/templates/dashboard.mak:36
354
+#: tracim/templates/master_authenticated.mak:94
355
+#: tracim/templates/master_no_toolbar_no_login.mak:112
356
+#: tracim/templates/search.mak:11
357
+#: tracim/templates/user_get_one.mak:39
358
+#: tracim/templates/user_profile.mak:39
359
+#: tracim/templates/user_workspace_folder_file_get_one.mak:10
360
+#: tracim/templates/user_workspace_folder_get_one.mak:11
361
+#: tracim/templates/user_workspace_folder_page_get_one.mak:11
362
+#: tracim/templates/user_workspace_folder_thread_get_one.mak:11
363
+#: tracim/templates/user_workspace_get_all.mak:11
364
+#: tracim/templates/user_workspace_get_one.mak:11
365
+#: tracim/templates/workspace_get_all.mak:13
366
+msgid "Workspaces"
367
+msgstr "Espaces de travail"
368
+
369
+#: tracim/lib/predicates.py:17
346 370
 msgid "You are not authorized to access this resource"
347 371
 msgstr "Vous n'êtes pas autorisé à accéder à cette ressource"
348 372
 
349
-#: tracim/model/auth.py:86
373
+#: tracim/lib/predicates.py:69
374
+#| msgid "You are not authorized to access this resource"
375
+msgid "You're not allowed to access this resource"
376
+msgstr "Vous n'êtes pas autorisé à accéder à cette ressource"
377
+
378
+#: tracim/model/auth.py:93
350 379
 msgid "Nobody"
351 380
 msgstr "Personne"
352 381
 
353
-#: tracim/model/auth.py:87
382
+#: tracim/model/auth.py:94
354 383
 #: tracim/templates/dashboard.mak:33
355
-#: tracim/templates/master_authenticated.mak:87
384
+#: tracim/templates/master_authenticated.mak:93
356 385
 #: tracim/templates/master_no_toolbar_no_login.mak:111
357 386
 #: tracim/templates/user_get_all.mak:13
358 387
 msgid "Users"
359 388
 msgstr "Utilisateurs"
360 389
 
361
-#: tracim/model/auth.py:88
390
+#: tracim/model/auth.py:95
362 391
 msgid "Global managers"
363 392
 msgstr "Managers globaux"
364 393
 
365
-#: tracim/model/auth.py:89
394
+#: tracim/model/auth.py:96
366 395
 msgid "Administrators"
367 396
 msgstr "Administrateurs"
368 397
 
369
-#: tracim/model/data.py:80
398
+#: tracim/model/data.py:83
370 399
 msgid "N/A"
371 400
 msgstr "N/A"
372 401
 
373
-#: tracim/model/data.py:81
402
+#: tracim/model/data.py:84
374 403
 #: tracim/templates/help/page-user-role-definition.mak:15
375 404
 msgid "Reader"
376 405
 msgstr "Lecteur"
377 406
 
378
-#: tracim/model/data.py:82
407
+#: tracim/model/data.py:85
379 408
 #: tracim/templates/help/page-user-role-definition.mak:19
380 409
 msgid "Contributor"
381 410
 msgstr "Contributeurs"
382 411
 
383
-#: tracim/model/data.py:83
412
+#: tracim/model/data.py:86
384 413
 #: tracim/templates/help/page-user-role-definition.mak:23
385 414
 msgid "Content Manager"
386 415
 msgstr "Gestionnaire de contenu"
387 416
 
388
-#: tracim/model/data.py:84
417
+#: tracim/model/data.py:87
389 418
 #: tracim/templates/help/page-user-role-definition.mak:27
390 419
 msgid "Workspace Manager"
391 420
 msgstr "Responsable"
392 421
 
393
-#: tracim/model/data.py:154
422
+#: tracim/model/data.py:157
394 423
 msgid "Item archived"
395 424
 msgstr "Element archivé"
396 425
 
397
-#: tracim/model/data.py:155
426
+#: tracim/model/data.py:158
398 427
 msgid "Item commented"
399 428
 msgstr "Element commenté"
400 429
 
401
-#: tracim/model/data.py:156
430
+#: tracim/model/data.py:159
402 431
 msgid "Item created"
403 432
 msgstr "Elément créé"
404 433
 
405
-#: tracim/model/data.py:157
434
+#: tracim/model/data.py:160
406 435
 msgid "Item deleted"
407 436
 msgstr "Element supprimé"
408 437
 
409
-#: tracim/model/data.py:158
438
+#: tracim/model/data.py:161
410 439
 msgid "Item modified"
411 440
 msgstr "Elément modifié"
412 441
 
413
-#: tracim/model/data.py:159
442
+#: tracim/model/data.py:162
414 443
 msgid "New revision"
415 444
 msgstr "Nouvelle version"
416 445
 
417
-#: tracim/model/data.py:160
446
+#: tracim/model/data.py:163
418 447
 msgid "Status modified"
419 448
 msgstr "Statut modifié"
420 449
 
421
-#: tracim/model/data.py:161
450
+#: tracim/model/data.py:164
422 451
 msgid "Item un-archived"
423 452
 msgstr "Elément désarchivé"
424 453
 
425
-#: tracim/model/data.py:162
454
+#: tracim/model/data.py:165
426 455
 msgid "Item undeleted"
427 456
 msgstr "Elément restauré"
428 457
 
429
-#: tracim/model/data.py:199
430
-#: tracim/model/data.py:209
458
+#: tracim/model/data.py:202
459
+#: tracim/model/data.py:212
431 460
 msgid "work in progress"
432 461
 msgstr "travail en cours"
433 462
 
434
-#: tracim/model/data.py:200
435
-#: tracim/model/data.py:210
463
+#: tracim/model/data.py:203
464
+#: tracim/model/data.py:213
436 465
 msgid "closed — validated"
437 466
 msgstr "clos(e) — validé(e)"
438 467
 
439
-#: tracim/model/data.py:201
440
-#: tracim/model/data.py:211
468
+#: tracim/model/data.py:204
469
+#: tracim/model/data.py:214
441 470
 msgid "closed — cancelled"
442 471
 msgstr "clos(e) — annulé(e)"
443 472
 
444
-#: tracim/model/data.py:202
445
-#: tracim/model/data.py:207
446
-#: tracim/model/data.py:212
473
+#: tracim/model/data.py:205
474
+#: tracim/model/data.py:210
475
+#: tracim/model/data.py:215
447 476
 msgid "deprecated"
448 477
 msgstr "obsolète"
449 478
 
450
-#: tracim/model/data.py:204
479
+#: tracim/model/data.py:207
451 480
 msgid "subject in progress"
452 481
 msgstr "discussion en cours"
453 482
 
454
-#: tracim/model/data.py:205
483
+#: tracim/model/data.py:208
455 484
 msgid "subject closed — resolved"
456 485
 msgstr "discussion close — résolue"
457 486
 
458
-#: tracim/model/data.py:206
487
+#: tracim/model/data.py:209
459 488
 msgid "subject closed — cancelled"
460 489
 msgstr "discussion close — annulée"
461 490
 
491
+#: tracim/model/data.py:292
492
+#| msgid "Delete current workspace"
493
+msgid "Delete this workspace"
494
+msgstr "Supprimer l'espace de travail"
495
+
496
+#: tracim/model/data.py:293
497
+#| msgid "Create this folder"
498
+msgid "Delete this folder"
499
+msgstr "Supprimer ce dossier"
500
+
501
+#: tracim/model/data.py:294
502
+#| msgid "Delete file"
503
+msgid "Delete this file"
504
+msgstr "Supprimer le fichier"
505
+
506
+#: tracim/model/data.py:295
507
+#| msgid "Create this page"
508
+msgid "Delete this page"
509
+msgstr "Supprimer cette page"
510
+
511
+#: tracim/model/data.py:296
512
+#| msgid "Delete thread"
513
+msgid "Delete this thread"
514
+msgstr "Supprimer cette discussion"
515
+
516
+#: tracim/model/data.py:297
517
+#| msgid "Item commented"
518
+msgid "Delete this comment"
519
+msgstr "Supprimer ce commentaire"
520
+
462 521
 #: tracim/templates/create_account.mak:5
463 522
 msgid "Create account"
464 523
 msgstr "Créer un compte"
465 524
 
466 525
 #: tracim/templates/dashboard.mak:5
467 526
 #: tracim/templates/dashboard.mak:12
468
-#: tracim/templates/master_authenticated.mak:80
527
+#: tracim/templates/master_authenticated.mak:86
469 528
 #: tracim/templates/master_no_toolbar_no_login.mak:105
470 529
 msgid "Dashboard"
471 530
 msgstr "Tableau de bord"
@@ -548,25 +607,35 @@ msgstr "Modifier le dossier courant"
548 607
 msgid "Move current folder"
549 608
 msgstr "Déplacer le dossier courant"
550 609
 
551
-#: tracim/templates/index.mak:29
552
-#: tracim/templates/index.mak:50
553
-#: tracim/templates/master_authenticated.mak:141
610
+#: tracim/templates/folder_toolbars.mak:31
611
+#: tracim/templates/thread_toolbars.mak:22
612
+msgid "Archive thread"
613
+msgstr "Archiver la discussion"
614
+
615
+#: tracim/templates/folder_toolbars.mak:32
616
+#: tracim/templates/thread_toolbars.mak:23
617
+msgid "Delete thread"
618
+msgstr "Supprimer la discussion"
619
+
620
+#: tracim/templates/index.mak:30
621
+#: tracim/templates/index.mak:51
622
+#: tracim/templates/master_authenticated.mak:154
554 623
 msgid "Login"
555 624
 msgstr "Login"
556 625
 
557
-#: tracim/templates/index.mak:34
626
+#: tracim/templates/index.mak:35
558 627
 msgid "Enter email"
559 628
 msgstr "Adresse email"
560 629
 
561
-#: tracim/templates/index.mak:40
630
+#: tracim/templates/index.mak:41
562 631
 msgid "Enter password"
563 632
 msgstr "Mot de passe"
564 633
 
565
-#: tracim/templates/index.mak:45
634
+#: tracim/templates/index.mak:46
566 635
 msgid "Remember me"
567 636
 msgstr "Se souvenir de moi"
568 637
 
569
-#: tracim/templates/index.mak:53
638
+#: tracim/templates/index.mak:55
570 639
 msgid "Forgot password?"
571 640
 msgstr "Mot de passe oublié ?"
572 641
 
@@ -574,32 +643,42 @@ msgstr "Mot de passe oublié ?"
574 643
 msgid "Move folder"
575 644
 msgstr "Déplacer le dossier"
576 645
 
577
-#: tracim/templates/master_anonymous.mak:68
578
-#: tracim/templates/master_authenticated.mak:49
646
+#: tracim/templates/master_anonymous.mak:67
647
+#: tracim/templates/master_authenticated.mak:55
579 648
 msgid "Create your own collaborative workspace on trac.im"
580 649
 msgstr "Créez votre propre espace de travail collaboratif sur trac.im"
581 650
 
582
-#: tracim/templates/master_authenticated.mak:81
651
+#: tracim/templates/master_authenticated.mak:87
583 652
 #: tracim/templates/master_no_toolbar_no_login.mak:106
584 653
 #: tracim/templates/workspace_get_all.mak:64
585 654
 msgid "Workspace"
586 655
 msgstr "Espace de travail"
587 656
 
588
-#: tracim/templates/master_authenticated.mak:85
657
+#: tracim/templates/master_authenticated.mak:91
589 658
 #: tracim/templates/master_no_toolbar_no_login.mak:109
590 659
 msgid "Admin"
591 660
 msgstr "Admin"
592 661
 
593
-#: tracim/templates/master_authenticated.mak:100
662
+#: tracim/templates/master_authenticated.mak:106
594 663
 msgid "you MUST desactivate debug in production"
595 664
 msgstr "vous DEVEZ désactiver le mode \"debug\" en production"
596 665
 
597
-#: tracim/templates/master_authenticated.mak:131
666
+#: tracim/templates/master_authenticated.mak:119
667
+#| msgid "Search..."
668
+msgid "Search for..."
669
+msgstr "Rechercher..."
670
+
671
+#: tracim/templates/master_authenticated.mak:121
672
+#| msgid "Search..."
673
+msgid "Search"
674
+msgstr "Rechercher..."
675
+
676
+#: tracim/templates/master_authenticated.mak:144
598 677
 #: tracim/templates/master_no_toolbar_no_login.mak:144
599 678
 msgid "My account"
600 679
 msgstr "Mon compte"
601 680
 
602
-#: tracim/templates/master_authenticated.mak:136
681
+#: tracim/templates/master_authenticated.mak:149
603 682
 #: tracim/templates/master_no_toolbar_no_login.mak:149
604 683
 msgid "Logout"
605 684
 msgstr "Fermer la session"
@@ -667,25 +746,51 @@ msgstr "Retourner à la page d'accueil"
667 746
 msgid "Password Reset Request"
668 747
 msgstr "Requête de réinitialisation du mot de passe"
669 748
 
749
+#: tracim/templates/search.mak:8
750
+#: tracim/templates/user_get_me.mak:39
751
+#: tracim/templates/user_workspace_get_all.mak:8
752
+#: tracim/templates/user_workspace_get_all.mak:29
753
+msgid "My workspaces"
754
+msgstr "Mes espaces de travail"
755
+
756
+#: tracim/templates/search.mak:31
757
+msgid "Search results"
758
+msgstr "Résultats de recherche"
759
+
760
+#: tracim/templates/search.mak:33
761
+msgid "for keywords: "
762
+msgstr "pour les mot-clés :"
763
+
764
+#: tracim/templates/search.mak:41
765
+msgid "loading..."
766
+msgstr "chargement..."
767
+
768
+#: tracim/templates/search.mak:67
769
+msgid "Last known activty"
770
+msgstr "Dernière activité connue"
771
+
772
+#: tracim/templates/search_toolbars.mak:62
773
+msgid "Showing {0} filtered items of {1}"
774
+msgstr "Affichage de {0} éléments sur un total de {1}"
775
+
776
+#: tracim/templates/search_toolbars.mak:64
777
+msgid "Showing {0} filtered item of a total of {1}"
778
+msgstr "Affichage de {0} élément sur un total de {1}"
779
+
780
+#: tracim/templates/search_toolbars.mak:66
781
+msgid "Showing all items. You can filter by clicking right toolbar buttons."
782
+msgstr "Affichage de tous les résultats. Vous pouvez les filtrer à l'aide de la barre d'outils à droite"
783
+
670 784
 #: tracim/templates/thread_toolbars.mak:8
671 785
 msgid "Edit current thread"
672 786
 msgstr "Modifier le sujet de discussion"
673 787
 
674
-#: tracim/templates/thread_toolbars.mak:22
675
-msgid "Archive thread"
676
-msgstr "Archiver la discussion"
677
-
678
-#: tracim/templates/thread_toolbars.mak:23
679
-msgid "Delete thread"
680
-msgstr "Supprimer la discussion"
681
-
682 788
 #: tracim/templates/user_get_all.mak:24
683 789
 msgid "Create a user account..."
684 790
 msgstr "Créer un compte utilisateur"
685 791
 
686 792
 #: tracim/templates/user_get_all.mak:29
687 793
 #: tracim/templates/user_get_all.mak:30
688
-#: tracim/templates/user_workspace_folder_file_get_one.mak:70
689 794
 #: tracim/templates/user_workspace_forms.mak:43
690 795
 #: tracim/templates/user_workspace_forms.mak:44
691 796
 #: tracim/templates/user_workspace_forms.mak:223
@@ -782,12 +887,6 @@ msgstr "je peux créer des espaces de travail"
782 887
 msgid "I am an administrator."
783 888
 msgstr "Je suis un administrateur."
784 889
 
785
-#: tracim/templates/user_get_me.mak:39
786
-#: tracim/templates/user_workspace_get_all.mak:8
787
-#: tracim/templates/user_workspace_get_all.mak:29
788
-msgid "My workspaces"
789
-msgstr "Mes espaces de travail"
790
-
791 890
 #: tracim/templates/user_get_me.mak:42
792 891
 msgid "I'm not member of any workspace."
793 892
 msgstr "Je ne suis membre d'aucun espace de travail"
@@ -835,7 +934,6 @@ msgid "Change password"
835 934
 msgstr "Changer le mot de passe"
836 935
 
837 936
 #: tracim/templates/user_toolbars.mak:22
838
-#| msgid "Delete page"
839 937
 msgid "Delete user"
840 938
 msgstr "Supprimer l'utilisateur"
841 939
 
@@ -882,21 +980,21 @@ msgstr "Voir la dernière version"
882 980
 
883 981
 #: tracim/templates/user_workspace_folder_file_get_one.mak:41
884 982
 #: tracim/templates/user_workspace_folder_page_get_one.mak:42
885
-#: tracim/templates/user_workspace_folder_thread_get_one.mak:33
983
+#: tracim/templates/user_workspace_folder_thread_get_one.mak:34
886 984
 msgid "<b>This information is deprecated</b>"
887 985
 msgstr "<b>Cette information est obsolète</b>"
888 986
 
889 987
 #: tracim/templates/user_workspace_folder_file_get_one.mak:48
890 988
 #: tracim/templates/user_workspace_folder_get_one.mak:35
891 989
 #: tracim/templates/user_workspace_folder_page_get_one.mak:49
892
-#: tracim/templates/user_workspace_folder_thread_get_one.mak:40
990
+#: tracim/templates/user_workspace_folder_thread_get_one.mak:41
893 991
 msgid "Show localisation"
894 992
 msgstr "Localiser cet élément"
895 993
 
896 994
 #: tracim/templates/user_workspace_folder_file_get_one.mak:55
897 995
 #: tracim/templates/user_workspace_folder_get_one.mak:40
898 996
 #: tracim/templates/user_workspace_folder_page_get_one.mak:56
899
-#: tracim/templates/user_workspace_folder_thread_get_one.mak:49
997
+#: tracim/templates/user_workspace_folder_thread_get_one.mak:50
900 998
 msgid "created on {} by <b>{}</b>"
901 999
 msgstr "Créé(e)  le {} par <b>{}</b>"
902 1000
 
@@ -1056,18 +1154,14 @@ msgstr "Sujet"
1056 1154
 msgid "Optionnaly, you can describe the subject"
1057 1155
 msgstr "Vous pouvez décrire le sujet (facultatif)"
1058 1156
 
1059
-#: tracim/templates/user_workspace_folder_thread_get_one.mak:64
1157
+#: tracim/templates/user_workspace_folder_thread_get_one.mak:65
1060 1158
 msgid "<b>Note</b>: In case you'd like to post a reply, you must first open again the thread"
1061 1159
 msgstr "<b>Note</b> : si vous souhaitez commenter cette discussion, vous devez tout d'abord en modifier le statut pour la ré-ouvrir"
1062 1160
 
1063
-#: tracim/templates/user_workspace_folder_thread_get_one.mak:69
1161
+#: tracim/templates/user_workspace_folder_thread_get_one.mak:70
1064 1162
 msgid "Post a reply..."
1065 1163
 msgstr "Poster une réponse..."
1066 1164
 
1067
-#: tracim/templates/user_workspace_folder_thread_get_one.mak:88
1068
-msgid "<strong>{}</strong> wrote:"
1069
-msgstr "<strong>{}</strong> a écrit :"
1070
-
1071 1165
 #: tracim/templates/user_workspace_forms.mak:10
1072 1166
 msgid "Folder name"
1073 1167
 msgstr "Nom du dossier"
@@ -1182,7 +1276,6 @@ msgid "You need folders to organize your content."
1182 1276
 msgstr "Vous devez créer des répertoires pour organiser votre contenu"
1183 1277
 
1184 1278
 #: tracim/templates/user_workspace_get_one.mak:67
1185
-#| msgid "create new folder..."
1186 1279
 msgid "Create a folder now"
1187 1280
 msgstr "créer un dossier maintenant"
1188 1281
 
@@ -1226,21 +1319,22 @@ msgstr "Aucune discussion."
1226 1319
 msgid "{} message(s)"
1227 1320
 msgstr "{} message(s)"
1228 1321
 
1229
-#: tracim/templates/user_workspace_widgets.mak:203
1230
-#| msgid "Create a workspace..."
1322
+#: tracim/templates/user_workspace_widgets.mak:212
1231 1323
 msgid "You have no workspace."
1232 1324
 msgstr "Vous n'avez pas d'espaces de travail"
1233 1325
 
1234
-#: tracim/templates/user_workspace_widgets.mak:205
1235
-#| msgid "Create a workspace..."
1326
+#: tracim/templates/user_workspace_widgets.mak:214
1236 1327
 msgid "Create a workspace"
1237 1328
 msgstr "Créer un espace de travail"
1238 1329
 
1239
-#: tracim/templates/user_workspace_widgets.mak:207
1240
-#| msgid "I'm an administrator."
1330
+#: tracim/templates/user_workspace_widgets.mak:216
1241 1331
 msgid "Contact the administrator."
1242 1332
 msgstr "Contactez un administrateur."
1243 1333
 
1334
+#: tracim/templates/user_workspace_widgets.mak:272
1335
+msgid "<strong>{}</strong> wrote:"
1336
+msgstr "<strong>{}</strong> a écrit :"
1337
+
1244 1338
 #: tracim/templates/workspace_edit.mak:8
1245 1339
 msgid "Edit Workspace"
1246 1340
 msgstr "Modifier l'espace de travail"

+ 30 - 4
tracim/tracim/lib/content.py 查看文件

@@ -125,21 +125,46 @@ class ContentApi(object):
125 125
 
126 126
         return breadcrumb
127 127
 
128
-    def _base_query(self, workspace: Workspace=None):
128
+    def __real_base_query(self, workspace: Workspace=None):
129 129
         result = DBSession.query(Content)
130 130
 
131 131
         if workspace:
132 132
             result = result.filter(Content.workspace_id==workspace.workspace_id)
133 133
 
134
+        return result
135
+
136
+    def _base_query(self, workspace: Workspace=None):
137
+        result = self.__real_base_query(workspace)
138
+
139
+        if not self._show_deleted:
140
+            result = result.filter(Content.is_deleted==False)
141
+
142
+        if not self._show_archived:
143
+            result = result.filter(Content.is_archived==False)
144
+
145
+        return result
146
+
147
+    def _hard_filtered_base_query(self, workspace: Workspace=None):
148
+        """
149
+        If set to True, then filterign on is_deleted and is_archived will also
150
+        filter parent properties. This is required for search() function which
151
+        also search in comments (for example) which may be 'not deleted' while
152
+        the associated content is deleted
153
+
154
+        :param hard_filtering:
155
+        :return:
156
+        """
157
+        result = self.__real_base_query(workspace)
158
+
134 159
         if not self._show_deleted:
135 160
             parent = aliased(Content)
136
-            result.join(parent, Content.parent).\
161
+            result = result.join(parent, Content.parent).\
137 162
                 filter(Content.is_deleted==False).\
138 163
                 filter(parent.is_deleted==False)
139 164
 
140 165
         if not self._show_archived:
141 166
             parent = aliased(Content)
142
-            result.join(parent, Content.parent).\
167
+            result = result.join(parent, Content.parent).\
143 168
                 filter(Content.is_archived==False).\
144 169
                 filter(parent.is_archived==False)
145 170
 
@@ -350,6 +375,7 @@ class ContentApi(object):
350 375
 
351 376
 
352 377
         if do_flush:
378
+            DBSession.add(content)
353 379
             DBSession.flush()
354 380
 
355 381
         if do_notify:
@@ -380,7 +406,7 @@ class ContentApi(object):
380 406
 
381 407
         filter_group_label = list(Content.label.ilike('%{}%'.format(keyword)) for keyword in keywords)
382 408
         filter_group_desc = list(Content.description.ilike('%{}%'.format(keyword)) for keyword in keywords)
383
-        title_keyworded_items = self._base_query().\
409
+        title_keyworded_items = self._hard_filtered_base_query().\
384 410
             filter(or_(*(filter_group_label+filter_group_desc))).\
385 411
             options(joinedload('children')).\
386 412
             options(joinedload('parent'))

+ 1 - 1
tracim/tracim/templates/search.mak 查看文件

@@ -30,7 +30,7 @@
30 30
     <h1 class="page-header">
31 31
         ${TIM.ICO(32, 'actions/system-search')} ${_('Search results')}
32 32
         <small>
33
-            ${_('<span class="badge">{}</span> results for keywords: '.format(search.result_nb))|n}
33
+            ${_('for keywords: ')|n}
34 34
             % for keyword in search.keywords:
35 35
                 <span class="label label-default">${keyword}</span>
36 36
             % endfor

+ 75 - 3
tracim/tracim/tests/library/test_content_api.py 查看文件

@@ -5,6 +5,7 @@ from nose.tools import raises
5 5
 
6 6
 import transaction
7 7
 
8
+from tracim.lib.base import logger
8 9
 from tracim.lib.content import compare_content_for_sorting_by_type_and_name
9 10
 from tracim.lib.content import ContentApi
10 11
 from tracim.lib.user import UserApi
@@ -187,10 +188,7 @@ class TestContentApi(TestStandard):
187 188
 
188 189
         api = ContentApi(user)
189 190
         p = api.create(ContentType.Page, None, None, 'this_is_a_page')
190
-        transaction.commit()
191
-
192 191
         c = api.create_comment(None, p, 'this is the comment', True)
193
-        transaction.commit()
194 192
 
195 193
         eq_(Content, c.__class__)
196 194
         eq_(p.content_id, c.parent_id)
@@ -377,3 +375,77 @@ class TestContentApi(TestStandard):
377 375
         eq_(False, updated2.is_deleted)
378 376
         eq_(ActionDescription.UNDELETION, updated2.revision_type)
379 377
         eq_(u1id, updated2.owner_id)
378
+
379
+    def test_search_in_label(self):
380
+        # HACK - D.A. - 2015-03-09
381
+        # This test is based on a bug which does NOT return results found
382
+        # at root of a workspace (eg a folder)
383
+        uapi = UserApi(None)
384
+        user = uapi.create_user()
385
+        user.email = 'this.is@user'
386
+        uapi.save(user)
387
+
388
+        api = ContentApi(user)
389
+
390
+        a = api.create(ContentType.Folder, None, None, 'this is randomized folder', True)
391
+        p = api.create(ContentType.Page, None, a, 'this is randomized label content', True)
392
+        p.description = 'This is some amazing test'
393
+        api.save(p)
394
+        original_id = p.content_id
395
+
396
+        res = api.search(['randomized'])
397
+        eq_(1, len(res.all()))
398
+        item = res.all()[0]
399
+        eq_(original_id, item.content_id)
400
+
401
+    def test_search_in_description(self):
402
+        # HACK - D.A. - 2015-03-09
403
+        # This test is based on a bug which does NOT return results found
404
+        # at root of a workspace (eg a folder)
405
+        uapi = UserApi(None)
406
+        user = uapi.create_user()
407
+        user.email = 'this.is@user'
408
+        uapi.save(user)
409
+
410
+        api = ContentApi(user)
411
+
412
+        a = api.create(ContentType.Folder, None, None, 'this is randomized folder', True)
413
+
414
+        p = api.create(ContentType.Page, None, a, 'this is dummy label content', True)
415
+        p.description = 'This is some amazing test'
416
+        api.save(p)
417
+        original_id = p.content_id
418
+
419
+        res = api.search(['dummy'])
420
+        eq_(1, len(res.all()))
421
+        item = res.all()[0]
422
+        eq_(original_id, item.content_id)
423
+
424
+
425
+    def test_search_in_label_or_description(self):
426
+        # HACK - D.A. - 2015-03-09
427
+        # This test is based on a bug which does NOT return results found
428
+        # at root of a workspace (eg a folder)
429
+        uapi = UserApi(None)
430
+        user = uapi.create_user()
431
+        user.email = 'this.is@user'
432
+        uapi.save(user)
433
+
434
+        api = ContentApi(user)
435
+
436
+        a = api.create(ContentType.Folder, None, None, 'this is randomized folder', True)
437
+        p1 = api.create(ContentType.Page, None, a, 'this is dummy label content', True)
438
+        p1.description = 'This is some amazing test'
439
+        p2 = api.create(ContentType.Page, None, a, 'Hey ! Jon !', True)
440
+        p2.description = 'What\'s up ?'
441
+        api.save(p1)
442
+        api.save(p2)
443
+
444
+        id1 = p1.content_id
445
+        id2 = p2.content_id
446
+
447
+        res = api.search(['dummy', 'jon'])
448
+        eq_(2, len(res.all()))
449
+
450
+        eq_(True, id1 in [o.content_id for o in res.all()])
451
+        eq_(True, id2 in [o.content_id for o in res.all()])