Browse Source

fixes search and unit test

Damien ACCORSI 10 years ago
parent
commit
b2e4664ae2

BIN
tracim/tracim/i18n/fr/LC_MESSAGES/tracim.mo View File


+ 231 - 137
tracim/tracim/i18n/fr/LC_MESSAGES/tracim.po View File

7
 msgstr ""
7
 msgstr ""
8
 "Project-Id-Version: pod 0.1\n"
8
 "Project-Id-Version: pod 0.1\n"
9
 "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
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
 "Last-Translator: Damien Accorsi <damien.accorsi@free.fr>\n"
12
 "Last-Translator: Damien Accorsi <damien.accorsi@free.fr>\n"
13
 "Language-Team: fr_FR <LL@li.org>\n"
13
 "Language-Team: fr_FR <LL@li.org>\n"
14
 "Plural-Forms: nplurals=2; plural=(n > 1)\n"
14
 "Plural-Forms: nplurals=2; plural=(n > 1)\n"
17
 "Content-Transfer-Encoding: 8bit\n"
17
 "Content-Transfer-Encoding: 8bit\n"
18
 "Generated-By: Babel 1.3\n"
18
 "Generated-By: Babel 1.3\n"
19
 
19
 
20
-#: tracim/config/app_cfg.py:127
20
+#: tracim/config/app_cfg.py:135
21
 msgid "Password reset request"
21
 msgid "Password reset request"
22
 msgstr "Réinitialisation du mot de passe"
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
 #, python-format
26
 #, python-format
27
 msgid ""
27
 msgid ""
28
 "\n"
28
 "\n"
41
 "\n"
41
 "\n"
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"
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
 #: tracim/templates/user_workspace_forms.mak:251
45
 #: tracim/templates/user_workspace_forms.mak:251
46
 #: tracim/templates/user_workspace_forms.mak:252
46
 #: tracim/templates/user_workspace_forms.mak:252
47
 msgid "New password"
47
 msgid "New password"
48
 msgstr "Nouveau mot de passe"
48
 msgstr "Nouveau mot de passe"
49
 
49
 
50
-#: tracim/config/app_cfg.py:145
50
+#: tracim/config/app_cfg.py:153
51
 msgid "Confirm new password"
51
 msgid "Confirm new password"
52
 msgstr "Confirmer le nouveau mot de passe"
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
 msgid "Save new password"
55
 msgid "Save new password"
56
 msgstr "Enregistrer le nouveau mot de passe"
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
 #: tracim/templates/user_get_all.mak:34
59
 #: tracim/templates/user_get_all.mak:34
60
 msgid "Email address"
60
 msgid "Email address"
61
 msgstr "Adresse email"
61
 msgstr "Adresse email"
62
 
62
 
63
-#: tracim/config/app_cfg.py:148
63
+#: tracim/config/app_cfg.py:156
64
 msgid "Send Request"
64
 msgid "Send Request"
65
 msgstr "Valider"
65
 msgstr "Valider"
66
 
66
 
67
-#: tracim/config/app_cfg.py:151
67
+#: tracim/config/app_cfg.py:159
68
 msgid "Password reset request sent"
68
 msgid "Password reset request sent"
69
 msgstr "Requête de réinitialisation du mot de passe envoyée"
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
 msgid "Invalid password reset request"
73
 msgid "Invalid password reset request"
74
 msgstr "Requête de réinitialisation du mot de passe invalide"
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
 msgid "Password reset request timed out"
77
 msgid "Password reset request timed out"
78
 msgstr "Echec de la requête de réinitialisation du mot de passe"
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
 msgid "Password changed successfully"
81
 msgid "Password changed successfully"
82
 msgstr "Mot de passe changé"
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
 msgid "{} updated"
86
 msgid "{} updated"
103
 msgstr "{} mis(e) à jour"
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
 msgid "{} not updated - error: {}"
91
 msgid "{} not updated - error: {}"
108
 msgstr "{} pas mis(e) à jour - erreur : {}"
