Index: Extensions/Install.py
===================================================================
--- Extensions/Install.py	(révision 901)
+++ Extensions/Install.py	(copie de travail)
@@ -83,14 +83,14 @@
         if not 'DiscussionManager' in existing:
             rmanager.addRole('DiscussionManager')
             out.write("Added DiscussionManager role top portal.\n")
-    else:
-        roles = list(self.__ac_roles__)
-        if not 'DiscussionManager' in roles:
-            roles.append('DiscussionManager')
-            roles = tuple(roles)
-            self.__ac_roles__ = roles
-            out.write("Added DiscussionManager role top portal.\n")
 
+    roles = list(self.__ac_roles__)
+    if not 'DiscussionManager' in roles:
+        roles.append('DiscussionManager')
+        roles = tuple(roles)
+        self.__ac_roles__ = roles
+        out.write("Added DiscussionManager role top portal.\n")
+
     self.manage_permission('Moderate Discussion', ['DiscussionManager', 'Manager'])
     #  Add 'DiscussionManagers' group
     gtool = getToolByName(self, 'portal_groups')
Index: i18n/plonecomments-plone-es.po
===================================================================
--- i18n/plonecomments-plone-es.po	(révision 901)
+++ i18n/plonecomments-plone-es.po	(copie de travail)
@@ -15,7 +15,7 @@
 "Language-Code: es\n"
 "Language-Name: Español\n"
 "Preferred-Encodings: utf-8 latin1\n"
-"Domain: plonecomments\n"
+"Domain: plone\n"
 "X-Is-Fallback-For: es-ar es-bo es-cl es-co es-cr es-do es-ec es-es es-sv es-gt es-hn es-mx es-ni es-pa es-py es-pe es-pr es-us es-uy es-ve\n"
 
 #: skins/qplonecomments/prefs_comments_setup.cpy
Index: i18n/plonecomments-plone-fr.po
===================================================================
--- i18n/plonecomments-plone-fr.po	(révision 901)
+++ i18n/plonecomments-plone-fr.po	(copie de travail)
@@ -1,23 +1,30 @@
-# --- PLEASE EDIT THE LINES BELOW CORRECTLY ---
-# SOME DESCRIPTIVE TITLE.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+# French qPloneComments translations in plone domain
+# Pierre-Yves Landuré <pierre-yves@landure.org>, 2007.
 msgid ""
 msgstr ""
 "Project-Id-Version: qPloneComments\n"
-"POT-Creation-Date: 2006-08-17 16:18+0000\n"
-"PO-Revision-Date: 2006-11-10 09:03-0500\n"
-"Last-Translator: Nicole Turgeon-Courchesne <nicole@motspourmaux.com>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
+"POT-Creation-Date: 2007-07-02 16:18+0000\n"
+"PO-Revision-Date: 2007-07-06 09:03-0500\n"
+"Last-Translator: Pierre-Yves Landuré <py.landure@dorigo.fr>\n"
+"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=utf-8\n"
+"Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=1; plural=0\n"
 "Language-Code: fr\n"
 "Language-Name: French\n"
 "Preferred-Encodings: utf-8 latin1\n"
-"Domain: plonecomments\n"
+"Domain: plone\n"
 "X-Is-Fallback-For: fr-be fr-ca fr-lu fr-mc fr-ch fr-fr\n"
 
+# Role name translation.
+msgid "DiscussionManager"
+msgstr "Modérateur de commentaires"
+
+# setup link translation.
+msgid "qPloneComments setup"
+msgstr "Paramètres de qPloneComments"
+
 #: skins/qplonecomments/prefs_comments_setup.cpy
 msgid "qPloneComments configuration changes saved."
 msgstr "Changements à la configuration qPloneComments sauvegardés"
@@ -48,9 +55,3 @@
 msgid "Currently, all comments require approval before being published. Please check back later."
 msgstr "Présentement, tous les commentaires doivent être approuvés avant d’être publiés. Vérifiez plus tard."
 
-#: skins/qplonecomments/2.0.5/validate_talkback.vpy
-#: skins/qplonecomments/2.1/validate_talkback.vpy
-#: skins/qplonecomments/2.5/validate_talkback.vpy
-msgid "Please enter your name."
-msgstr "Veuillez indiquer votre nom."
-
Index: i18n/plonecomments-plone-de.po
===================================================================
--- i18n/plonecomments-plone-de.po	(révision 901)
+++ i18n/plonecomments-plone-de.po	(copie de travail)
@@ -15,7 +15,7 @@
 "Language-Code: de\n"
 "Language-Name: Deutsch\n"
 "Preferred-Encodings: utf-8 latin1\n"
