Fixed internationalization issues.

svn path=/plone.app.discussion/trunk/; revision=48110
This commit is contained in:
Thomas Desvenain 2011-03-17 16:15:40 +00:00
parent cf5f101538
commit 7c2a815fdb
2 changed files with 87 additions and 81 deletions

View File

@ -4,7 +4,10 @@ Changelog
2.0b1 (Unreleased) 2.0b1 (Unreleased)
------------------ ------------------
- Added Afrikaans translations - Fixed internationalization issues.
[thomasdesvenain]
- Added Afrikaans translations
[jcbrand] [jcbrand]
2.0a3 (2011-03-02) 2.0a3 (2011-03-02)
@ -12,7 +15,7 @@ Changelog
- Fixed test failure for the default user portrait, which changed from - Fixed test failure for the default user portrait, which changed from
defaultUser.gif to defaultUser.png in Products.PlonePAS 4.0.5 defaultUser.gif to defaultUser.png in Products.PlonePAS 4.0.5
[maurits] [maurits]
2.0a2 (2011-02-08) 2.0a2 (2011-02-08)
------------------ ------------------
@ -22,7 +25,7 @@ Changelog
- Remove "Plone 3 only" code. - Remove "Plone 3 only" code.
[timo] [timo]
- Do not monkey patch the BAD_TYPES vocabulary or plone.app.vocabularies - Do not monkey patch the BAD_TYPES vocabulary or plone.app.vocabularies
anymore. anymore.
[timo] [timo]
@ -31,20 +34,20 @@ Changelog
2.0a1 (2011-02-07) 2.0a1 (2011-02-07)
------------------ ------------------
- Split up development into two branches. The 1.x branch will be for Plone 3.x - Split up development into two branches. The 1.x branch will be for Plone 3.x
and Plone 4.0.x and the 2.x branch will be for Plone 4.1 and beyond. and Plone 4.0.x and the 2.x branch will be for Plone 4.1 and beyond.
[timo] [timo]
- Import Owned from OFS.owner to avoid deprecation warnings. - Import Owned from OFS.owner to avoid deprecation warnings.
[timo] [timo]
- Disable discussion by default. - Disable discussion by default.
[timo] [timo]
- Enable ajaxify comment deletion again ([thomasdesvenain]). This has been - Enable ajaxify comment deletion again ([thomasdesvenain]). This has been
disabled in 1.0b12 because of problems with Plone 3. disabled in 1.0b12 because of problems with Plone 3.
[timo] [timo]
- Remove collective.autopermission dependency that has become unnecessary in - Remove collective.autopermission dependency that has become unnecessary in
Plone 4.1. Plone 4.1.
[timo] [timo]
@ -56,10 +59,10 @@ Changelog
- Do not check for a comment review workflow when sending out a moderator email - Do not check for a comment review workflow when sending out a moderator email
notification. This fixes http://dev.plone.org/plone/ticket/11444. notification. This fixes http://dev.plone.org/plone/ticket/11444.
[timo] [timo]
- Check if the current user has configured an e-mail address for the email - Check if the current user has configured an e-mail address for the email
notification option. This fixes http://dev.plone.org/plone/ticket/11428. notification option. This fixes http://dev.plone.org/plone/ticket/11428.
[timo] [timo]
1.0RC2 (2011-01-24) 1.0RC2 (2011-01-24)
@ -73,17 +76,17 @@ Changelog
1.0RC1 (2011-01-22) 1.0RC1 (2011-01-22)
------------------- -------------------
- Always show existing comments, even if commenting is disabled. - Always show existing comments, even if commenting is disabled.
[timo] [timo]
- Fix CSS for commenter images with a width of more than 2.5em. This fixes - Fix CSS for commenter images with a width of more than 2.5em. This fixes
http://dev.plone.org/plone/ticket/11391. http://dev.plone.org/plone/ticket/11391.
[timo] [timo]
- Show a 'Comments are moderated.' message next to the comment form if comments - Show a 'Comments are moderated.' message next to the comment form if comments
are moderated. are moderated.
[timo] [timo]
- Make sure plone.app.registry's ZCML is loaded, so that its import step will run - Make sure plone.app.registry's ZCML is loaded, so that its import step will run
when plone.app.discussion is installed. when plone.app.discussion is installed.
[davisagli] [davisagli]
@ -91,42 +94,42 @@ Changelog
- Avoid sending multiple notification emails to the same person when - Avoid sending multiple notification emails to the same person when
he has commented multiple times. he has commented multiple times.
[maurits] [maurits]
- Move discussion action item from actionicons.xml to actions.xml to avoid - Move discussion action item from actionicons.xml to actions.xml to avoid
deprecation warning. deprecation warning.
[timo] [timo]
- Fix cancel button on edit view when using Dexterity types. This fixes - Fix cancel button on edit view when using Dexterity types. This fixes
http://dev.plone.org/plone/ticket/11338. http://dev.plone.org/plone/ticket/11338.
[EpeliJYU] [EpeliJYU]
- Assigning the 'Reply to item' permission to the 'Authenticated' role. The old - Assigning the 'Reply to item' permission to the 'Authenticated' role. The old
commenting system allowed 'Authenticated' users to post comments. Also, OpenID commenting system allowed 'Authenticated' users to post comments. Also, OpenID
users do not possess the 'Authenticated' role. users do not possess the 'Authenticated' role.
[timo] [timo]
- Make sure the handleComment method checks for the 'Reply to item' permission - Make sure the handleComment method checks for the 'Reply to item' permission
when adding a comment. when adding a comment.
[timo] [timo]
- Make the mail-setting warning message show up in the discussion control panel. - Make the mail-setting warning message show up in the discussion control panel.
[timo] [timo]
- Link directly to the "Discussion Item" types control panel in the moderation - Link directly to the "Discussion Item" types control panel in the moderation
view. view.
[timo] [timo]
- Show "moderate comments" link in the admin panel only if a moderation - Show "moderate comments" link in the admin panel only if a moderation
workflow is enabled for comments. workflow is enabled for comments.
[timo] [timo]
- Do not allow to change the mail settings in the discussion control panel, if - Do not allow to change the mail settings in the discussion control panel, if
there is no valid mail setup. there is no valid mail setup.
[timo] [timo]
- Disable all commenting options in the discussion control panel if comments - Disable all commenting options in the discussion control panel if comments
are disabled globally. are disabled globally.
- Check for the 'review comments' permission instead of 'manage' to decide - Check for the 'review comments' permission instead of 'manage' to decide
if the user should see a 'this comment is pending' message. if the user should see a 'this comment is pending' message.
[timo] [timo]
@ -136,10 +139,10 @@ Changelog
- Moderator notification description updated. - Moderator notification description updated.
[timo] [timo]
- Redirect back to the discussion control panel when the discussion control - Redirect back to the discussion control panel when the discussion control
panel form is submitted. panel form is submitted.
[timo] [timo]
- Fix document_byline bottom margin if commenter images are disabled. - Fix document_byline bottom margin if commenter images are disabled.
[timo] [timo]
@ -155,23 +158,23 @@ Changelog
[timo] [timo]
- Always set the effective date of a comment to the same value as the creation - Always set the effective date of a comment to the same value as the creation
date. date.
[timo] [timo]
- Fix SMTP exception when an email is send to the moderator. - Fix SMTP exception when an email is send to the moderator.
[timo] [timo]
- Make sure comment UIDs in the catalog are always unique. This fixes - Make sure comment UIDs in the catalog are always unique. This fixes
http://dev.plone.org/plone/ticket/10652. http://dev.plone.org/plone/ticket/10652.
[timo] [timo]
- Fix 'check all' on batch moderation page. - Fix 'check all' on batch moderation page.
[davisagli] [davisagli]
- Use safe_unicode to decode the title of the content. encode("utf-9") caused - Use safe_unicode to decode the title of the content. encode("utf-9") caused
Dexterity based content types to raise a unicode decode error. This fixes Dexterity based content types to raise a unicode decode error. This fixes
http://dev.plone.org/plone/ticket/11292 http://dev.plone.org/plone/ticket/11292
[dukebody] [dukebody]
- Spanish translation updated. - Spanish translation updated.
[dukebody] [dukebody]
@ -192,8 +195,8 @@ Changelog
1.0b12 (2010-11-04) 1.0b12 (2010-11-04)
------------------- -------------------
- Remove AJAX comment deletion binding. This function relies on the nextUntil() - Remove AJAX comment deletion binding. This function relies on the nextUntil()
selector introduced by jQuery 1.4 and therefore breaks in Plone 3 selector introduced by jQuery 1.4 and therefore breaks in Plone 3
(that currently uses jQuery 1.3.2). (that currently uses jQuery 1.3.2).
[timo] [timo]
@ -218,8 +221,8 @@ Changelog
- Ajaxify comment deletion and approval. - Ajaxify comment deletion and approval.
[thomasdesvenain] [thomasdesvenain]
- New feature: As a logged-in user, I can enable/disable email notification of - New feature: As a logged-in user, I can enable/disable email notification of
additional comments on this content object. additional comments on this content object.
[timo] [timo]
@ -241,9 +244,9 @@ Changelog
but no other validation package is installed. but no other validation package is installed.
[naro] [naro]
- Check if there is a 'pending' review state in the current workflow for - Check if there is a 'pending' review state in the current workflow for
comments instead of just checking for the 'comment_review_workflow'. This comments instead of just checking for the 'comment_review_workflow'. This
allows integrators to use a custom review workflow. This fixes allows integrators to use a custom review workflow. This fixes
http://dev.plone.org/plone/ticket/11184. http://dev.plone.org/plone/ticket/11184.
[timo] [timo]
@ -254,12 +257,12 @@ Changelog
1.0b9 (2010-10-07) 1.0b9 (2010-10-07)
------------------ ------------------
- Replace the can_manage method with a can_review method that checks the - Replace the can_manage method with a can_review method that checks the
'Review comments' permission. This fixes 'Review comments' permission. This fixes
http://dev.plone.org/plone/ticket/11145. http://dev.plone.org/plone/ticket/11145.
[timo] [timo]
- Fix moderation actions (publish, delete) in the moderation view with virtual - Fix moderation actions (publish, delete) in the moderation view with virtual
hosts. This is a replacement for http://dev.plone.org/plone/changeset/35608. hosts. This is a replacement for http://dev.plone.org/plone/changeset/35608.
[timo] [timo]
@ -278,24 +281,24 @@ Changelog
- Remove title field from the comment form and replace it with an auto-generated - Remove title field from the comment form and replace it with an auto-generated
title ("John Doe on Welcome to Plone"). title ("John Doe on Welcome to Plone").
[timo] [timo]
- Fix http://dev.plone.org/plone/ticket/11098: "Comment byline shows login - Fix http://dev.plone.org/plone/ticket/11098: "Comment byline shows login
name, not full name" name, not full name"
[kiorky] [kiorky]
- Make sure the __parent__ pointer (the conversation) of a comment is not - Make sure the __parent__ pointer (the conversation) of a comment is not
acquisition wrapped in conversation.addComment. This fixes acquisition wrapped in conversation.addComment. This fixes
http://dev.plone.org/plone/ticket/11157. http://dev.plone.org/plone/ticket/11157.
[timo] [timo]
- Revert r35608 since this was breaking the comment moderation bulk actions. - Revert r35608 since this was breaking the comment moderation bulk actions.
The BulkActionsView expects the absolute path of the comments without the The BulkActionsView expects the absolute path of the comments without the
portal url (e.g. '/plone/doc1/++conversation++default/1285346769126020'). portal url (e.g. '/plone/doc1/++conversation++default/1285346769126020').
This fixes http://dev.plone.org/plone/ticket/11156. This fixes http://dev.plone.org/plone/ticket/11156.
[timo] [timo]
- Use "(function($) { /* some code that uses $ \*/ })(jQuery)" instead of - Use "(function($) { /* some code that uses $ \*/ })(jQuery)" instead of
"$(document).ready(function(){ /* some code that uses $ \*/ });" to invoke "$(document).ready(function(){ /* some code that uses $ \*/ });" to invoke
jQuery code. jQuery code.
[timo] [timo]
@ -309,7 +312,7 @@ Changelog
1.0b7 (2010-09-15) 1.0b7 (2010-09-15)
------------------ ------------------
* Captcha plugin support for collective.z3cform.norobots (version >= 1.1) added. * Captcha plugin support for collective.z3cform.norobots (version >= 1.1) added.
[saffe] [saffe]
* Store dates in utc and not in local time. Display local time * Store dates in utc and not in local time. Display local time
@ -317,12 +320,12 @@ Changelog
* Fetch context for the comment view with "context = aq_inner(self.context)". * Fetch context for the comment view with "context = aq_inner(self.context)".
[timo] [timo]
* Raise an unauthorized error when authenticated users try to post a comment * Raise an unauthorized error when authenticated users try to post a comment
on a content object that has discussion disabled. Thanks to vincentfrentin on a content object that has discussion disabled. Thanks to vincentfrentin
for reporting this. for reporting this.
[timo] [timo]
* Czech translation added. * Czech translation added.
[naro] [naro]
@ -335,8 +338,8 @@ Changelog
* Put email notification subscribers into their own zcml file so it is easier * Put email notification subscribers into their own zcml file so it is easier
for integrators to override them. for integrators to override them.
[timo] [timo]
* Plain text and intelligent text options for comment text added to preserve * Plain text and intelligent text options for comment text added to preserve
basic text structure and to make links clickable. basic text structure and to make links clickable.
[timo] [timo]
@ -354,8 +357,8 @@ Changelog
instead of True because of allow_discussion acquisition. instead of True because of allow_discussion acquisition.
[vincentfretin] [vincentfretin]
* Redirect to the comment form action instead of the absolute URL when a * Redirect to the comment form action instead of the absolute URL when a
comment is posted. This fixes the accidentally triggered file upload when a comment is posted. This fixes the accidentally triggered file upload when a
comment is posted on a file content object. comment is posted on a file content object.
[timo] [timo]
@ -372,7 +375,7 @@ Changelog
plone domain. plone domain.
[vincentfretin] [vincentfretin]
* label_comment_by and label_commented_at are not in Plone 4 translation * label_comment_by and label_commented_at are not in Plone 4 translation
anymore, so these two messages moved to plone.app.discussions i18n domain. anymore, so these two messages moved to plone.app.discussions i18n domain.
[vincentfretin] [vincentfretin]
@ -385,11 +388,11 @@ Changelog
* Catch Type errors in indexers if object can not be adapted to IDiscussion * Catch Type errors in indexers if object can not be adapted to IDiscussion
[do3cc] [do3cc]
* Call the CaptchaValidator even when no captcha data was submitted. This is * Call the CaptchaValidator even when no captcha data was submitted. This is
necessary to ensure that the collective.akismet validator is called when necessary to ensure that the collective.akismet validator is called when
installed. installed.
[timo] [timo]
* Spanish translation added. Thanks to Judith Sanleandro. * Spanish translation added. Thanks to Judith Sanleandro.
[timo] [timo]
@ -397,20 +400,20 @@ Changelog
1.0b5 (2010-07-16) 1.0b5 (2010-07-16)
------------------ ------------------
* Use self.form instead of CommentForm for the CommentsViewlet update method so * Use self.form instead of CommentForm for the CommentsViewlet update method so
integrators don't have to override the viewlet's update method. integrators don't have to override the viewlet's update method.
[matous] [matous]
* Make sure the form fields in the reply form are always placed under the field * Make sure the form fields in the reply form are always placed under the field
labels. labels.
[timo] [timo]
* Fix CSS overflow bug that occurs with the new Plone 4.0b5 comment styles. * Fix CSS overflow bug that occurs with the new Plone 4.0b5 comment styles.
[timo] [timo]
* Unnecessary imports and variables removed. * Unnecessary imports and variables removed.
[timo] [timo]
* Added norwegian translation. * Added norwegian translation.
[ggozad] [ggozad]
@ -420,7 +423,7 @@ Changelog
* Documentation for Captcha plugin architecture and email notification added. * Documentation for Captcha plugin architecture and email notification added.
See http://packages.python.org/plone.app.discussion. See http://packages.python.org/plone.app.discussion.
[timo] [timo]
* Use sphinx.plonetheme for plone.app.discussion documentation. * Use sphinx.plonetheme for plone.app.discussion documentation.
[timo] [timo]