92
 msgstr "{} pas mis(e) à jour - erreur : {}"
109
 
93
 
110
-#: tracim/controllers/__init__.py:295
94
+#: tracim/controllers/__init__.py:266
111
 msgid "{} status updated"
95
 msgid "{} status updated"
112
 msgstr "Statut de {} mis(e) à jour"
96
 msgstr "Statut de {} mis(e) à jour"
113
 
97
 
114
-#: tracim/controllers/__init__.py:299
98
+#: tracim/controllers/__init__.py:270
115
 msgid "{} status not updated: {}"
99
 msgid "{} status not updated: {}"
116
 msgstr "Statut de {} non mis(e) à jour : {}"
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
 msgid "{} archived. <a class=\"alert-link\" href=\"{}\">Cancel action</a>"
104
 msgid "{} archived. <a class=\"alert-link\" href=\"{}\">Cancel action</a>"
120
 msgstr "{} archivé(e). <a class=\"alert-link\" href=\"{}\">Annuler l'opération</a>"
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
 msgid "{} not archived: {}"
109
 msgid "{} not archived: {}"
124
 msgstr "{} non archivé(e) : {}"
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
 msgid "{} unarchived."
114
 msgid "{} unarchived."
128
 msgstr "{} désarchivé(e)"
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
 msgid "{} not un-archived: {}"
119
 msgid "{} not un-archived: {}"
132
 msgstr "{} non désarchivé(e) : {}"
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
 msgid "{} deleted. <a class=\"alert-link\" href=\"{}\">Cancel action</a>"
125
 msgid "{} deleted. <a class=\"alert-link\" href=\"{}\">Cancel action</a>"
136
 msgstr "{} supprimé(e). <a class=\"alert-link\" href=\"{}\">Annuler l'opération</a>"
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
 msgid "{} not deleted: {}"
131
 msgid "{} not deleted: {}"
140
 msgstr "{} non supprimé(e) : {}"
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
 msgid "{} undeleted."
137
 msgid "{} undeleted."
144
 msgstr "{} restauré(e)."
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
 msgid "{} not un-deleted: {}"
143
 msgid "{} not un-deleted: {}"
148
 msgstr "{} non restauré(e) : {}"
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
 msgid "Comment added"
152
 msgid "Comment added"
152
 msgstr "Commentaire créé"
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
 msgid "File"
157
 msgid "File"
156
 msgstr "Fichier"
158
 msgstr "Fichier"
157
 
159
 
158
-#: tracim/controllers/content.py:185
160
+#: tracim/controllers/content.py:259
159
 msgid "File created"
161
 msgid "File created"
160
 msgstr "Fichier créé"
162
 msgstr "Fichier créé"
161
 
163
 
162
-#: tracim/controllers/content.py:236
164
+#: tracim/controllers/content.py:313
163
 msgid "Page"
165
 msgid "Page"
164
 msgstr "Page"
166
 msgstr "Page"
165
 
167
 
166
-#: tracim/controllers/content.py:304
168
+#: tracim/controllers/content.py:381
167
 msgid "Page created"
169
 msgid "Page created"
168
 msgstr "Page créée"
170
 msgstr "Page créée"
169
 
171
 
170
-#: tracim/controllers/content.py:344
172
+#: tracim/controllers/content.py:421
171
 msgid "Thread"
173
 msgid "Thread"
172
 msgstr "Discussion"
174
 msgstr "Discussion"
173
 
175
 
174
-#: tracim/controllers/content.py:385
176
+#: tracim/controllers/content.py:462
175
 msgid "Thread created"
177
 msgid "Thread created"
176
 msgstr "Discussion créée"
178
 msgstr "Discussion créée"
177
 
179
 
178
-#: tracim/controllers/content.py:464
180
+#: tracim/controllers/content.py:547
179
 msgid "Item moved to {}"
181
 msgid "Item moved to {}"
180
 msgstr "Element déplacé vers {}"
