Merge branch 'master' into delete-own-comments

Conflicts:
	CHANGES.rst
This commit is contained in:
Timo Stollenwerk 2015-01-29 21:14:05 +01:00
commit c852609111
20 changed files with 355 additions and 237 deletions

19
.travis.yml Normal file
View File

@ -0,0 +1,19 @@
language: python
python: "2.7"
sudo: false
cache:
directories:
- eggs
before_install:
- pip install http://effbot.org/downloads/Imaging-1.1.7.tar.gz
install:
- mkdir -p buildout-cache/eggs
- mkdir -p buildout-cache/downloads
- python bootstrap-buildout.py --setuptools-version=8.3 -c travis.cfg
- bin/buildout -N -t 3 -c travis.cfg
script:
- bin/code-analysis
- bin/test-coverage
after_success:
- pip install -q coveralls
- coveralls

View File

@ -1,13 +1,23 @@
Changelog
=========
2.3.3 (unreleased)
2.3.4 (unreleased)
------------------
- Add permission to allow comment authors to delete their own comments if
there are no replies yet.
[gaudenz]
- Updated portuguese pt-br translation.
[jtmolon]
- Read mail settings from new (Plone 5) registry.
[timo]
2.3.3 (2014-10-23)
------------------
- Don't execute createReplyForm js if there is no in_reply_to button.
[vincentfretin]
@ -198,6 +208,7 @@ Changelog
- Updated Ukrainian translation
[kroman0]
2.2.3 (2013-01-13)
------------------
@ -205,6 +216,7 @@ Changelog
the email field on comment add form when anonymous.
[toutpt]
2.2.2 (2012-11-16)
------------------
@ -216,8 +228,8 @@ Changelog
2.2.1 (2012-11-16)
------------------
- Make conversation view not break when comment-id cannot be converted to long.
Fixes #13327
- Make conversation view not break when comment-id cannot be converted to
long. This fixes #13327
[khink]
- fix insufficient privileges when trying to view

View File

@ -56,6 +56,11 @@ parser.add_option("-c", "--config-file",
"file to be used."))
parser.add_option("-f", "--find-links",
help=("Specify a URL to search for buildout releases"))
parser.add_option("--allow-site-packages",
action="store_true", default=False,
help=("Let bootstrap.py use existing site packages"))
parser.add_option("--setuptools-version",
help="use a specific setuptools version")
options, args = parser.parse_args()
@ -63,27 +68,37 @@ options, args = parser.parse_args()
######################################################################
# load/install setuptools
to_reload = False
try:
import pkg_resources
if options.allow_site_packages:
import setuptools
except ImportError:
ez = {}
try:
import pkg_resources
from urllib.request import urlopen
except ImportError:
from urllib2 import urlopen
# XXX use a more permanent ez_setup.py URL when available.
exec(urlopen('https://bitbucket.org/pypa/setuptools/raw/0.7.2/ez_setup.py'
).read(), ez)
setup_args = dict(to_dir=tmpeggs, download_delay=0)
ez['use_setuptools'](**setup_args)
ez = {}
exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez)
if to_reload:
reload(pkg_resources)
if not options.allow_site_packages:
# ez_setup imports site, which adds site packages
# this will remove them from the path to ensure that incompatible versions
# of setuptools are not in the path
import site
# inside a virtualenv, there is no 'getsitepackages'.
# We can't remove these reliably
if hasattr(site, 'getsitepackages'):
for sitepackage_path in site.getsitepackages():
sys.path[:] = [x for x in sys.path if sitepackage_path not in x]
setup_args = dict(to_dir=tmpeggs, download_delay=0)
if options.setuptools_version is not None:
setup_args['version'] = options.setuptools_version
ez['use_setuptools'](**setup_args)
import setuptools
import pkg_resources
# This does not (always?) update the default working set. We will
# do it.
for path in sys.path:
@ -119,10 +134,15 @@ if version is None and not options.accept_buildout_test_releases:
_final_parts = '*final-', '*final'
def _final_version(parsed_version):
try:
return not parsed_version.is_prerelease
except AttributeError:
# Older setuptools
for part in parsed_version:
if (part[:1] == '*') and (part not in _final_parts):
return False
return True
index = setuptools.package_index.PackageIndex(
search_path=[setuptools_path])
if find_links:
@ -149,8 +169,7 @@ cmd.append(requirement)
import subprocess
if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=setuptools_path)) != 0:
raise Exception(
"Failed to execute command:\n%s",
repr(cmd)[1:-1])
"Failed to execute command:\n%s" % repr(cmd)[1:-1])
######################################################################
# Import and run buildout

View File

@ -1,13 +1,44 @@
[buildout]
extends = https://raw.github.com/collective/buildout.plonetest/master/test-4.3.x.cfg
package-name = plone.app.discussion
package-extras = [test]
parts +=
extends = http://dist.plone.org/release/4.3.4/versions.cfg
parts =
instance
test
coverage
test-coverage
mkrelease
pocompile
code-analysis
i18ndude
update_translations
develop = .
[instance]
recipe = plone.recipe.zope2instance
http-address = 8080
user = admin:admin
eggs = Plone
[test]
recipe = zc.recipe.testrunner
eggs = plone.app.discussion [test]
defaults = ['-s', 'plone.app.discussion', '--auto-color', '--auto-progress']
[coverage]
recipe = zc.recipe.egg
eggs = coverage
[test-coverage]
recipe = collective.recipe.template
input = inline:
#!/bin/bash
${buildout:directory}/bin/coverage run --source=${buildout:directory}/src/plone/app/discussion bin/test
${buildout:directory}/bin/coverage html
${buildout:directory}/bin/coverage report -m --fail-under=100
# Fail (exit status 1) if coverage returns exit status 2 (this happens
# when test coverage is below 100%.
output = ${buildout:directory}/bin/test-coverage
mode = 755
[mkrelease]
recipe = zc.recipe.egg
@ -22,17 +53,6 @@ recipe = plone.recipe.codeanalysis
directory = ${buildout:directory}/plone/app/discussion
flake8-max-complexity = 50
[versions]
plone.app.discussion =
zope.interface = 4.0.5
plone.app.portlets = 2.5a1
plone.dexterity = 2.2.1
plone.app.querystring = 1.1.0
plone.app.jquery = 1.8.3
plone.app.testing = 4.2.4
plone.app.vocabularies = 2.1.14
[i18ndude]
recipe = zc.recipe.egg
eggs =
@ -60,3 +80,9 @@ input = inline:
msgfmt --no-hash -o $BASE_PATH/i18n/plone-$LANG.mo $BASE_PATH/i18n/plone-$LANG.po
done
mode = 755
[versions]
plone.app.discussion =
zope.interface = 4.0.5
zc.buildout = 2.3.1
setuptools = 8.0.4