-"Domain: plonecomments\n"
+"Domain: plone\n"
 "X-Is-Fallback-For: de-at de-li de-lu de-ch de-de\n"
 
 #: skins/qplonecomments/prefs_comments_setup.cpy
Index: i18n/plonecomments-fr.po
===================================================================
--- i18n/plonecomments-fr.po	(révision 901)
+++ i18n/plonecomments-fr.po	(copie de travail)
@@ -5,8 +5,8 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "POT-Creation-Date: 2006-10-13 20:12+0000\n"
-"PO-Revision-Date: 2006-11-10 08:59-0500\n"
-"Last-Translator: Nicole Turgeon-Courchesne <nicole@motspourmaux.com>\n"
+"PO-Revision-Date: 2007-07-02 08:59-0500\n"
+"Last-Translator: Pierre-Yves Landuré <py.landure@dorigo.fr>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=utf-8\n"
@@ -102,7 +102,7 @@
 #: skins/qplonecomments/prefs_comments_setup_form.cpt
 #: skins/qplonecomments/prefs_recent_comments_form.cpt
 msgid "label_comments"
-msgstr "Modération récente de commentaires"
+msgstr "Modération des commentaires récents"
 
 #. Default: "Configure qPloneComments"
 #: skins/qplonecomments/prefs_comments_setup_form.cpt
@@ -180,3 +180,90 @@
 msgid "text_no_new_comments"
 msgstr "Aucun nouveau commentaire"
 
+#. Default: "Require Anonym Email."
+#: skins/qplonecomments/prefs_comments_setup_form.cpt
+msgid "label_require_anonym_email"
+msgstr "Requérir l'email pour les commentaires anonymes."
+
+#. Default: "Enable Manager moderation."
+#: skins/qplonecomments/prefs_comments_setup_form.cpt
+msgid "enable_manager_moderation"
+msgstr "Permettre la modération par l'administrateur"
+
+#. Default: "Send comments notification emails to:"
+#: skins/qplonecomments/prefs_comments_setup_form.cpt
+msgid "label_discussion-manager_email"
+msgstr "Envoyer les emails de notification de commentaire à:"
+
+#. Default: "The e-mail address where notifications about adding new comments will be sent."
+#: skins/qplonecomments/prefs_comments_setup_form.cpt
+msgid "help_discussion-manager_email"
+msgstr "L'adresse email où seront envoyées les notifications d'ajout de nouveau commentaire."
+
+#. Default: "Enable Commentator notification on comment was published."
+#: skins/qplonecomments/prefs_comments_setup_form.cpt
+msgid "label_enable_approve_user_notification"
+msgstr "Notifier l'auteur du commentaire lors de la publication du commentaire."
+
+#. Default: "Enable Commentator notification on comment was rejected."
+#: skins/qplonecomments/prefs_comments_setup_form.cpt
+msgid "label_enable_reject_notification"
+msgstr "Notifier l'auteur du commentaire en cas de rejet du commentaire."
+
+#. Default: "Enable Commentator notification on comment was replied."
+#: skins/qplonecomments/prefs_comments_setup_form.cpt
+msgid "label_enable_reply_notification"
+msgstr "Notifier l'auteur du commentaire en cas de réponse au commentaire."
+
+#. Default: "Save"
+#: skins/qplonecomments/prefs_comments_setup_form.cpt
+msgid "Save"
+msgstr "Enregistrer"
+
+#. Default: "Comment must be approved before replies to comment accepted."
+#: skins/qplonecomments/2.0.5/viewThreadsAtBottom.cpt
+#: skins/qplonecomments/2.1/viewThreadsAtBottom.cpt
+#: skins/qplonecomments/2.5/viewThreadsAtBottom.cpt
+msgid "text_no_add_reply"
+msgstr "Le commentaire doit être approuvé avant que les réponses soient acceptées."
+
+#. Default: "Reply"
+#: skins/qplonecomments/2.0.5/viewThreadsAtBottom.cpt
+#: skins/qplonecomments/2.1/viewThreadsAtBottom.cpt
+#: skins/qplonecomments/2.5/viewThreadsAtBottom.cpt
+msgid "label_reply"
+msgstr "Répondre"
+
+#. Default: "[pending]"
+#: skins/qplonecomments/2.0.5/viewThreadsAtBottom.cpt
+#: skins/qplonecomments/2.1/viewThreadsAtBottom.cpt
+#: skins/qplonecomments/2.5/viewThreadsAtBottom.cpt
+msgid "label_pending"
+msgstr "[en attente]"
+
+#. Default: "Delete"
+#: skins/qplonecomments/prefs_recent_comments_form.cpt
+msgid "Delete"
+msgstr "Supprimer"
+
+#. Default: "Please enter your name."
+#: skins/qplonecomments/2.0.5/validate_talkback.vpy
+#: skins/qplonecomments/2.1/validate_talkback.vpy
+#: skins/qplonecomments/2.5/validate_talkback.vpy
+msgid "Please enter your name."
+msgstr "Veuillez indiquer votre nom."
+
+#. Default: "Please submit a subject."
+#: skins/qplonecomments/2.0.5/validate_talkback.vpy
+#: skins/qplonecomments/2.1/validate_talkback.vpy
+#: skins/qplonecomments/2.5/validate_talkback.vpy
+msgid "Please submit a subject."
+msgstr "Veuillez saisir un sujet."
+
+#. Default: "Please submit a body."
+#: skins/qplonecomments/2.0.5/validate_talkback.vpy
+#: skins/qplonecomments/2.1/validate_talkback.vpy
+#: skins/qplonecomments/2.5/validate_talkback.vpy
+msgid "Please submit a body."
+msgstr "Veuillez saisir un commentaire."
+
Index: i18n/plonecomments-plone-uk.po
===================================================================
--- i18n/plonecomments-plone-uk.po	(révision 901)
+++ i18n/plonecomments-plone-uk.po	(copie de travail)
@@ -18,7 +18,7 @@
 "Language-Code: uk\n"
 "Language-Name: Українська\n"
 "Preferred-Encodings: utf-8 koi8-u windows-1251\n"