182
 msgstr "Element déplacé vers {}"
181
 
183
 
182
-#: tracim/controllers/content.py:466
184
+#: tracim/controllers/content.py:549
183
 msgid "Item moved to workspace root"
185
 msgid "Item moved to workspace root"
184
 msgstr "Element déplacé à la racine de l'espace de travail"
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
 msgid "Folder created"
189
 msgid "Folder created"
188
 msgstr "Dossier créé"
190
 msgstr "Dossier créé"
189
 
191
 
190
-#: tracim/controllers/content.py:592
192
+#: tracim/controllers/content.py:675
191
 msgid "Folder not created: {}"
193
 msgid "Folder not created: {}"
192
 msgstr "Dossier non créé : {}"
194
 msgstr "Dossier non créé : {}"
193
 
195
 
194
-#: tracim/controllers/content.py:627
196
+#: tracim/controllers/content.py:710
195
 msgid "Folder updated"
197
 msgid "Folder updated"
196
 msgstr "Dossier mis à jour"
198
 msgstr "Dossier mis à jour"
197
 
199
 
198
-#: tracim/controllers/content.py:632
200
+#: tracim/controllers/content.py:715
199
 msgid "Folder not updated: {}"
201
 msgid "Folder not updated: {}"
200
 msgstr "Dossier non mis à jour : {}"
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
 #: tracim/controllers/root.py:72
209
 #: tracim/controllers/root.py:72
203
 msgid "Wrong credentials"
210
 msgid "Wrong credentials"
204
 msgstr "Mauvais identifiant et/ou mot de passe"
211
 msgstr "Mauvais identifiant et/ou mot de passe"
342
 msgid "%B %d at %I:%M%p"
349
 msgid "%B %d at %I:%M%p"
343
 msgstr "le %d %B à %H:%M"
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
 msgid "You are not authorized to access this resource"
370
 msgid "You are not authorized to access this resource"
347
 msgstr "Vous n'êtes pas autorisé à accéder à cette ressource"
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
 msgid "Nobody"
379
 msgid "Nobody"
351
 msgstr "Personne"
380
 msgstr "Personne"
352
 
381
 
353
-#: tracim/model/auth.py:87
382
+#: tracim/model/auth.py:94
354
 #: tracim/templates/dashboard.mak:33
383
 #: tracim/templates/dashboard.mak:33
355
-#: tracim/templates/master_authenticated.mak:87
384
+#: tracim/templates/master_authenticated.mak:93
356
 #: tracim/templates/master_no_toolbar_no_login.mak:111
385
 #: tracim/templates/master_no_toolbar_no_login.mak:111
357
 #: tracim/templates/user_get_all.mak:13
386
 #: tracim/templates/user_get_all.mak:13
358
 msgid "Users"
387
 msgid "Users"
359
 msgstr "Utilisateurs"
388
 msgstr "Utilisateurs"
360
 
389
 
361
-#: tracim/model/auth.py:88
390
+#: tracim/model/auth.py:95
362
 msgid "Global managers"
391
 msgid "Global managers"
363
 msgstr "Managers globaux"
392
 msgstr "Managers globaux"
364
 
393
 
365
-#: tracim/model/auth.py:89
394
+#: tracim/model/auth.py:96
366
 msgid "Administrators"
395
 msgid "Administrators"
367
 msgstr "Administrateurs"
396
 msgstr "Administrateurs"
368
 
397
 
369
-#: tracim/model/data.py:80
398
+#: tracim/model/data.py:83
370
 msgid "N/A"
399
 msgid "N/A"
371
 msgstr "N/A"
400
 msgstr "N/A"
372
 
401
 
373
-#: tracim/model/data.py:81
402
+#: tracim/model/data.py:84
374
 #: tracim/templates/help/page-user-role-definition.mak:15
403
 #: tracim/templates/help/page-user-role-definition.mak:15
375
 msgid "Reader"
404
 msgid "Reader"
376
 msgstr "Lecteur"