View File

@ -1,32 +0,0 @@
[buildout]
extends =
https://raw.github.com/collective/buildout.plonetest/master/plone-4.3.x.cfg
https://raw.github.com/plone/buildout.jenkins/master/jenkins.cfg
https://raw.github.com/plone/buildout.jenkins/master/jenkins-code-analysis.cfg
jenkins-test-eggs = plone.app.discussion [test]
jenkins-test-directories = plone/app/discussion
parts +=
flake8
code-analysis
extensions = mr.developer
auto-checkout =
plone.recipe.codeanalysis
collective.xmltestreport
[flake8]
recipe = zc.recipe.egg
eggs = flake8
entry-points = flake8=flake8.main:main
[code-analysis]
recipe = plone.recipe.codeanalysis
[sources]
plone.recipe.codeanalysis = git git://github.com/tisto/plone.recipe.codeanalysis.git pushurl=git@github.com:tisto/plone.recipe.codeanalysis.git
collective.xmltestreport = git git://github.com/collective/collective.xmltestreport.git
[versions]
plone.app.discussion =
zope.interface = 3.6.1
zc.buildout = 2.1.0
zc.recipe.egg = 2.0.0

View File

@ -14,7 +14,7 @@
<body>
<div id="content"
<article id="content"
tal:attributes="class view/settings"
metal:fill-slot="prefs_configlet_content">
@ -99,6 +99,6 @@
</div>
</div>
</div>
</article>
</body>
</html>

View File

@ -1,10 +1,8 @@
# -*- coding: utf-8 -*-
from Acquisition import aq_base, aq_inner
from zope.component import getUtility
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.interfaces._content import IDiscussionResponse
from Products.CMFPlone.interfaces.controlpanel import IMailSchema
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
@ -157,12 +155,11 @@ class DiscussionSettingsControlPanel(controlpanel.ControlPanelFormWrapper):
def mailhost_warning(self):
"""Returns true if mailhost is not configured properly.
"""
# Copied from plone.app.controlpanel/plone/app/controlpanel/overview.py
mailhost = getToolByName(aq_inner(self.context), 'MailHost', None)
if mailhost is None:
return True
mailhost = getattr(aq_base(mailhost), 'smtp_host', None)
email = getattr(aq_inner(self.context), 'email_from_address', None)
# Copied from Products.CMFPlone/controlpanel/browser/overview.py
registry = getUtility(IRegistry)
mail_settings = registry.forInterface(IMailSchema, prefix='plone')
mailhost = mail_settings.smtp_host
email = mail_settings.email_from_address
if mailhost and email:
return False
return True
@ -182,7 +179,7 @@ class DiscussionSettingsControlPanel(controlpanel.ControlPanelFormWrapper):
def unmigrated_comments_warning(self):
"""Returns true if site contains unmigrated comments.
"""
catalog = getToolByName(aq_inner(self.context), 'portal_catalog', None)
catalog = getToolByName(self.context, 'portal_catalog', None)
count_comments_old = catalog.searchResults(
object_provides=IDiscussionResponse.__identifier__)
if count_comments_old:

View File

@ -9,6 +9,7 @@ from datetime import datetime
from smtplib import SMTPException
from zope.annotation.interfaces import IAnnotatable
from zope.component import getUtility
from zope.event import notify
from zope.component.factory import Factory
@ -31,8 +32,6 @@ from Products.CMFPlone.utils import safe_unicode
from OFS.Traversable import Traversable
from plone.registry.interfaces import IRegistry
from plone.app.discussion.events import CommentAddedEvent
from plone.app.discussion.events import CommentRemovedEvent
from plone.app.discussion.events import ReplyAddedEvent
@ -43,8 +42,11 @@ from plone.app.discussion.interfaces import IComment
from plone.app.discussion.interfaces import IConversation
from plone.app.discussion.interfaces import IDiscussionSettings
from plone.registry.interfaces import IRegistry
from Products.CMFCore.CMFCatalogAware import CatalogAware
from Products.CMFCore.CMFCatalogAware import WorkflowAware
from Products.CMFPlone.interfaces.controlpanel import IMailSchema
from OFS.role import RoleManager
from AccessControl import ClassSecurityInfo
@ -329,9 +331,9 @@ def notify_user(obj, event):
# Get informations that are necessary to send an email
mail_host = getToolByName(obj, 'MailHost')
portal_url = getToolByName(obj, 'portal_url')
portal = portal_url.getPortalObject()
sender = portal.getProperty('email_from_address')
registry = getUtility(IRegistry)
mail_settings = registry.forInterface(IMailSchema, prefix='plone')
sender = mail_settings.email_from_address
# Check if a sender address is available
if not sender:
@ -403,9 +405,9 @@ def notify_moderator(obj, event):
# Get informations that are necessary to send an email
mail_host = getToolByName(obj, 'MailHost')
portal_url = getToolByName(obj, 'portal_url')
portal = portal_url.getPortalObject()
sender = portal.getProperty('email_from_address')
registry = getUtility(IRegistry)
mail_settings = registry.forInterface(IMailSchema, prefix='plone')
sender = mail_settings.email_from_address
if settings.moderator_email:
mto = settings.moderator_email

