From fa127ad85cb3015dbbc38f48903e1734495a618f Mon Sep 17 00:00:00 2001 From: Gil Forcada Date: Sat, 23 Aug 2014 00:31:28 +0200 Subject: [PATCH 01/16] Whitespaces cleanup --- buildout.cfg | 8 ++++---- docs/README.txt | 2 +- jenkins.cfg | 6 +++--- plone/app/discussion/browser/comments.pt | 2 +- plone/app/discussion/browser/javascripts/comments.js | 2 +- .../locales/af/LC_MESSAGES/plone.app.discussion.po | 8 ++++---- .../locales/it/LC_MESSAGES/plone.app.discussion.po | 2 +- plone/app/discussion/tests/functional_test_comments.txt | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/buildout.cfg b/buildout.cfg index 2d918f7..c893dfe 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -43,19 +43,19 @@ recipe = collective.recipe.template output = ${buildout:bin-directory}/update_translations input = inline: #!/usr/bin/env bash - + DOMAIN="plone.app.discussion" BASE_PATH=${buildout:directory}/plone/app/discussion I18NDUDE=${buildout:bin-directory}/i18ndude - + $I18NDUDE rebuild-pot --pot $BASE_PATH/locales/$DOMAIN.pot --create "$DOMAIN" $BASE_PATH* $I18NDUDE rebuild-pot --pot $BASE_PATH/i18n/plone.pot --create "plone" $BASE_PATH/profiles/ for LANG in `find $BASE_PATH/locales -maxdepth 1 -mindepth 1 -type d \ - | sed -e "s/.*locales\/\(.*\)$/\1/"`; do + | sed -e "s/.*locales\/\(.*\)$/\1/"`; do $I18NDUDE sync --pot $BASE_PATH/locales/$DOMAIN.pot $BASE_PATH/locales/de/LC_MESSAGES/$DOMAIN.po msgfmt --no-hash -o $BASE_PATH/locales/$LANG/LC_MESSAGES/$DOMAIN.mo $BASE_PATH/locales/$LANG/LC_MESSAGES/$DOMAIN.po - + $I18NDUDE sync --pot $BASE_PATH/i18n/plone.pot $BASE_PATH/i18n/plone-$LANG.po msgfmt --no-hash -o $BASE_PATH/i18n/plone-$LANG.mo $BASE_PATH/i18n/plone-$LANG.po done diff --git a/docs/README.txt b/docs/README.txt index e07e9b4..58475f7 100644 --- a/docs/README.txt +++ b/docs/README.txt @@ -1,2 +1,2 @@ -For developers documentation on plone.app.discussion, see +For developers documentation on plone.app.discussion, see http://packages.python.org/plone.app.discussion. \ No newline at end of file diff --git a/jenkins.cfg b/jenkins.cfg index 209b2f4..f5b0907 100644 --- a/jenkins.cfg +++ b/jenkins.cfg @@ -5,11 +5,11 @@ extends = 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 += +parts += flake8 code-analysis extensions = mr.developer -auto-checkout = +auto-checkout = plone.recipe.codeanalysis collective.xmltestreport @@ -22,7 +22,7 @@ entry-points = flake8=flake8.main:main 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 +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] diff --git a/plone/app/discussion/browser/comments.pt b/plone/app/discussion/browser/comments.pt index 0348f33..979b8bf 100644 --- a/plone/app/discussion/browser/comments.pt +++ b/plone/app/discussion/browser/comments.pt @@ -114,7 +114,7 @@ /> - +
, 2010. -# +# # Some tips for new translators: # ------------------------------ # login: aanmeld, meld aan @@ -7,16 +7,16 @@ # subscribe: inteken, teken in # unsubscribe: uitteken, teken uit # subscribers: intekenaars -# +# # Sommige mense verkies die hoflikheidsvorm "u" bo "jy/jou", en anders om. # Ons probeer dus maar om sover moontlik in die passiewe vorm te skryf. # Bv. # - "Attach your file" -> "Heg die lêer aan" # - "Afterwards you can attach your files" -> "Agterna kan lêers aangeheg -# +# # An updateable list of Afrikaans computer terms can be found here: # https://wiki.ubuntu.com/AfrikaansTranslators/VertalerWoordeboek -# +# msgid "" msgstr "" "Project-Id-Version: plone.app.discussion\n" diff --git a/plone/app/discussion/locales/it/LC_MESSAGES/plone.app.discussion.po b/plone/app/discussion/locales/it/LC_MESSAGES/plone.app.discussion.po index 354a7e0..eb08564 100644 --- a/plone/app/discussion/locales/it/LC_MESSAGES/plone.app.discussion.po +++ b/plone/app/discussion/locales/it/LC_MESSAGES/plone.app.discussion.po @@ -1,6 +1,6 @@ # Translation of plone.app.discussion.pot to Italian # Luca Fabbri , 2010 -# +# msgid "" msgstr "" "Project-Id-Version: plone.app.discussion\n" diff --git a/plone/app/discussion/tests/functional_test_comments.txt b/plone/app/discussion/tests/functional_test_comments.txt index c0d1159..9712635 100644 --- a/plone/app/discussion/tests/functional_test_comments.txt +++ b/plone/app/discussion/tests/functional_test_comments.txt @@ -406,7 +406,7 @@ Submitting the form runs into a testbrowser notFoundException. We'll just catch that and check the result later. >>> try: - ... form.submit() + ... form.submit() ... except: ... pass From 42d12200a78fb637e928777abeee3d6513028714 Mon Sep 17 00:00:00 2001 From: Vincent Fretin Date: Sat, 20 Sep 2014 14:14:19 +0200 Subject: [PATCH 02/16] Don't use session at all for content rules, set the event in the request to be able to access comment attributes. This fixes 'InvalidObjectReference: A new object is reachable from multiple databases.' if comment contains a RichTextValue which contains a RawValueHolder (persistent object). --- plone/app/discussion/contentrules.py | 22 ++++++++----------- plone/app/discussion/events.py | 14 ++++-------- .../app/discussion/tests/test_contentrules.py | 8 ------- 3 files changed, 13 insertions(+), 31 deletions(-) diff --git a/plone/app/discussion/contentrules.py b/plone/app/discussion/contentrules.py index 4f2b58e..dfa00fc 100644 --- a/plone/app/discussion/contentrules.py +++ b/plone/app/discussion/contentrules.py @@ -28,22 +28,18 @@ class CommentSubstitution(BaseSubstitution): """ def __init__(self, context, **kwargs): super(CommentSubstitution, self).__init__(context, **kwargs) - self._session = None @property - def session(self): - """ User session + def event(self): + """ event that triggered the content rule """ - if self._session is None: - sdm = getattr(self.context, 'session_data_manager', None) - self._session = sdm.getSessionData(create=False) if sdm else {} - return self._session + return self.context.REQUEST.get('event') @property def comment(self): """ Get changed inline comment """ - return self.session.get('comment', {}) + return self.event.comment class Id(CommentSubstitution): """ Comment id string substitution @@ -54,7 +50,7 @@ class Id(CommentSubstitution): def safe_call(self): """ Safe call """ - return self.comment.get('comment_id', u'') + return getattr(self.comment, 'comment_id', u'') class Text(CommentSubstitution): """ Comment text @@ -65,7 +61,7 @@ class Text(CommentSubstitution): def safe_call(self): """ Safe call """ - return self.comment.get('text', u'') + return getattr(self.comment, 'text', u'') class AuthorUserName(CommentSubstitution): """ Comment author user name string substitution @@ -76,7 +72,7 @@ class AuthorUserName(CommentSubstitution): def safe_call(self): """ Safe call """ - return self.comment.get('author_username', u'') + return getattr(self.comment, 'author_username', u'') class AuthorFullName(CommentSubstitution): """ Comment author full name string substitution @@ -87,7 +83,7 @@ class AuthorFullName(CommentSubstitution): def safe_call(self): """ Safe call """ - return self.comment.get('author_name', u'') + return getattr(self.comment, 'author_name', u'') class AuthorEmail(CommentSubstitution): """ Comment author email string substitution @@ -98,4 +94,4 @@ class AuthorEmail(CommentSubstitution): def safe_call(self): """ Safe call """ - return self.comment.get('author_email', u'') + return getattr(self.comment, 'author_email', u'') diff --git a/plone/app/discussion/events.py b/plone/app/discussion/events.py index 30d49a1..804077a 100644 --- a/plone/app/discussion/events.py +++ b/plone/app/discussion/events.py @@ -19,16 +19,10 @@ class DiscussionEvent(object): for key, value in kwargs.items(): setattr(self, key, value) - # Add comment on session to easily define content-rules dynamic strings - sdm = getattr(context, 'session_data_manager', None) - session = sdm.getSessionData(create=True) if sdm else None - - if session: - sessionComment = dict( - (field, getattr(comment, field, None)) for field in IComment - if not field.startswith('_') - ) - session.set('comment', sessionComment) + # Add event to the request to be able to access comment attributes + # in content-rules dynamic strings + request = context.REQUEST + request.set('event', self) class CommentAddedEvent(DiscussionEvent): """ Event to be triggered when a Comment is added diff --git a/plone/app/discussion/tests/test_contentrules.py b/plone/app/discussion/tests/test_contentrules.py index 16618e2..a9e9bf1 100644 --- a/plone/app/discussion/tests/test_contentrules.py +++ b/plone/app/discussion/tests/test_contentrules.py @@ -1,9 +1,7 @@ # -*- coding: utf-8 -*- import unittest2 as unittest -from Testing import ZopeTestCase as ztc from zope.component import createObject, getAdapter -from zope.event import notify from plone.app.testing import TEST_USER_ID, setRoles from plone.contentrules.rule.interfaces import IRuleEventType @@ -25,9 +23,6 @@ class CommentContentRulesTest(unittest.TestCase): layer = PLONE_APP_DISCUSSION_INTEGRATION_TESTING def setUp(self): - # Setup session manager - ztc.utils.setupCoreSessions(self.layer['app']) - # Setup sandbox self.portal = self.layer['portal'] self.request = self.layer['request'] @@ -94,9 +89,6 @@ class ReplyContentRulesTest(unittest.TestCase): layer = PLONE_APP_DISCUSSION_INTEGRATION_TESTING def setUp(self): - # Setup session manager - ztc.utils.setupCoreSessions(self.layer['app']) - # Setup sandbox self.portal = self.layer['portal'] self.request = self.layer['request'] From 838f22972675f3d5187a1103184f09c43852819a Mon Sep 17 00:00:00 2001 From: Vincent Fretin Date: Thu, 9 Oct 2014 11:41:00 +0200 Subject: [PATCH 03/16] Don't execute createReplyForm js if there is no in_reply_to button. --- CHANGES.rst | 3 +++ plone/app/discussion/browser/javascripts/comments.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 566f0d4..a4fa16f 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ Changelog 2.3.3 (unreleased) ------------------ +- Don't execute createReplyForm js if there is no in_reply_to button. + [vincentfretin] + - Register events as Content Rules Event Types if plone.contentrules is present [avoinea] diff --git a/plone/app/discussion/browser/javascripts/comments.js b/plone/app/discussion/browser/javascripts/comments.js index a6bd91f..1e67674 100644 --- a/plone/app/discussion/browser/javascripts/comments.js +++ b/plone/app/discussion/browser/javascripts/comments.js @@ -106,7 +106,7 @@ var post_comment_div = $("#commenting"); var in_reply_to_field = post_comment_div.find("input[name='form.widgets.in_reply_to']"); - if (in_reply_to_field.val() !== "") { + if (in_reply_to_field.length !== 0 && in_reply_to_field.val() !== "") { var current_reply_id = "#" + in_reply_to_field.val(); var current_reply_to_div = $(".discussion").find(current_reply_id); $.createReplyForm(current_reply_to_div); From 30c88842c0c9a05ee7fc92156c3bfe82edea84f0 Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Mon, 11 Aug 2014 14:22:08 +0200 Subject: [PATCH 04/16] Reapplied on correct branch. Revert "Revert "Update tag for id=content element to article instead of a simple div."" This reverts commit 45f58edd061bca9c9c5f2290e7908273665239d5. --- plone/app/discussion/browser/controlpanel.pt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plone/app/discussion/browser/controlpanel.pt b/plone/app/discussion/browser/controlpanel.pt index 0018049..0ccb3e1 100644 --- a/plone/app/discussion/browser/controlpanel.pt +++ b/plone/app/discussion/browser/controlpanel.pt @@ -14,7 +14,7 @@ -
@@ -99,6 +99,6 @@
- + From 75b8c136404d8cb4826c610cd503943f42bfd821 Mon Sep 17 00:00:00 2001 From: esteele Date: Thu, 23 Oct 2014 21:36:21 -0400 Subject: [PATCH 05/16] Preparing release 2.3.3 --- CHANGES.rst | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index a4fa16f..5ecce36 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,7 +1,7 @@ Changelog ========= -2.3.3 (unreleased) +2.3.3 (2014-10-23) ------------------ - Don't execute createReplyForm js if there is no in_reply_to button. diff --git a/setup.py b/setup.py index a912d59..4617758 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import find_packages from setuptools import setup -version = '2.3.3.dev0' +version = '2.3.3' install_requires = [ 'setuptools', From ba28439d947c0f89a782cacc121e0b2735bd28e7 Mon Sep 17 00:00:00 2001 From: esteele Date: Thu, 23 Oct 2014 21:37:49 -0400 Subject: [PATCH 06/16] Back to development: 2.3.4 --- CHANGES.rst | 6 ++++++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 5ecce36..c8e1285 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,12 @@ Changelog ========= +2.3.4 (unreleased) +------------------ + +- Nothing changed yet. + + 2.3.3 (2014-10-23) ------------------ diff --git a/setup.py b/setup.py index 4617758..f47ef94 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import find_packages from setuptools import setup -version = '2.3.3' +version = '2.3.4.dev0' install_requires = [ 'setuptools', From 19026439ddc00209d2580c4b7bdbfd91435e63b8 Mon Sep 17 00:00:00 2001 From: Gil Forcada Date: Wed, 3 Dec 2014 12:03:26 +0100 Subject: [PATCH 07/16] Use spaces please --- plone/app/discussion/profiles/default/rolemap.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plone/app/discussion/profiles/default/rolemap.xml b/plone/app/discussion/profiles/default/rolemap.xml index 83a67fc..8fc9ed6 100644 --- a/plone/app/discussion/profiles/default/rolemap.xml +++ b/plone/app/discussion/profiles/default/rolemap.xml @@ -3,12 +3,12 @@ - + - + From 744b5b6380b012a5d32c326e2f8b8589ba2cca5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Toss=20Molon?= Date: Fri, 5 Dec 2014 17:38:04 -0200 Subject: [PATCH 08/16] Updated pt-br translation --- CHANGES.rst | 2 +- .../pt_BR/LC_MESSAGES/plone.app.discussion.po | 43 +++++++++---------- 2 files changed, 21 insertions(+), 24 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index c8e1285..64f6396 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,7 @@ Changelog 2.3.4 (unreleased) ------------------ -- Nothing changed yet. +- Updated portuguese pt-br translation [jtmolon] 2.3.3 (2014-10-23) diff --git a/plone/app/discussion/locales/pt_BR/LC_MESSAGES/plone.app.discussion.po b/plone/app/discussion/locales/pt_BR/LC_MESSAGES/plone.app.discussion.po index 0340943..be8a3c0 100644 --- a/plone/app/discussion/locales/pt_BR/LC_MESSAGES/plone.app.discussion.po +++ b/plone/app/discussion/locales/pt_BR/LC_MESSAGES/plone.app.discussion.po @@ -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 \n" +"PO-Revision-Date: 2014-12-05 17:36+0200\n" +"Last-Translator: Joao Molon \n" "Language-Team: Plone i18n \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 From 2a130ffeb1acef5a7a2b4e6008e906ea9e3c375b Mon Sep 17 00:00:00 2001 From: Roberto Diaz Date: Thu, 11 Dec 2014 16:26:28 +0100 Subject: [PATCH 09/16] Updated CATALAN .po file --- .../ca/LC_MESSAGES/plone.app.discussion.po | 165 ++++++++++++------ 1 file changed, 107 insertions(+), 58 deletions(-) diff --git a/plone/app/discussion/locales/ca/LC_MESSAGES/plone.app.discussion.po b/plone/app/discussion/locales/ca/LC_MESSAGES/plone.app.discussion.po index 61dc606..328296f 100644 --- a/plone/app/discussion/locales/ca/LC_MESSAGES/plone.app.discussion.po +++ b/plone/app/discussion/locales/ca/LC_MESSAGES/plone.app.discussion.po @@ -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 \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2014-12-11 16:07+0100\n" +"Last-Translator: Roberto Diaz \n" +"Language-Team: Catalan \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" - From 609e9f61aa7d8a56eb6c588193b2c19a20d44fe4 Mon Sep 17 00:00:00 2001 From: Roberto Diaz Date: Thu, 11 Dec 2014 16:26:45 +0100 Subject: [PATCH 10/16] Updated SPANISH .po file --- .../es/LC_MESSAGES/plone.app.discussion.po | 69 +++++++++---------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/plone/app/discussion/locales/es/LC_MESSAGES/plone.app.discussion.po b/plone/app/discussion/locales/es/LC_MESSAGES/plone.app.discussion.po index 0b72e35..a9f8497 100644 --- a/plone/app/discussion/locales/es/LC_MESSAGES/plone.app.discussion.po +++ b/plone/app/discussion/locales/es/LC_MESSAGES/plone.app.discussion.po @@ -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 \n" -"Language-Team: es \n" +"PO-Revision-Date: 2014-12-11 16:07+0100\n" +"Last-Translator: Roberto Diaz \n" +"Language-Team: Spanish \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 @@ -481,5 +481,4 @@ msgstr "No hay nada para moderar." #. Default: "Bulk Actions" #: ../browser/moderation.pt:64 msgid "title_bulkactions" -msgstr "Acciones conjuntas" - +msgstr "Acciones conjuntas" \ No newline at end of file From e11471a44ebf88ea268f154e006b3f6d7a2cb6d8 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sat, 13 Dec 2014 09:34:09 +0100 Subject: [PATCH 11/16] Fix README.rst styles. --- CHANGES.rst | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 64f6396..a08c1a0 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,8 @@ Changelog 2.3.4 (unreleased) ------------------ -- Updated portuguese pt-br translation [jtmolon] +- Updated portuguese pt-br translation. + [jtmolon] 2.3.3 (2014-10-23) @@ -200,6 +201,7 @@ Changelog - Updated Ukrainian translation [kroman0] + 2.2.3 (2013-01-13) ------------------ @@ -207,6 +209,7 @@ Changelog the email field on comment add form when anonymous. [toutpt] + 2.2.2 (2012-11-16) ------------------ @@ -218,8 +221,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 From 785bc7b890d077889cf2afe262fbe325bdf29122 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sat, 13 Dec 2014 16:20:08 +0100 Subject: [PATCH 12/16] Read mail settings from new (Plone 5) registry. --- CHANGES.rst | 3 +++ plone/app/discussion/browser/controlpanel.py | 19 ++++++++----------- plone/app/discussion/comment.py | 18 ++++++++++-------- .../discussion/tests/test_notifications.py | 19 ++++++++++++++----- 4 files changed, 35 insertions(+), 24 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index a08c1a0..bc2ece8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,6 +7,9 @@ Changelog - Updated portuguese pt-br translation. [jtmolon] +- Read mail settings from new (Plone 5) registry. + [timo] + 2.3.3 (2014-10-23) ------------------ diff --git a/plone/app/discussion/browser/controlpanel.py b/plone/app/discussion/browser/controlpanel.py index 822ca2b..d90d8f1 100644 --- a/plone/app/discussion/browser/controlpanel.py +++ b/plone/app/discussion/browser/controlpanel.py @@ -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 @@ -152,12 +150,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 @@ -177,7 +174,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: diff --git a/plone/app/discussion/comment.py b/plone/app/discussion/comment.py index 193f30e..fb9c30e 100644 --- a/plone/app/discussion/comment.py +++ b/plone/app/discussion/comment.py @@ -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 diff --git a/plone/app/discussion/tests/test_notifications.py b/plone/app/discussion/tests/test_notifications.py index ab5c764..3b87f9b 100644 --- a/plone/app/discussion/tests/test_notifications.py +++ b/plone/app/discussion/tests/test_notifications.py @@ -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' From 07076e157bb9a2061eef01b9b7a0f5fbf3694e0c Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 29 Jan 2015 19:32:43 +0100 Subject: [PATCH 13/16] Fix buildout. --- bootstrap.py => bootstrap-buildout.py | 75 +++++++++++++++++---------- buildout.cfg | 31 ++++++----- 2 files changed, 62 insertions(+), 44 deletions(-) rename bootstrap.py => bootstrap-buildout.py (72%) diff --git a/bootstrap.py b/bootstrap-buildout.py similarity index 72% rename from bootstrap.py rename to bootstrap-buildout.py index 1b28969..a629566 100644 --- a/bootstrap.py +++ b/bootstrap-buildout.py @@ -35,7 +35,7 @@ Bootstraps a buildout-based project. Simply run this script in a directory containing a buildout.cfg, using the Python that you want bin/buildout to use. -Note that by using --find-links to point to local resources, you can keep +Note that by using --find-links to point to local resources, you can keep this script from going over the network. ''' @@ -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,32 +68,42 @@ options, args = parser.parse_args() ###################################################################### # load/install setuptools -to_reload = False try: - import pkg_resources - import setuptools + if options.allow_site_packages: + import setuptools + import pkg_resources + from urllib.request import urlopen except ImportError: - ez = {} + from urllib2 import urlopen - try: - from urllib.request import urlopen - except ImportError: - from urllib2 import urlopen +ez = {} +exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez) - # 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) +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] - if to_reload: - reload(pkg_resources) - import pkg_resources - # This does not (always?) update the default working set. We will - # do it. - for path in sys.path: - if path not in pkg_resources.working_set.entries: - pkg_resources.working_set.add_entry(path) +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: + if path not in pkg_resources.working_set.entries: + pkg_resources.working_set.add_entry(path) ###################################################################### # Install buildout @@ -119,10 +134,15 @@ if version is None and not options.accept_buildout_test_releases: _final_parts = '*final-', '*final' def _final_version(parsed_version): - for part in parsed_version: - if (part[:1] == '*') and (part not in _final_parts): - return False - return True + 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 diff --git a/buildout.cfg b/buildout.cfg index c893dfe..fac6771 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -1,14 +1,19 @@ [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 mkrelease pocompile code-analysis i18ndude update_translations +[instance] +recipe = plone.recipe.zope2instance +http-address = 8080 +user = admin:admin +eggs = Plone + [mkrelease] recipe = zc.recipe.egg eggs = jarn.mkrelease @@ -22,17 +27,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 = @@ -59,4 +53,9 @@ input = inline: $I18NDUDE sync --pot $BASE_PATH/i18n/plone.pot $BASE_PATH/i18n/plone-$LANG.po msgfmt --no-hash -o $BASE_PATH/i18n/plone-$LANG.mo $BASE_PATH/i18n/plone-$LANG.po done -mode = 755 \ No newline at end of file +mode = 755 + +[versions] +zope.interface = 4.0.5 +zc.buildout = 2.3.1 +setuptools = 8.0.4 From fd4203b9407bffee56167d1f682a45d6a29a6ce2 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 29 Jan 2015 19:34:30 +0100 Subject: [PATCH 14/16] Add travis configuration. --- .travis.yml | 19 +++++++++++++++++++ travis.cfg | 21 +++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .travis.yml create mode 100644 travis.cfg diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..959dcf3 --- /dev/null +++ b/.travis.yml @@ -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 diff --git a/travis.cfg b/travis.cfg new file mode 100644 index 0000000..d77bda1 --- /dev/null +++ b/travis.cfg @@ -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 From 52de2e809a3fafafe1d18a169de9b617fb5c34b7 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 29 Jan 2015 19:35:11 +0100 Subject: [PATCH 15/16] Delete jenkins.cfg. --- jenkins.cfg | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 jenkins.cfg diff --git a/jenkins.cfg b/jenkins.cfg deleted file mode 100644 index f5b0907..0000000 --- a/jenkins.cfg +++ /dev/null @@ -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 From 0591f9ad2d95159414c7e305930df169f6b09b45 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Thu, 29 Jan 2015 20:29:53 +0100 Subject: [PATCH 16/16] Fix buildout. --- buildout.cfg | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/buildout.cfg b/buildout.cfg index fac6771..b9a690e 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -2,11 +2,15 @@ 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 @@ -14,6 +18,28 @@ 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 eggs = jarn.mkrelease @@ -56,6 +82,7 @@ input = inline: mode = 755 [versions] +plone.app.discussion = zope.interface = 4.0.5 zc.buildout = 2.3.1 setuptools = 8.0.4