405
 msgstr "Lecteur"
377
 
406
 
378
-#: tracim/model/data.py:82
407
+#: tracim/model/data.py:85
379
 #: tracim/templates/help/page-user-role-definition.mak:19
408
 #: tracim/templates/help/page-user-role-definition.mak:19
380
 msgid "Contributor"
409
 msgid "Contributor"
381
 msgstr "Contributeurs"
410
 msgstr "Contributeurs"
382
 
411
 
383
-#: tracim/model/data.py:83
412
+#: tracim/model/data.py:86
384
 #: tracim/templates/help/page-user-role-definition.mak:23
413
 #: tracim/templates/help/page-user-role-definition.mak:23
385
 msgid "Content Manager"
414
 msgid "Content Manager"
386
 msgstr "Gestionnaire de contenu"
415
 msgstr "Gestionnaire de contenu"
387
 
416
 
388
-#: tracim/model/data.py:84
417
+#: tracim/model/data.py:87
389
 #: tracim/templates/help/page-user-role-definition.mak:27
418
 #: tracim/templates/help/page-user-role-definition.mak:27
390
 msgid "Workspace Manager"
419
 msgid "Workspace Manager"
391
 msgstr "Responsable"
420
 msgstr "Responsable"
392
 
421
 
393
-#: tracim/model/data.py:154
422
+#: tracim/model/data.py:157
394
 msgid "Item archived"
423
 msgid "Item archived"
395
 msgstr "Element archivé"
424
 msgstr "Element archivé"
396
 
425
 
397
-#: tracim/model/data.py:155
426
+#: tracim/model/data.py:158
398
 msgid "Item commented"
427
 msgid "Item commented"
399
 msgstr "Element commenté"
428
 msgstr "Element commenté"
400
 
429
 
401
-#: tracim/model/data.py:156
430
+#: tracim/model/data.py:159
402
 msgid "Item created"
431
 msgid "Item created"
403
 msgstr "Elément créé"
432
 msgstr "Elément créé"
404
 
433
 
405
-#: tracim/model/data.py:157
434
+#: tracim/model/data.py:160
406
 msgid "Item deleted"
435
 msgid "Item deleted"
407
 msgstr "Element supprimé"
436
 msgstr "Element supprimé"
408
 
437
 
409
-#: tracim/model/data.py:158
438
+#: tracim/model/data.py:161
410
 msgid "Item modified"
439
 msgid "Item modified"
411
 msgstr "Elément modifié"
440
 msgstr "Elément modifié"
412
 
441
 
413
-#: tracim/model/data.py:159
442
+#: tracim/model/data.py:162
414
 msgid "New revision"
443
 msgid "New revision"
415
 msgstr "Nouvelle version"
444
 msgstr "Nouvelle version"
416
 
445
 
417
-#: tracim/model/data.py:160
446
+#: tracim/model/data.py:163
418
 msgid "Status modified"
447
 msgid "Status modified"
419
 msgstr "Statut modifié"
448
 msgstr "Statut modifié"
420
 
449
 
421
-#: tracim/model/data.py:161
450
+#: tracim/model/data.py:164
422
 msgid "Item un-archived"
451
 msgid "Item un-archived"
423
 msgstr "Elément désarchivé"
452
 msgstr "Elément désarchivé"
424
 
453
 
425
-#: tracim/model/data.py:162
454
+#: tracim/model/data.py:165
426
 msgid "Item undeleted"
455
 msgid "Item undeleted"
427
 msgstr "Elément restauré"
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
 msgid "work in progress"
460
 msgid "work in progress"
432
 msgstr "travail en cours"
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
 msgid "closed — validated"
465
 msgid "closed — validated"
437
 msgstr "clos(e) — validé(e)"
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
 msgid "closed — cancelled"
470
 msgid "closed — cancelled"
442
 msgstr "clos(e) — annulé(e)"
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
 msgid "deprecated"
476
 msgid "deprecated"