View File

@ -2,13 +2,13 @@ msgid ""
msgstr ""
"Project-Id-Version: plone.app.discussion\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI +ZONE\n"
"PO-Revision-Date: 2010-11-17 16:52+0100\n"
"Last-Translator: Victor Fernandez de Alba <sneridagh@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"PO-Revision-Date: 2014-12-11 16:07+0100\n"
"Last-Translator: Roberto Diaz <plone.team@upcnet.es>\n"
"Language-Team: Catalan <plone-i18n@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Language-Code: ca\n"
"Language-Name: Catalan\n"
"Preferred-Encodings: utf-8 latin1\n"
@ -30,42 +30,41 @@ msgstr "Afegir un comentari"
msgid "Anonymous Comments"
msgstr "Comentaris anònims"
#: ../browser/comments.py:274
#: ../browser/controlpanel.py:93
#: ../browser/comments.py:274 ../browser/controlpanel.py:93
msgid "Cancel"
msgstr "Cancel·la"
#: ../browser/controlpanel.py:89
msgid "Changes saved"
msgstr ""
msgstr "Canvis desats"
#: ../browser/moderation.py:154
msgid "Comment approved."
msgstr "Comentari aprovat."
#: ../contentrules.py:96
#: ../contentrules.py:92
msgid "Comment author email"
msgstr ""
msgstr "Correu electrònic de l'autor del comentari"
#: ../contentrules.py:85
#: ../contentrules.py:81
msgid "Comment author full name"
msgstr ""
msgstr "Nom complet de l'autor del comentari"
#: ../contentrules.py:74
#: ../contentrules.py:70
msgid "Comment author user name"
msgstr ""
msgstr "Nom d'usuari de l'autor del comentari "
#: ../browser/moderation.py:108
msgid "Comment deleted."
msgstr "Comentari esborrat."
#: ../contentrules.py:52
#: ../contentrules.py:48
msgid "Comment id"
msgstr ""
msgstr "Identificador del comentari"
#: ../contentrules.py:63
#: ../contentrules.py:59
msgid "Comment text"
msgstr ""
msgstr "Text del comentari"
#: ../browser/controlpanel.py:76
msgid "Commenter Image"
@ -74,9 +73,9 @@ msgstr "Imatge de l'autor"
msgid "Commenting infrastructure for Plone"
msgstr "Infraestructura de comentaris per Plone"
#: ../contentrules.py:51
#: ../contentrules.py:47
msgid "Comments"
msgstr ""
msgstr "Comentaris"
#: ../interfaces.py:139
msgid "Conversation"
@ -88,7 +87,7 @@ msgstr "Data de creació"
#: ../interfaces.py:41
msgid "Date of the most recent public comment"
msgstr ""
msgstr "Data de l'últim comentari públic"
#: ../vocabularies.py:44
msgid "Disabled"
@ -100,7 +99,7 @@ msgstr "Configuració dels comentaris"
#: ../browser/controlpanel.py:95
msgid "Edit cancelled"
msgstr ""
msgstr "Edició cancel·lada"
#: ../interfaces.py:156
msgid "Email"
@ -134,7 +133,7 @@ msgstr "Nom"
msgid "Notify me of new comments via email."
msgstr "Notifica'm de la creació de nous comentaris via correu electrònic."
#: ./plone.app.discussion/plone/app/discussion/configure.zcml
#: plone.app.discussion/plone/app/discussion/configure.zcml
msgid "Plone Discussions"
msgstr "Plone Discussions"
@ -144,7 +143,7 @@ msgstr "Tipus d'objecte"
#: ../browser/controlpanel.py:82
msgid "Save"
msgstr ""
msgstr "Desa"
#: ../interfaces.py:46
msgid "The set of unique commentators (usernames)"
@ -152,15 +151,15 @@ msgstr "Llistat d'usuaris que han comentat (noms d'usuari)"
#: ../interfaces.py:51
msgid "The set of unique commentators (usernames) of published_comments"
msgstr ""
msgstr "El conjunt de comentaristes únics (noms d'usuari) de comentaris publicats"
#: ../interfaces.py:35
msgid "Total number of public comments on this item"
msgstr ""
msgstr "Nombre total de comentaris públics sobre aquest article"
#: ../comment.py:173
msgid "Transform '%s' => '%s' not available."
msgstr ""
msgstr "Transformació de '%s' => '%s' no disponible."
#: ../browser/controlpanel.py:80
msgid "User Email Notification"
@ -168,7 +167,7 @@ msgstr "Notificació a l'usuari via mail"
#: ../interfaces.py:176
msgid "Username of the commenter"
msgstr ""
msgstr "Nom d'usuari del comentarista"
#: ../browser/comments.py:267
msgid "Your comment awaits moderator approval."
@ -192,53 +191,52 @@ msgstr "Publica"
#. Default: "Cancel"
#: ../browser/comment.py:97
msgid "cancel_form_button"
msgstr ""
msgstr "Cancel·la"
#. Default: "You can add a comment by filling out the form below. Plain text formatting. Web and email addresses are transformed into clickable links."
#: ../browser/comments.py:57
msgid "comment_description_intelligent_text"
msgstr ""
msgstr "Podeu afegir un comentari omplint el següent formulari. Format text pla. Les adreces web y correus electrònics es converteixen a enllaços."
#. Default: "You can add a comment by filling out the form below. Plain text formatting. You can use the Markdown syntax for links and images."
#: ../browser/comments.py:51
msgid "comment_description_markdown"
msgstr ""
msgstr "Podeu afegir un comentari omplint el següent formulari. Format text pla. Podeu utilitzar la sintaxi de Markdown per als enllaços i les imatges."
#. Default: "Comments are moderated."
#: ../browser/comments.py:63
msgid "comment_description_moderation_enabled"
msgstr ""
msgstr "Comentaris estàn moderats"
#. Default: "You can add a comment by filling out the form below. Plain text formatting."
#: ../browser/comments.py:46
msgid "comment_description_plain_text"
msgstr ""
msgstr "Podeu afegir un comentari en el següent formulari. Format text pla."
#. Default: "Edit comment cancelled"
#: ../browser/comment.py:101
msgid "comment_edit_cancel_notification"
msgstr ""
msgstr "Edició del comentari cancel·lada"
#. Default: "Comment was edited"
#: ../browser/comment.py:91
msgid "comment_edit_notification"
msgstr ""
msgstr "S'ha editat el comentari"
#. Default: "${author_name} on ${content}"
#: ../comment.py:55
#, fuzzy
msgid "comment_title"
msgstr "${creator} sobre ${content}"
#. Default: "Edit comment"
#: ../browser/comment.py:70
msgid "edit_comment_form_button"
msgstr ""
msgstr "Editar comentari"
#. Default: "Edit comment"
#: ../browser/comment.py:54
msgid "edit_comment_form_title"
msgstr ""
msgstr "Editar commentari"
#. Default: "Action"
#: ../browser/moderation.pt:85
@ -273,67 +271,102 @@ msgstr "Moderar comentaris"
#. Default: "If selected, anonymous users are able to post comments without loggin in. It is highly recommended to use a captcha solution to prevent spam if this setting is enabled."
#: ../interfaces.py:216
msgid "help_anonymous_comments"
msgstr "Si està seleccionada, els usuaris anònims podran afegir comentaris sense identificar-se. Es recomana la utilització de una eina de captcha per evitar comentaris spam si aquesta opció està activada."
msgstr ""
"Si està seleccionada, els usuaris anònims podran afegir comentaris sense "
"identificar-se. Es recomana la utilització de una eina de captcha per evitar "
"comentaris spam si aquesta opció està activada."
#. Default: "If selected, anonymous user will have to give their email."
#: ../interfaces.py:341
msgid "help_anonymous_email_enabled"
msgstr ""
"Si se selecciona, el usuari anònim haurà de donar la seva adreça de correu "
"electrònic."
#. Default: "Use this setting to enable or disable Captcha validation for comments. Install plone.formwidget.captcha, plone.formwidget.recaptcha, collective.akismet, or collective.z3cform.norobots if there are no options available."
#: ../interfaces.py:277
msgid "help_captcha"
msgstr "Utilitzeu aquesta opció per activar o desactivar una eina de captcha pels comentaris. Instal·leu plone.formwidget.captcha, plone.formwidget.recaptcha, collective.akismet o collective.z3cform.norobots si no teniu cap opció disponible."
msgstr ""
"Utilitzeu aquesta opció per activar o desactivar una eina de captcha pels "
"comentaris. Instal·leu plone.formwidget.captcha, plone.formwidget.recaptcha, "
"collective.akismet o collective.z3cform.norobots si no teniu cap opció "
"disponible."
#. Default: "Some discussion related settings are not located in the Discussion Control Panel.\nTo enable comments for a specific content type, go to the Types Control Panel of this type and choose \"Allow comments\".\nTo enable the moderation workflow for comments, go to the Types Control Panel, choose \"Comment\" and set workflow to \"Comment Review Workflow\"."
#: ../browser/controlpanel.py:36
msgid "help_discussion_settings_editform"
msgstr "Algunes de les configuracions dels comentaris no estan en la element de configuració 'Comentaris' del panell de control de l'espai. Per activar els comentaris per un tipus de contingut específic, dirigiu-vos al element de configuració 'Tipus' i activeu la opció 'Permetre comentaris'. Per activar el circuit de treball (workflow) de moderació de comentaris, dirigiu-vos al element de configuració de 'Tipus', seleccioneu 'Comentari' i escolliu el 'Workflow de moderació de comentaris'."
msgstr ""
"Algunes de les configuracions dels comentaris no estan en la element de "
"configuració 'Comentaris' del panell de control de l'espai. Per activar els "
"comentaris per un tipus de contingut específic, dirigiu-vos al element de "
"configuració 'Tipus' i activeu la opció 'Permetre comentaris'. Per activar "
"el circuit de treball (workflow) de moderació de comentaris, dirigiu-vos al "
"element de configuració de 'Tipus', seleccioneu 'Comentari' i escolliu el "
"'Workflow de moderació de comentaris'."
#. Default: "If selected, supports editing and deletion of comments for users with the 'Edit comments' permission."
#: ../interfaces.py:249
msgid "help_edit_comment_enabled"
msgstr ""
"Si es selecciona, dóna suport a l'edició i eliminació dels comentaris "
"dels usuaris amb el permís 'Edita comentaris'"
#. Default: "If selected, users are able to post comments on the site. Though, you have to enable comments for specific content types, folders or content objects before users will be able to post comments."
#: ../interfaces.py:202
msgid "help_globally_enabled"
msgstr "Si està seleccionada, es permet que els usuaris puguin afegir comentaris a l'espai. De tota manera, teniu que activar els comentaris per a cada tipus de contingut específicament abans de que pogueu afegir comentaris."
msgstr ""
"Si està seleccionada, es permet que els usuaris puguin afegir comentaris a "
"l'espai. De tota manera, teniu que activar els comentaris per a cada tipus "
"de contingut específicament abans de que pogueu afegir comentaris."
#. Default: "If selected, comments will enter a 'Pending' state in which they are invisible to the public. A user with the 'Review comments' permission ('Reviewer' or 'Manager') can approve comments to make them visible to the public. If you want to enable a custom comment workflow, you have to go to the types control panel."
#: ../interfaces.py:232
msgid "help_moderation_enabled"
msgstr ""
"Si està seleccionat, els comentaris entraran en un estat \"pendent\" en què "
"són invisibles per al públic. Un usuari amb permís 'Review "
"comments' ('Reviewer' o 'Manager') pot aprovar comentaris perquè siguin "
"visibles per al públic. Si desitja habilitar un comentari personalitzada de "
"flux de treball, vostè ha d'anar al panell de control de tipus."
#. Default: "Address to which moderator notifications will be sent."
#: ../interfaces.py:318
msgid "help_moderator_email"
msgstr ""
msgstr "Adreça a la qual s'enviaran les notificacions de moderador."
#. Default: "If selected, the moderator is notified if a comment needs attention. The moderator email address can be set below."
#: ../interfaces.py:304
#, fuzzy
msgid "help_moderator_notification_enabled"
msgstr "Si està seleccionada, es notificarà per correu electrònic al moderador els nous comentaris."
msgstr ""
"Si està seleccionada, es notificarà per correu electrònic al moderador, dels "
"nous comentaris."
#. Default: "If selected, an image of the user is shown next to the comment."
#: ../interfaces.py:293
msgid "help_show_commenter_image"
msgstr "Si està seleccionada, es mostrarà el retrat (o imatge) que hagi configurat l'usuari en el seu perfil juntament amb el comentari."
msgstr ""
"Si està seleccionada, es mostrarà el retrat (o imatge) que hagi configurat "
"l'usuari en el seu perfil juntament amb el comentari."
#. Default: "Use this setting to choose if the comment text should be transformed in any way. You can choose between 'Plain text' and 'Intelligent text'. 'Intelligent text' converts plain text into HTML where line breaks and indentation is preserved, and web and email addresses are made into clickable links."
#: ../interfaces.py:260
msgid "help_text_transform"
msgstr ""
"Utilitzeu aquesta opció per escollir si el text del comentari ha de "
"transformar-se. Pot escollir entre 'Text sense format' i 'text "
"intel·ligent'. 'Text intel·ligent' converteix el text sense format en HTML "
"on els salts de línia i sangria es conserven, i les adreces web i de correu "
"electrònic es converteixen en enllaços."
#. Default: "If selected, users can choose to be notified of new comments by email."
#: ../interfaces.py:330
msgid "help_user_notification_enabled"
msgstr "Si està seleccionada, els usuaris poden escollir si volen ser notificats cada cop que s'afegeixi un nou comentari al contingut."
msgstr ""
"Si està seleccionada, els usuaris poden escollir si volen ser notificats "
"cada cop que s'afegeixi un nou comentari al contingut."
#. Default: "Anonymous"
#: ../browser/comments.pt:74
#: ../comment.py:191
#: ../browser/comments.pt:74 ../comment.py:191
msgid "label_anonymous"
msgstr "Anònim"
@ -345,7 +378,7 @@ msgstr "Permetre comentaris anònims"
#. Default: "Enable anonymous email field"
#: ../interfaces.py:339
msgid "label_anonymous_email_enabled"
msgstr ""
msgstr "Habilitar correu electrònic anònim"
#. Default: "Apply"
#: ../browser/moderation.pt:71
@ -365,7 +398,7 @@ msgstr "Comentari"
#. Default: "Commenting has been disabled."
#: ../browser/comments.pt:148
msgid "label_commenting_disabled"
msgstr ""
msgstr "Els comentaris s'han desactivat"
#. Default: "Delete"
#: ../browser/moderation.pt:130
@ -375,7 +408,7 @@ msgstr "Esborra"
#. Default: "Enable editing of comments"
#: ../interfaces.py:247
msgid "label_edit_comment_enabled"
msgstr ""
msgstr "Activa l'edició de comentaris"
#. Default: "Globally enable comments"
#: ../interfaces.py:200
@ -385,12 +418,12 @@ msgstr "Activa els comentaris de forma global"
#. Default: "Enable comment moderation"
#: ../interfaces.py:228
msgid "label_moderation_enabled"
msgstr ""
msgstr "Habilitar moderació de comentaris"
#. Default: "Moderator Email Address"
#: ../interfaces.py:314
msgid "label_moderator_email"
msgstr ""
msgstr "Correu electrònic del moderador"
#. Default: "Enable moderator email notification"
#: ../interfaces.py:302
@ -434,24 +467,41 @@ msgstr "Activa les notificacions als usuaris"
#. Default: "A comment on '${title}' has been posted here: ${link}\n\n---\n${text}\n---\n"
#: ../comment.py:59
#, fuzzy
msgid "mail_notification_message"
msgstr "S'ha publicat un comentari sobre el contingut ${title} en aquesta adreça: ${link}"
msgstr ""
"S'ha publicat un comentari sobre el contingut ${title} en aquesta adreça: "
"${link}"
#. Default: "A comment on '${title}' has been posted here: ${link}\n\n---\n${text}\n---\n\nApprove comment:\n${link_approve}\n\nDelete comment:\n${link_delete}\n"
#: ../comment.py:67
msgid "mail_notification_message_moderator"
msgstr ""
"\"Un comentari sobre '${title}' s'ha publicat aquí: ${link}\n"
"\n"
"---\n"
"${text}\n"
"---\n"
"\n"
"Aprovar comentari:\n"
"${link_approve}\n"
"\n"
"Borrar comentari:\n"
"${link_delete}\n"
"\""
#. Default: "enable the 'Comment Review Workflow' for the Comment content type"
#: ../browser/moderation.pt:33
msgid "message_enable_comment_workflow"
msgstr "Activa el 'Workflow de moderació de comentaris' per al tipus de contingut 'Comentari'"
msgstr ""
"Activa el 'Workflow de moderació de comentaris' per al tipus de contingut "
"'Comentari'"
#. Default: "Moderation workflow is disabled. You have to ${enable_comment_workflow} before you can moderate comments here."
#: ../browser/moderation.pt:33
msgid "message_moderation_disabled"
msgstr "La moderació està desactivada. Teniu que ${enable_comment_workflow} abans de moderar els comentaris."
msgstr ""
"La moderació està desactivada. Teniu que ${enable_comment_workflow} abans de "
"moderar els comentaris."
#. Default: "No comments to moderate."
#: ../browser/moderation.pt:43
@ -462,4 +512,3 @@ msgstr "No hi han comentaris per moderar."
#: ../browser/moderation.pt:64
msgid "title_bulkactions"
msgstr "Accions en bloc"