-"Domain: plonecomments\n"
+"Domain: plone\n"
 "X-Rosetta-Export-Date: 2007-06-11 12:29+0000\n"
 
 #: skins/qplonecomments/prefs_comments_setup.cpy
Index: skins/qplonecomments/rejected_comment_template.pt
===================================================================
--- skins/qplonecomments/rejected_comment_template.pt	(révision 901)
+++ skins/qplonecomments/rejected_comment_template.pt	(copie de travail)
@@ -6,6 +6,7 @@
                  obj nocall:options/obj"
 >To: <tal:x replace="options/mto"/>
 From: <tal:x replace="options/mfrom"/>
+Content-Type: text/plain; charset="<tal:x replace="charset" />"
 Subject: <tal:subject define="obj nocall:options/obj" 
                       i18n:translate="notifyreject_subject">Your comment on '<tal:x replace="obj/Title" i18n:name="title"/>' was not approved.</tal:subject>
 
Index: skins/qplonecomments/reply_notify_template.pt
===================================================================
--- skins/qplonecomments/reply_notify_template.pt	(révision 901)
+++ skins/qplonecomments/reply_notify_template.pt	(copie de travail)
@@ -6,6 +6,7 @@
                  obj nocall:options/obj"
 >To: <tal:x replace="options/mto"/>
 From: <tal:x replace="options/mfrom"/>
+Content-Type: text/plain; charset="tal:x replace="charset" />"
 Subject: <tal:subject define="obj nocall:options/obj" 
                       i18n:translate="replynotify_subject">Someone replied to your comment on '<tal:x replace="obj/Title" i18n:name="title"/>'</tal:subject>
 
Index: skins/qplonecomments/2.5/viewThreadsAtBottom.pt
===================================================================
--- skins/qplonecomments/2.5/viewThreadsAtBottom.pt	(révision 901)
+++ skins/qplonecomments/2.5/viewThreadsAtBottom.pt	(copie de travail)
@@ -66,7 +66,8 @@
                         <span i18n:translate="label_commented_at">at</span> 
                         <span tal:replace="python:toLocalizedTime(reply.ModificationDate(),
                                            long_format=1)">8/23/2001 12:40:44 PM</span>
-                        <span tal:condition="python:ifModerate and not isPublished">[pending]</span>
+                        <span tal:condition="python:ifModerate and not isPublished"
+                              i18n:domain="plonecomments" i18n:translate="label_pending">[pending]</span>
                     </div>
                     <div class="commentBody"
                          tal:content="structure reply/CookedBody">