448
 msgstr "obsolète"
477
 msgstr "obsolète"
449
 
478
 
450
-#: tracim/model/data.py:204
479
+#: tracim/model/data.py:207
451
 msgid "subject in progress"
480
 msgid "subject in progress"
452
 msgstr "discussion en cours"
481
 msgstr "discussion en cours"
453
 
482
 
454
-#: tracim/model/data.py:205
483
+#: tracim/model/data.py:208
455
 msgid "subject closed — resolved"
484
 msgid "subject closed — resolved"
456
 msgstr "discussion close — résolue"
485
 msgstr "discussion close — résolue"
457
 
486
 
458
-#: tracim/model/data.py:206
487
+#: tracim/model/data.py:209
459
 msgid "subject closed — cancelled"
488
 msgid "subject closed — cancelled"
460
 msgstr "discussion close — annulée"
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
 #: tracim/templates/create_account.mak:5
521
 #: tracim/templates/create_account.mak:5
463
 msgid "Create account"
522
 msgid "Create account"
464
 msgstr "Créer un compte"
523
 msgstr "Créer un compte"
465
 
524
 
466
 #: tracim/templates/dashboard.mak:5
525
 #: tracim/templates/dashboard.mak:5
467
 #: tracim/templates/dashboard.mak:12
526
 #: tracim/templates/dashboard.mak:12
468
-#: tracim/templates/master_authenticated.mak:80
527
+#: tracim/templates/master_authenticated.mak:86
469
 #: tracim/templates/master_no_toolbar_no_login.mak:105
528
 #: tracim/templates/master_no_toolbar_no_login.mak:105
470
 msgid "Dashboard"
529
 msgid "Dashboard"
471
 msgstr "Tableau de bord"
530
 msgstr "Tableau de bord"
548
 msgid "Move current folder"
607
 msgid "Move current folder"
549
 msgstr "Déplacer le dossier courant"
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
 msgid "Login"
623
 msgid "Login"
555
 msgstr "Login"
624
 msgstr "Login"
556
 
625
 
557
-#: tracim/templates/index.mak:34
626
+#: tracim/templates/index.mak:35
558
 msgid "Enter email"
627
 msgid "Enter email"
559
 msgstr "Adresse email"
628
 msgstr "Adresse email"
560
 
629
 
561
-#: tracim/templates/index.mak:40
630
+#: tracim/templates/index.mak:41
562
 msgid "Enter password"
631
 msgid "Enter password"
563
 msgstr "Mot de passe"
632
 msgstr "Mot de passe"
564
 
633
 
565
-#: tracim/templates/index.mak:45
634
+#: tracim/templates/index.mak:46
566
 msgid "Remember me"
635
 msgid "Remember me"
567
 msgstr "Se souvenir de moi"
636
 msgstr "Se souvenir de moi"
568
 
637
 
569
-#: tracim/templates/index.mak:53
638
+#: tracim/templates/index.mak:55
570
 msgid "Forgot password?"
639
 msgid "Forgot password?"
571
 msgstr "Mot de passe oublié ?"
640
 msgstr "Mot de passe oublié ?"
572
 
641
 
574
 msgid "Move folder"
643
 msgid "Move folder"
575
 msgstr "Déplacer le dossier"
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
 msgid "Create your own collaborative workspace on trac.im"
648
 msgid "Create your own collaborative workspace on trac.im"
580
 msgstr "Créez votre propre espace de travail collaboratif sur trac.im"
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
 #: tracim/templates/master_no_toolbar_no_login.mak:106
652
 #: tracim/templates/master_no_toolbar_no_login.mak:106
584
 #: tracim/templates/workspace_get_all.mak:64
653
 #: tracim/templates/workspace_get_all.mak:64
585
 msgid "Workspace"
654
 msgid "Workspace"
586
 msgstr "Espace de travail"
655
 msgstr "Espace de travail"
587
 
656
 