View File

@ -3,9 +3,9 @@ msgid ""
msgstr ""
"Project-Id-Version: plone.app.discussion\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI +ZONE\n"
"PO-Revision-Date: 2011-12-14 15:33-0600\n"
"Last-Translator: Héctor Velarde <hector.velarde@gmail.com>\n"
"Language-Team: es <es@li.org>\n"
"PO-Revision-Date: 2014-12-11 16:07+0100\n"
"Last-Translator: Roberto Diaz <plone.team@upcnet.es>\n"
"Language-Team: Spanish <plone-i18n@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -45,29 +45,29 @@ msgstr "Cambios guardados"
msgid "Comment approved."
msgstr "Comentario aprobado."
#: ../contentrules.py:96
#: ../contentrules.py:92
msgid "Comment author email"
msgstr ""
msgstr "Correo electrónico del autor del comentario"
#: ../contentrules.py:85
#: ../contentrules.py:81
msgid "Comment author full name"
msgstr ""
msgstr "Nombre completo del autor del comentario"
#: ../contentrules.py:74
#: ../contentrules.py:70
msgid "Comment author user name"
msgstr ""
msgstr "Nombre de usuario del autor del comentario"
#: ../browser/moderation.py:108
msgid "Comment deleted."
msgstr "Comentario eliminado."
#: ../contentrules.py:52
#: ../contentrules.py:48
msgid "Comment id"
msgstr ""
msgstr "ID del comentario"
#: ../contentrules.py:63
#: ../contentrules.py:59
msgid "Comment text"
msgstr ""
msgstr "Texto del comentario"
#: ../browser/controlpanel.py:76
msgid "Commenter Image"
@ -76,9 +76,9 @@ msgstr "Imagen del autor"
msgid "Commenting infrastructure for Plone"
msgstr "Infraestructura de comentarios para Plone"
#: ../contentrules.py:51
#: ../contentrules.py:47
msgid "Comments"
msgstr ""
msgstr "Comentarios"
#: ../interfaces.py:139
msgid "Conversation"
@ -90,7 +90,7 @@ msgstr "Fecha de creación"
#: ../interfaces.py:41
msgid "Date of the most recent public comment"
msgstr ""
msgstr "Fecha del comentario publico más reciente"
#: ../vocabularies.py:44
msgid "Disabled"
@ -154,15 +154,15 @@ msgstr "Listado de usuarios que han comentado (nombres de usuario)"
#: ../interfaces.py:51
msgid "The set of unique commentators (usernames) of published_comments"
msgstr ""
msgstr "El conjunto de comentaristas únicos (nombres de usuario) de published_comments"
#: ../interfaces.py:35
msgid "Total number of public comments on this item"
msgstr ""
msgstr "Total de comentarios públicos en este artículo"
#: ../comment.py:173
msgid "Transform '%s' => '%s' not available."
msgstr ""
msgstr "Transformada '%s' => '%s' no disponible."
#: ../browser/controlpanel.py:80
msgid "User Email Notification"
@ -170,7 +170,7 @@ msgstr "Notificaciones de correo para usuarios"
#: ../interfaces.py:176
msgid "Username of the commenter"
msgstr ""
msgstr "Nombre de usuario del comentarista"
#: ../browser/comments.py:267
msgid "Your comment awaits moderator approval."
@ -194,7 +194,7 @@ msgstr "Aprobar"
#. Default: "Cancel"
#: ../browser/comment.py:97
msgid "cancel_form_button"
msgstr ""
msgstr "Cancelar"
#. Default: "You can add a comment by filling out the form below. Plain text formatting. Web and email addresses are transformed into clickable links."
#: ../browser/comments.py:57
@ -204,7 +204,7 @@ msgstr "Puede agregar un comentario llenando el siguiente formulario. Formato de
#. Default: "You can add a comment by filling out the form below. Plain text formatting. You can use the Markdown syntax for links and images."
#: ../browser/comments.py:51
msgid "comment_description_markdown"
msgstr ""
msgstr "Puede añadir un comentario rellenando el siguiente formulario. Formato texto plano. Puede utilizar la sintaxis de Markdown de enlaces e imágenes."
#. Default: "Comments are moderated."
#: ../browser/comments.py:63
@ -214,33 +214,32 @@ msgstr "Los comentarios son moderados."
#. Default: "You can add a comment by filling out the form below. Plain text formatting."
#: ../browser/comments.py:46
msgid "comment_description_plain_text"
msgstr "Puede agregar un comentario llenando el sigueinte formulario. Formato de texto plano."
msgstr "Puede agregar un comentario llenando el siguiente formulario. Formato de texto plano."
#. Default: "Edit comment cancelled"
#: ../browser/comment.py:101
msgid "comment_edit_cancel_notification"
msgstr ""
msgstr "Se ha cancelado la edición del comentario"
#. Default: "Comment was edited"
#: ../browser/comment.py:91
msgid "comment_edit_notification"
msgstr ""
msgstr "Se ha editado el comentario"
#. Default: "${author_name} on ${content}"
#: ../comment.py:55
#, fuzzy
msgid "comment_title"
msgstr "${creator} sobre ${content}"
msgstr "${author_name} sobre ${content}"
#. Default: "Edit comment"
#: ../browser/comment.py:70
msgid "edit_comment_form_button"
msgstr ""
msgstr "Editar comentario"
#. Default: "Edit comment"
#: ../browser/comment.py:54
msgid "edit_comment_form_title"
msgstr ""
msgstr "Editar comentario"
#. Default: "Action"
#: ../browser/moderation.pt:85
@ -280,7 +279,7 @@ msgstr "Si está seleccionado, los usuarios anónimos podrán añadir comentario
#. Default: "If selected, anonymous user will have to give their email."
#: ../interfaces.py:341
msgid "help_anonymous_email_enabled"
msgstr ""
msgstr "Si se selecciona, el usuario anónimo tendrá que proporcionar su correo electrónico."
#. Default: "Use this setting to enable or disable Captcha validation for comments. Install plone.formwidget.captcha, plone.formwidget.recaptcha, collective.akismet, or collective.z3cform.norobots if there are no options available."
#: ../interfaces.py:277
@ -299,6 +298,8 @@ msgstr ""
#: ../interfaces.py:249
msgid "help_edit_comment_enabled"
msgstr ""
"Si se selecciona, permite la edición y eliminación de comentarios "
"a los usuarios con el permiso 'Edita comentarios'"
#. Default: "If selected, users are able to post comments on the site. Though, you have to enable comments for specific content types, folders or content objects before users will be able to post comments."
#: ../interfaces.py:202
@ -317,7 +318,6 @@ msgstr "La dirección de correo electrónico a la cual se enviarán las notifica
#. Default: "If selected, the moderator is notified if a comment needs attention. The moderator email address can be set below."
#: ../interfaces.py:304
#, fuzzy
msgid "help_moderator_notification_enabled"
msgstr "Si está seleccionado, se notifica al moderador cuando un nuevo comentario requiere de su atención. La dirección de correo electrónico del moderador se puede encontrar en la opción 'Configuración de correo' del panel de control (Dirección del remitente del sitio)"
@ -350,7 +350,7 @@ msgstr "Permitir comentarios anónimos"
#. Default: "Enable anonymous email field"
#: ../interfaces.py:339
msgid "label_anonymous_email_enabled"
msgstr ""
msgstr "Habilitar campo email de anónimos"
#. Default: "Apply"
#: ../browser/moderation.pt:71
@ -380,7 +380,7 @@ msgstr "Borrar"
#. Default: "Enable editing of comments"
#: ../interfaces.py:247
msgid "label_edit_comment_enabled"
msgstr ""
msgstr "Activar la edición de comentarios"
#. Default: "Globally enable comments"
#: ../interfaces.py:200
@ -482,4 +482,3 @@ msgstr "No hay nada para moderar."
#: ../browser/moderation.pt:64
msgid "title_bulkactions"
msgstr "Acciones conjuntas"