Index: skins/qplonecomments/notify_comment_template.pt
===================================================================
--- skins/qplonecomments/notify_comment_template.pt	(révision 901)
+++ skins/qplonecomments/notify_comment_template.pt	(copie de travail)
@@ -6,6 +6,7 @@
                  obj nocall:options/obj"
 >To: <tal:x replace="options/mto"/>
 From: <tal:x replace="options/mfrom"/>
+Content-Type: text/plain; charset="<tal:x replace="charset" />"
 Subject: <tal:subject define="obj nocall:options/obj" 
                       i18n:translate="notifycomment_subject">Your comment on '<tal:x replace="obj/Title" i18n:name="title"/>' is now published</tal:subject>
 
Index: skins/qplonecomments/approve_comment_template.pt
===================================================================
--- skins/qplonecomments/approve_comment_template.pt	(révision 901)
+++ skins/qplonecomments/approve_comment_template.pt	(copie de travail)
@@ -5,6 +5,7 @@
                  organization_name options/organization_name"
 >To: <tal:x replace="options/mto"/>
 From: <tal:x replace="options/mfrom"/>
+Content-Type: text/plain; charset="<tal:x replace="charset" />"
 Subject: <tal:x condition="organization_name" replace="string:[$organization_name] "/><tal:subject i18n:translate="approvemail_subject">New comment awaits moderation</tal:subject>
 
 <tal:new_comment define="obj nocall:options/obj" 
Index: skins/qplonecomments/published_comment_template.pt
===================================================================
--- skins/qplonecomments/published_comment_template.pt	(révision 901)
+++ skins/qplonecomments/published_comment_template.pt	(copie de travail)
@@ -5,6 +5,7 @@
                  organization_name options/organization_name"
 >To: <tal:x replace="options/mto"/>
 From: <tal:x replace="options/mfrom"/>
+Content-Type: text/plain; charset="<tal:x replace="charset" />"
 Subject: <tal:x condition="organization_name" replace="string:[$organization_name] "/><tal:subject i18n:translate="publishedmail_subject">New comment added</tal:subject>
 
 <tal:new_comment define="obj nocall:options/obj" i18n:translate="publishedmail_new_comment_link">
Index: utils.py
===================================================================
--- utils.py	(révision 901)
+++ utils.py	(copie de travail)
@@ -70,6 +70,44 @@
             return email
         return ''
 
+    def getEmailsOfUsersWithRoles(object, roles= ()):
+        """
+        Return users with the given roles on the object.
+        """
+
+        def getAllUsers(context):
+            """
+            Return a list of all user ids of the portal
+
+            WARNING: this method may be costly if you rely on an external
+            (non ZODB) user source. Use it at your own risk.
+            """
+            mtool = getToolByName(context, 'portal_membership')
+            return mtool.listMemberIds()
+
+        def getMemberObjectById(context, member_id):
+            """
+            Return member object from member id.
+            """
+            membership_tool = getToolByName(context, "portal_membership")
+            if member_id:
+                return  membership_tool.getMemberById(member_id)
+            return None
+
+        membership_tool = getToolByName(object, "portal_membership")
+        # We init the results vars.
+        user_emails = []
+        for user_id in getAllUsers(object):
+          user = getMemberObjectById(object, user_id)
+          if user:
+            user_roles = user.getRolesInContext(object)
+            for role in roles:
+              if list(user_roles).count(role):
+                  email = user.getProperty('email', None)
+                  if email and (not user_emails.count(email)):
+                      user_emails.append(email)
+        return tuple(user_emails)
+
     def getParent(reply):
         reply = reply.inReplyTo()
         return reply.meta_type == 'Discussion Item' and getParent(reply) or reply
@@ -145,7 +183,14 @@
 
     elif state == 'enable_approve_notification':
         template = 'approve_comment_template'
-        user_email = getProp(context, "email_discussion_manager", None)
+        setup_email = getProp(context, "email_discussion_manager", None)
+        discussionmanagers_email = list(getEmailsOfUsersWithRoles(context, ('DiscussionManager',)))
+
+        if not discussionmanagers_email.count(setup_email):
+            discussionmanagers_email.append(setup_email)
+
+        user_email = ','.join(discussionmanagers_email)
+
         if user_email:
             args={'mto':user_email,
                   'mfrom':admin_email,