588
-#: tracim/templates/master_authenticated.mak:85
657
+#: tracim/templates/master_authenticated.mak:91
589
 #: tracim/templates/master_no_toolbar_no_login.mak:109
658
 #: tracim/templates/master_no_toolbar_no_login.mak:109
590
 msgid "Admin"
659
 msgid "Admin"
591
 msgstr "Admin"
660
 msgstr "Admin"
592
 
661
 
593
-#: tracim/templates/master_authenticated.mak:100
662
+#: tracim/templates/master_authenticated.mak:106
594
 msgid "you MUST desactivate debug in production"
663
 msgid "you MUST desactivate debug in production"
595
 msgstr "vous DEVEZ désactiver le mode \"debug\" en production"
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
 #: tracim/templates/master_no_toolbar_no_login.mak:144
677
 #: tracim/templates/master_no_toolbar_no_login.mak:144
599
 msgid "My account"
678
 msgid "My account"
600
 msgstr "Mon compte"
679
 msgstr "Mon compte"
601
 
680
 
602
-#: tracim/templates/master_authenticated.mak:136
681
+#: tracim/templates/master_authenticated.mak:149
603
 #: tracim/templates/master_no_toolbar_no_login.mak:149
682
 #: tracim/templates/master_no_toolbar_no_login.mak:149
604
 msgid "Logout"
683
 msgid "Logout"
605
 msgstr "Fermer la session"
684
 msgstr "Fermer la session"
667
 msgid "Password Reset Request"
746
 msgid "Password Reset Request"
668
 msgstr "Requête de réinitialisation du mot de passe"
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
 #: tracim/templates/thread_toolbars.mak:8
784
 #: tracim/templates/thread_toolbars.mak:8
671
 msgid "Edit current thread"
785
 msgid "Edit current thread"
672
 msgstr "Modifier le sujet de discussion"
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
 #: tracim/templates/user_get_all.mak:24
788
 #: tracim/templates/user_get_all.mak:24
683
 msgid "Create a user account..."
789
 msgid "Create a user account..."
684
 msgstr "Créer un compte utilisateur"
790
 msgstr "Créer un compte utilisateur"
685
 
791
 
686
 #: tracim/templates/user_get_all.mak:29
792
 #: tracim/templates/user_get_all.mak:29
687
 #: tracim/templates/user_get_all.mak:30
793
 #: tracim/templates/user_get_all.mak:30
688
-#: tracim/templates/user_workspace_folder_file_get_one.mak:70
689
 #: tracim/templates/user_workspace_forms.mak:43
794
 #: tracim/templates/user_workspace_forms.mak:43
690
 #: tracim/templates/user_workspace_forms.mak:44
795
 #: tracim/templates/user_workspace_forms.mak:44
691
 #: tracim/templates/user_workspace_forms.mak:223
796
 #: tracim/templates/user_workspace_forms.mak:223
782
 msgid "I am an administrator."
887
 msgid "I am an administrator."
783
 msgstr "Je suis un administrateur."
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
 #: tracim/templates/user_get_me.mak:42
890
 #: tracim/templates/user_get_me.mak:42
792
 msgid "I'm not member of any workspace."
891
 msgid "I'm not member of any workspace."
793
 msgstr "Je ne suis membre d'aucun espace de travail"
892
 msgstr "Je ne suis membre d'aucun espace de travail"
835
 msgstr "Changer le mot de passe"
934
 msgstr "Changer le mot de passe"
836
 
935
 
837
 #: tracim/templates/user_toolbars.mak:22
936
 #: tracim/templates/user_toolbars.mak:22
838
-#| msgid "Delete page"
839
 msgid "Delete user"
937
 msgid "Delete user"
840
 msgstr "Supprimer l'utilisateur"
938
 msgstr "Supprimer l'utilisateur"
841
 
939
 
882
 
980
 
883
 #: tracim/templates/user_workspace_folder_file_get_one.mak:41
981
 #: tracim/templates/user_workspace_folder_file_get_one.mak:41