View File

@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: plone.app.discussion\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI +ZONE\n"
"PO-Revision-Date: 2013-04-06 14:49+0200\n"
"Last-Translator: Andre Nogueira <andre@simplesconsultoria.com.br>\n"
"PO-Revision-Date: 2014-12-05 17:36+0200\n"
"Last-Translator: Joao Molon <jtmolon@hadi.com.br>\n"
"Language-Team: Plone i18n <plone-i18n@lists.sourceforge.net>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
@ -46,15 +46,15 @@ msgstr "Comentário aprovado"
#: ../contentrules.py:96
msgid "Comment author email"
msgstr ""
msgstr "Email do autor do comentário"
#: ../contentrules.py:85
msgid "Comment author full name"
msgstr ""
msgstr "Nome completo do autor do comentário"
#: ../contentrules.py:74
msgid "Comment author user name"
msgstr ""
msgstr "Nome de usuário do autor do comentário"
#: ../browser/moderation.py:108
msgid "Comment deleted."
@ -62,22 +62,22 @@ msgstr "Comentário excluído."
#: ../contentrules.py:52
msgid "Comment id"
msgstr ""
msgstr "Id do comentário"
#: ../contentrules.py:63
msgid "Comment text"
msgstr ""
msgstr "Texto do comentário"
#: ../browser/controlpanel.py:76
msgid "Commenter Image"
msgstr "Imagedo autor"
msgstr "Imagem do autor"
msgid "Commenting infrastructure for Plone"
msgstr "Infraestrutura de comentários para o Plone"
#: ../contentrules.py:51
msgid "Comments"
msgstr ""
msgstr "Comentários"
#: ../interfaces.py:139
msgid "Conversation"
@ -161,7 +161,7 @@ msgstr "Número total de comentários públicos neste item"
#: ../comment.py:173
msgid "Transform '%s' => '%s' not available."
msgstr ""
msgstr "Transformação '%s' => '%s' não disponível"
#: ../browser/controlpanel.py:80
msgid "User Email Notification"
@ -193,7 +193,7 @@ msgstr "Publicar"
#. Default: "Cancel"
#: ../browser/comment.py:97
msgid "cancel_form_button"
msgstr ""
msgstr "Cancelar"
#. Default: "You can add a comment by filling out the form below. Plain text formatting. Web and email addresses are transformed into clickable links."
#: ../browser/comments.py:57
@ -218,28 +218,27 @@ msgstr "Você pode adicionar um comentário preenchendo o formulário a seguir.
#. Default: "Edit comment cancelled"
#: ../browser/comment.py:101
msgid "comment_edit_cancel_notification"
msgstr ""
msgstr "Edição do comentário cancelada"
#. Default: "Comment was edited"
#: ../browser/comment.py:91
msgid "comment_edit_notification"
msgstr ""
msgstr "Comentário foi editado"
#. Default: "${author_name} on ${content}"
#: ../comment.py:55
#, fuzzy
msgid "comment_title"
msgstr "${creator} em ${content}"
msgstr "${author_name} em ${content}"
#. Default: "Edit comment"
#: ../browser/comment.py:70
msgid "edit_comment_form_button"
msgstr ""
msgstr "Editar comentário"
#. Default: "Edit comment"
#: ../browser/comment.py:54
msgid "edit_comment_form_title"
msgstr ""
msgstr "Editar cometário"
#. Default: "Action"
#: ../browser/moderation.pt:85
@ -297,7 +296,7 @@ msgstr ""
#. Default: "If selected, supports editing and deletion of comments for users with the 'Edit comments' permission."
#: ../interfaces.py:249
msgid "help_edit_comment_enabled"
msgstr ""
msgstr "Caso selecionado, permite a edição e remoção de comentários por usuários com a permissão 'Editar comentários'"
#. Default: "If selected, users are able to post comments on the site. Though, you have to enable comments for specific content types, folders or content objects before users will be able to post comments."
#: ../interfaces.py:202
@ -316,9 +315,8 @@ msgstr "Endereço para o qual as notificações do moderador serão enviadas."
#. Default: "If selected, the moderator is notified if a comment needs attention. The moderator email address can be set below."
#: ../interfaces.py:304
#, fuzzy
msgid "help_moderator_notification_enabled"
msgstr "Se selecionado, o moderador será avisado quando um comentário precisar de atenção. O endereço de e-mail do moderador pode ser encontrado nas configurações de e-mail no Painel de Controle (campo Endereço de 'Remetente' do site)"
msgstr "Se selecionado, o moderador será avisado quando um comentário precisar de atenção. O endereço de e-mail do moderador pode ser definido abaixo."
#. Default: "If selected, an image of the user is shown next to the comment."
#: ../interfaces.py:293
@ -379,7 +377,7 @@ msgstr "Excluir"
#. Default: "Enable editing of comments"
#: ../interfaces.py:247
msgid "label_edit_comment_enabled"
msgstr ""
msgstr "Habilitar edição de comentários"
#. Default: "Globally enable comments"
#: ../interfaces.py:200
@ -438,9 +436,8 @@ msgstr "Ativar notificação de e-mail para os usuários"
#. Default: "A comment on '${title}' has been posted here: ${link}\n\n---\n${text}\n---\n"
#: ../comment.py:59
#, fuzzy
msgid "mail_notification_message"
msgstr "Um comentário em '${title}' foi adicionado aqui: ${link}"
msgstr "Um comentário em '${title}' foi adicionado aqui: ${link}\n\n---\n{text}\n---\n"
#. Default: "A comment on '${title}' has been posted here: ${link}\n\n---\n${text}\n---\n\nApprove comment:\n${link_approve}\n\nDelete comment:\n${link_delete}\n"
#: ../comment.py:67