View File

@ -110,7 +110,7 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
member = mtool.getAuthenticatedMember() member = mtool.getAuthenticatedMember()
member_email = member.getProperty('email') member_email = member.getProperty('email')
# Hide the user_notification checkbox if user notification is disabled # Hide the user_notification checkbox if user notification is disabled
# or the user is not logged in. Also check if the user has a valid email # or the user is not logged in. Also check if the user has a valid email
# address # address
if member_email == '' or \ if member_email == '' or \
@ -316,10 +316,12 @@ class CommentsViewlet(ViewletBase):
# text transform setting # text transform setting
if settings.text_transform == "text/x-web-intelligent": if settings.text_transform == "text/x-web-intelligent":
message = translate(Message(COMMENT_DESCRIPTION_INTELLIGENT_TEXT)) message = translate(Message(COMMENT_DESCRIPTION_INTELLIGENT_TEXT),
context=self.request)
else: else:
message = translate(Message(COMMENT_DESCRIPTION_PLAIN_TEXT)) message = translate(Message(COMMENT_DESCRIPTION_PLAIN_TEXT,
context=self.request))
# comment workflow # comment workflow
wftool = getToolByName(context, "portal_workflow", None) wftool = getToolByName(context, "portal_workflow", None)
comment_workflow = wftool.getChainForPortalType('Discussion Item')[0] comment_workflow = wftool.getChainForPortalType('Discussion Item')[0]
@ -328,8 +330,9 @@ class CommentsViewlet(ViewletBase):
# true comments are moderated # true comments are moderated
if 'pending' in comment_workflow.states: if 'pending' in comment_workflow.states:
message = message + " " + \ message = message + " " + \
translate(Message(COMMENT_DESCRIPTION_MODERATION_ENABLED)) translate(Message(COMMENT_DESCRIPTION_MODERATION_ENABLED),
context=self.request)
return message return message
def has_replies(self, workflow_actions=False): def has_replies(self, workflow_actions=False):