884
 #: tracim/templates/user_workspace_folder_page_get_one.mak:42
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
 msgid "<b>This information is deprecated</b>"
984
 msgid "<b>This information is deprecated</b>"
887
 msgstr "<b>Cette information est obsolète</b>"
985
 msgstr "<b>Cette information est obsolète</b>"
888
 
986
 
889
 #: tracim/templates/user_workspace_folder_file_get_one.mak:48
987
 #: tracim/templates/user_workspace_folder_file_get_one.mak:48
890
 #: tracim/templates/user_workspace_folder_get_one.mak:35
988
 #: tracim/templates/user_workspace_folder_get_one.mak:35
891
 #: tracim/templates/user_workspace_folder_page_get_one.mak:49
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
 msgid "Show localisation"
991
 msgid "Show localisation"
894
 msgstr "Localiser cet élément"
992
 msgstr "Localiser cet élément"
895
 
993
 
896
 #: tracim/templates/user_workspace_folder_file_get_one.mak:55
994
 #: tracim/templates/user_workspace_folder_file_get_one.mak:55
897
 #: tracim/templates/user_workspace_folder_get_one.mak:40
995
 #: tracim/templates/user_workspace_folder_get_one.mak:40
898
 #: tracim/templates/user_workspace_folder_page_get_one.mak:56
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
 msgid "created on {} by <b>{}</b>"
998
 msgid "created on {} by <b>{}</b>"
901
 msgstr "Créé(e)  le {} par <b>{}</b>"
999
 msgstr "Créé(e)  le {} par <b>{}</b>"
902
 
1000
 
1056
 msgid "Optionnaly, you can describe the subject"
1154
 msgid "Optionnaly, you can describe the subject"
1057
 msgstr "Vous pouvez décrire le sujet (facultatif)"
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
 msgid "<b>Note</b>: In case you'd like to post a reply, you must first open again the thread"
1158
 msgid "<b>Note</b>: In case you'd like to post a reply, you must first open again the thread"
1061
 msgstr "<b>Note</b> : si vous souhaitez commenter cette discussion, vous devez tout d'abord en modifier le statut pour la ré-ouvrir"
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
 msgid "Post a reply..."
1162
 msgid "Post a reply..."
1065
 msgstr "Poster une réponse..."
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
 #: tracim/templates/user_workspace_forms.mak:10
1165
 #: tracim/templates/user_workspace_forms.mak:10
1072
 msgid "Folder name"
1166
 msgid "Folder name"
1073
 msgstr "Nom du dossier"
1167
 msgstr "Nom du dossier"
1182
 msgstr "Vous devez créer des répertoires pour organiser votre contenu"
1276
 msgstr "Vous devez créer des répertoires pour organiser votre contenu"
1183
 
1277
 
1184
 #: tracim/templates/user_workspace_get_one.mak:67
1278
 #: tracim/templates/user_workspace_get_one.mak:67
1185
-#| msgid "create new folder..."
1186
 msgid "Create a folder now"
1279
 msgid "Create a folder now"
1187
 msgstr "créer un dossier maintenant"
1280
 msgstr "créer un dossier maintenant"
1188
 
1281
 
1226
 msgid "{} message(s)"
1319
 msgid "{} message(s)"
1227
 msgstr "{} message(s)"
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
 msgid "You have no workspace."
1323
 msgid "You have no workspace."
1232
 msgstr "Vous n'avez pas d'espaces de travail"
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
 msgid "Create a workspace"
1327
 msgid "Create a workspace"
1237
 msgstr "Créer un espace de travail"
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
 msgid "Contact the administrator."
1331
 msgid "Contact the administrator."
1242
 msgstr "Contactez un administrateur."
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
 #: tracim/templates/workspace_edit.mak:8
1338
 #: tracim/templates/workspace_edit.mak:8
1245
 msgid "Edit Workspace"
1339
 msgid "Edit Workspace"
1246
 msgstr "Modifier l'espace de travail"
1340
 msgstr "Modifier l'espace de travail"