View File

@ -7,11 +7,13 @@ from Acquisition import aq_base
from zope.component import createObject
from zope.component import getSiteManager
from zope.component import queryUtility
from zope.component import getUtility
from plone.app.testing import TEST_USER_ID, setRoles
from Products.MailHost.interfaces import IMailHost
from Products.CMFPlone.tests.utils import MockMailHost
from Products.CMFPlone.interfaces import IMailSchema
from plone.registry.interfaces import IRegistry
@ -34,7 +36,9 @@ class TestUserNotificationUnit(unittest.TestCase):
sm.unregisterUtility(provided=IMailHost)
sm.registerUtility(mailhost, provided=IMailHost)
# We need to fake a valid mail setup
self.portal.email_from_address = "portal@plone.test"
registry = getUtility(IRegistry)
mail_settings = registry.forInterface(IMailSchema, prefix='plone')
mail_settings.email_from_address = "portal@plone.test"
self.mailhost = self.portal.MailHost
# Enable user notification setting
registry = queryUtility(IRegistry)
@ -122,7 +126,9 @@ class TestUserNotificationUnit(unittest.TestCase):
def test_do_not_notify_user_when_no_sender_is_available(self):
# Set sender mail address to none and make sure no email is send to
# the moderator.
self.portal.email_from_address = None
registry = getUtility(IRegistry)
mail_settings = registry.forInterface(IMailSchema, prefix='plone')
mail_settings.email_from_address = None
comment = createObject('plone.Comment')
comment.text = 'Comment text'
comment.user_notification = True
@ -132,7 +138,6 @@ class TestUserNotificationUnit(unittest.TestCase):
comment.text = 'Comment text'
self.conversation.addComment(comment)
self.assertEqual(len(self.mailhost.messages), 0)
def test_notify_only_once(self):
@ -172,7 +177,9 @@ class TestModeratorNotificationUnit(unittest.TestCase):
sm.unregisterUtility(provided=IMailHost)
sm.registerUtility(mailhost, provided=IMailHost)
# We need to fake a valid mail setup
self.portal.email_from_address = "portal@plone.test"
registry = getUtility(IRegistry)
mail_settings = registry.forInterface(IMailSchema, prefix='plone')
mail_settings.email_from_address = "portal@plone.test"
self.mailhost = self.portal.MailHost
# Enable comment moderation
self.portal.portal_types['Document'].allow_discussion = True
@ -255,7 +262,9 @@ class TestModeratorNotificationUnit(unittest.TestCase):
def test_do_not_notify_moderator_when_no_sender_is_available(self):
# Set sender mail address to nonw and make sure no email is send to the
# moderator.
self.portal.email_from_address = None
registry = getUtility(IRegistry)
mail_settings = registry.forInterface(IMailSchema, prefix='plone')
mail_settings.email_from_address = None
comment = createObject('plone.Comment')
comment.text = 'Comment text'

View File

@ -1,7 +1,7 @@
from setuptools import find_packages
from setuptools import setup
version = '2.3.3.dev0'
version = '2.3.4.dev0'
install_requires = [
'setuptools',

21
travis.cfg Normal file
View File

@ -0,0 +1,21 @@
[buildout]
extends = buildout.cfg
parts +=
download
install
code-analysis
eggs-directory = buildout-cache/eggs
download-cache = buildout-cache/downloads
[download]
recipe = hexagonit.recipe.download
url = https://launchpad.net/plone/4.3/4.3.4/+download/Plone-4.3.4-UnifiedInstaller.tgz
[install]
recipe = collective.recipe.cmd
on_install = true
cmds = tar jxvf ${download:location}/Plone-4.3.4-UnifiedInstaller/packages/buildout-cache.tar.bz2 1>/dev/null
[code-analysis]
recipe = plone.recipe.codeanalysis
return-status-codes = True