+ 30 - 4
tracim/tracim/lib/content.py View File

125
 
125
 
126
         return breadcrumb
126
         return breadcrumb
127
 
127
 
128
-    def _base_query(self, workspace: Workspace=None):
128
+    def __real_base_query(self, workspace: Workspace=None):
129
         result = DBSession.query(Content)
129
         result = DBSession.query(Content)
130
 
130
 
131
         if workspace:
131
         if workspace:
132
             result = result.filter(Content.workspace_id==workspace.workspace_id)
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
         if not self._show_deleted:
159
         if not self._show_deleted:
135
             parent = aliased(Content)
160
             parent = aliased(Content)
136
-            result.join(parent, Content.parent).\
161
+            result = result.join(parent, Content.parent).\
137
                 filter(Content.is_deleted==False).\
162
                 filter(Content.is_deleted==False).\
138
                 filter(parent.is_deleted==False)
163
                 filter(parent.is_deleted==False)
139
 
164
 
140
         if not self._show_archived:
165
         if not self._show_archived:
141
             parent = aliased(Content)
166
             parent = aliased(Content)
142
-            result.join(parent, Content.parent).\
167
+            result = result.join(parent, Content.parent).\
143
                 filter(Content.is_archived==False).\
168
                 filter(Content.is_archived==False).\
144
                 filter(parent.is_archived==False)
169
                 filter(parent.is_archived==False)
145
 
170
 
350
 
375
 
351
 
376
 
352
         if do_flush:
377
         if do_flush:
378
+            DBSession.add(content)
353
             DBSession.flush()
379
             DBSession.flush()
354
 
380
 
355
         if do_notify:
381
         if do_notify:
380
 
406
 
381
         filter_group_label = list(Content.label.ilike('%{}%'.format(keyword)) for keyword in keywords)
407
         filter_group_label = list(Content.label.ilike('%{}%'.format(keyword)) for keyword in keywords)
382
         filter_group_desc = list(Content.description.ilike('%{}%'.format(keyword)) for keyword in keywords)
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
             filter(or_(*(filter_group_label+filter_group_desc))).\
410
             filter(or_(*(filter_group_label+filter_group_desc))).\
385
             options(joinedload('children')).\
411
             options(joinedload('children')).\
386
             options(joinedload('parent'))
412
             options(joinedload('parent'))

+ 1 - 1
tracim/tracim/templates/search.mak View File

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

+ 75 - 3
tracim/tracim/tests/library/test_content_api.py View File

5
 
5
 
6
 import transaction
6
 import transaction
7
 
7
 
8
+from tracim.lib.base import logger
8
 from tracim.lib.content import compare_content_for_sorting_by_type_and_name
9
 from tracim.lib.content import compare_content_for_sorting_by_type_and_name
9
 from tracim.lib.content import ContentApi
10
 from tracim.lib.content import ContentApi
10
 from tracim.lib.user import UserApi
11
 from tracim.lib.user import UserApi
187
 
188
 
188
         api = ContentApi(user)
189
         api = ContentApi(user)
189
         p = api.create(ContentType.Page, None, None, 'this_is_a_page')
190
         p = api.create(ContentType.Page, None, None, 'this_is_a_page')
190
-        transaction.commit()
191
-
192
         c = api.create_comment(None, p, 'this is the comment', True)
191
         c = api.create_comment(None, p, 'this is the comment', True)
193
-        transaction.commit()
194
 
192
 
195
         eq_(Content, c.__class__)
193
         eq_(Content, c.__class__)
196
         eq_(p.content_id, c.parent_id)
194
         eq_(p.content_id, c.parent_id)
377
         eq_(False, updated2.is_deleted)
375
         eq_(False, updated2.is_deleted)
378
         eq_(ActionDescription.UNDELETION, updated2.revision_type)
376
         eq_(ActionDescription.UNDELETION, updated2.revision_type)
379
         eq_(u1id, updated2.owner_id)
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()])