Added the locales support.

Also refactored interfaces string to cleanup the default i18n messages default.

svn path=/plone.app.discussion/branches/localization-enabled/; revision=33352
This commit is contained in:
Luca Fabbri 2010-01-24 11:25:22 +00:00
parent 3c22930ba2
commit 569cd0f33b
5 changed files with 653 additions and 18 deletions

View File

@ -10,7 +10,7 @@
<include file="permissions.zcml" />
<include package=".browser" />
<!--<i18n:registerTranslations directory="locales" />-->
<i18n:registerTranslations directory="locales" />
<!-- Register the installation GenericSetup extension profile -->
<genericsetup:registerProfile

14
plone/app/discussion/i18n.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
DOMAIN='plone.app.discussion'
i18ndude rebuild-pot --pot locales/${DOMAIN}.pot --create ${DOMAIN} .
i18ndude sync --pot locales/${DOMAIN}.pot locales/*/LC_MESSAGES/${DOMAIN}.po
# Compile po files
for lang in $(find locales -mindepth 1 -maxdepth 1 -type d); do
if test -d $lang/LC_MESSAGES; then
msgfmt -o $lang/LC_MESSAGES/${DOMAIN}.mo $lang/LC_MESSAGES/${DOMAIN}.po
fi
done

View File

@ -17,36 +17,41 @@ class IDiscussionSettings(Interface):
# - Types control panel: Allow comments on content types
# - Search control panel: Show comments in search results
globally_enabled = schema.Bool(title=_(u"Globally enable comments"),
description=_(u"""If selected, users are able to
post comments on the site."""),
globally_enabled = schema.Bool(title=_(u"label_globally_enabled",
default=u"Globally enable comments"),
description=_(u"help_globally_enabled",
default=u"If selected, users are able to "
"post comments on the site."),
required=False,
default=True)
anonymous_comments = schema.Bool(title=_(u"Enable anonymous comments"),
description=_(u"""If selected, anonymous users are
able to post comments without
logging in. It is highly
recommended to use a captcha
solution to prevent spam if
this setting is enabled."""),
description=_(u"help_anonymous_comments",
default=u"If selected, anonymous users are "
"able to post comments without "
"logging in. It is highly "
"recommended to use a captcha "
"solution to prevent spam if "
"this setting is enabled."),
required=False,
default=False)
captcha = schema.Choice(title=_(u"Captcha"),
description=_(u"""Use this setting to enable or disable
captcha validation for comments. If no
captcha options are currently available,
install plone.formwidget.captcha or
plone.formwidget.recaptcha."""),
description=_(u"help_captcha",
default=u"Use this setting to enable or disable "
"captcha validation for comments. If no "
"captcha options are currently available, "
"install plone.formwidget.captcha or "
"plone.formwidget.recaptcha."),
required=True,
default='disabled',
vocabulary='plone.app.discussion.vocabularies.CaptchaVocabulary',)
show_commenter_image = schema.Bool(title=_(u"Show commenter image"),
description=_(u"""If selected, an image of the
user is shown next to the
comment."""),
description=_(u"help_show_commenter_image",
default=u"If selected, an image of the "
"user is shown next to the "
"comment."),
required=False,
default=True)

View File

@ -0,0 +1,302 @@
# Translations for plone.app.discussion
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2010-01-24 11:15+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: Luca Fabbri <luca.fabbri@redturtle.net>\n"
"Language-Team: RedTurtle Technology <sviluppoplone@redturtle.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"
"Language-Code: en\n"
"Language-Name: English\n"
"Preferred-Encodings: utf-8 latin1\n"
"Domain: DOMAIN\n"
#: ./interfaces.py:165
msgid "A comment id unique to this conversation"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "A simple workflow for comments"
msgstr ""
#: ./browser/comments.py:59
msgid "Add a comment"
msgstr ""
#: ./interfaces.py:180
msgid "Author name (for display)"
msgstr ""
#: ./browser/comments.py:177
msgid "Cancel"
msgstr ""
#: ./interfaces.py:39
msgid "Captcha"
msgstr ""
#: ./browser/comments.py:85
#: ./interfaces.py:178
#: ./profiles/default/types/Discussion_Item.xml
msgid "Comment"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Comment Review Workflow"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Comment about the last transition"
msgstr ""
#: ./browser/moderation.py:87
msgid "Comment deleted."
msgstr ""
#: ./browser/moderation.py:109
msgid "Comment published."
msgstr ""
#: ./browser/controlpanel.py:17
msgid "CommentComment Review Workflow"
msgstr ""
#: ./profiles/default/portal_atct.xml
msgid "Commentators"
msgstr ""
#: ./profiles/default/types/Discussion_Item.xml
msgid "Comments added to a content item."
msgstr ""
#: ./interfaces.py:162
msgid "Conversation"
msgstr ""
#: ./interfaces.py:181
msgid "Creation date"
msgstr ""
#: ./interfaces.py:80
msgid "Date of the most recent comment"
msgstr ""
#: ./profiles/default/controlpanel.xml
msgid "Discussion"
msgstr ""
#: ./browser/controlpanel.py:16
msgid "Discussion settings"
msgstr ""
#: ./interfaces.py:173
msgid "Email"
msgstr ""
#: ./interfaces.py:28
msgid "Enable anonymous comments"
msgstr ""
#: ./interfaces.py:166
msgid "Id of comment this comment is in reply to"
msgstr ""
#: ./interfaces.py:177
msgid "MIME type"
msgstr ""
#: ./profiles/default/actions.xml
msgid "Moderate comments"
msgstr "Moderazione commenti"
#: ./interfaces.py:182
msgid "Modification date"
msgstr ""
#: ./interfaces.py:163
msgid "Name"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Pending"
msgstr ""
#: ./interfaces.py:160
msgid "Portal type"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Previous transition"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Provides access to workflow history"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Publish"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Published"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Publishing the comment makes it visible to other users."
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Reviewer publishes content"
msgstr ""
#: ./interfaces.py:50
msgid "Show commenter image"
msgstr ""
#: ./interfaces.py:175
msgid "Subject"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Submitted, pending review."
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "The ID of the user who performed the previous transition"
msgstr ""
#: ./browser/validator.py:28
msgid "The code you entered was wrong, please enter the new one."
msgstr ""
#: ./interfaces.py:81
msgid "The set of unique commentators (usernames)"
msgstr ""
#: ./profiles/default/portal_atct.xml
msgid "Total number of comments"
msgstr ""
#: ./interfaces.py:79
msgid "Total number of comments on this item"
msgstr ""
#: ./profiles/default/portal_atct.xml
msgid "Total number of comments on this item."
msgstr ""
#: ./profiles/default/portal_atct.xml
msgid "Users who have commented on the item"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Visible to everyone, non-editable."
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "When the previous transition was performed"
msgstr ""
#: ./browser/comments.py:170
msgid "Your comment awaits moderator approval."
msgstr ""
#. Default: "Delete"
#: ./browser/moderation.pt:52
msgid "bulkactions_delete"
msgstr ""
#. Default: "Publish"
#: ./browser/moderation.pt:49
msgid "bulkactions_publish"
msgstr ""
#. Default: "Action"
#: ./browser/moderation.pt:70
msgid "heading_action"
msgstr ""
#. Default: "Commenter"
#: ./browser/moderation.pt:65
msgid "heading_author"
msgstr ""
#. Default: "Comment"
#: ./browser/moderation.pt:69
msgid "heading_comment"
msgstr ""
#. Default: "In Response To"
#: ./browser/moderation.pt:67
msgid "heading_context"
msgstr ""
#. Default: "Date"
#: ./browser/moderation.pt:66
msgid "heading_date"
msgstr ""
#. Default: "Subject"
#: ./browser/moderation.pt:68
msgid "heading_subject"
msgstr ""
#. Default: "If selected, anonymous users are able to post comments without logging in. It is highly recommended to use a captcha solution to prevent spam if this setting is enabled."
#: ./interfaces.py:29
msgid "help_anonymous_comments"
msgstr ""
#. Default: "Use this setting to enable or disable captcha validation for comments. If no captcha options are currently available, install plone.formwidget.captcha or plone.formwidget.recaptcha."
#: ./interfaces.py:40
msgid "help_captcha"
msgstr ""
#. Default: "If selected, users are able to post comments on the site."
#: ./interfaces.py:22
msgid "help_globally_enabled"
msgstr ""
#. Default: "If selected, an image of the user is shown next to the comment."
#: ./interfaces.py:51
msgid "help_show_commenter_image"
msgstr ""
#. Default: "Apply"
#: ./browser/moderation.pt:55
msgid "label_apply"
msgstr ""
#. Default: "Delete"
#: ./browser/moderation.pt:113
msgid "label_delete"
msgstr ""
#. Default: "Globally enable comments"
#: ./interfaces.py:20
msgid "label_globally_enabled"
msgstr ""
#. Default: "Publish"
#: ./browser/moderation.pt:104
msgid "label_publish"
msgstr ""
#. Default: "No comments to moderate."
#: ./browser/moderation.pt:27
msgid "message_nothing_to_moderate"
msgstr ""
#. Default: "Bulk Actions"
#: ./browser/moderation.pt:48
msgid "title_bulkactions"
msgstr ""
#. Default: "Moderate comments"
#: ./browser/moderation.pt:21
msgid "title_review"
msgstr ""

View File

@ -0,0 +1,314 @@
# --- PLEASE EDIT THE LINES BELOW CORRECTLY ---
# SOME DESCRIPTIVE TITLE.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2010-01-24 11:15+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\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"
"Language-Code: en\n"
"Language-Name: English\n"
"Preferred-Encodings: utf-8 latin1\n"
"Domain: plone.app.discussion\n"
#: ./interfaces.py:165
msgid "A comment id unique to this conversation"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "A simple workflow for comments"
msgstr ""
#: ./browser/comments.py:59
msgid "Add a comment"
msgstr ""
#: ./interfaces.py:180
msgid "Author name (for display)"
msgstr ""
#: ./browser/comments.py:177
msgid "Cancel"
msgstr ""
#: ./interfaces.py:39
msgid "Captcha"
msgstr ""
#: ./browser/comments.py:85
#: ./interfaces.py:178
#: ./profiles/default/types/Discussion_Item.xml
msgid "Comment"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Comment Review Workflow"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Comment about the last transition"
msgstr ""
#: ./browser/moderation.py:87
msgid "Comment deleted."
msgstr ""
#: ./browser/moderation.py:109
msgid "Comment published."
msgstr ""
#: ./profiles/default/portal_atct.xml
msgid "Commentators"
msgstr ""
#: ./profiles/default/types/Discussion_Item.xml
msgid "Comments added to a content item."
msgstr ""
#: ./interfaces.py:162
msgid "Conversation"
msgstr ""
#: ./interfaces.py:181
msgid "Creation date"
msgstr ""
#: ./interfaces.py:80
msgid "Date of the most recent comment"
msgstr ""
#: ./profiles/default/controlpanel.xml
msgid "Discussion"
msgstr ""
#: ./browser/controlpanel.py:16
msgid "Discussion settings"
msgstr ""
#: ./interfaces.py:173
msgid "Email"
msgstr ""
#: ./interfaces.py:28
msgid "Enable anonymous comments"
msgstr ""
#: ./interfaces.py:166
msgid "Id of comment this comment is in reply to"
msgstr ""
#: ./interfaces.py:177
msgid "MIME type"
msgstr ""
#: ./profiles/default/actions.xml
msgid "Moderate comments"
msgstr ""
#: ./interfaces.py:182
msgid "Modification date"
msgstr ""
#: ./interfaces.py:163
msgid "Name"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Pending"
msgstr ""
#: ./interfaces.py:160
msgid "Portal type"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Previous transition"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Provides access to workflow history"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Publish"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Published"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Publishing the comment makes it visible to other users."
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Reviewer publishes content"
msgstr ""
#: ./interfaces.py:50
msgid "Show commenter image"
msgstr ""
#: ./browser/controlpanel.py:17
msgid "Some discussion related settings are not located
in the Discussion Control Panel.
To enable comments for a specific content type,
go to the Types Control Panel of this type and
choose 'enable moderation'.
To enable the moderation workflow for comments,
go to the Types Control Panel, choose "Comment"
and set workflow to "Comment Review Workflow".
"
msgstr ""
#: ./interfaces.py:175
msgid "Subject"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Submitted, pending review."
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "The ID of the user who performed the previous transition"
msgstr ""
#: ./browser/validator.py:28
msgid "The code you entered was wrong, please enter the new one."
msgstr ""
#: ./interfaces.py:81
msgid "The set of unique commentators (usernames)"
msgstr ""
#: ./profiles/default/portal_atct.xml
msgid "Total number of comments"
msgstr ""
#: ./interfaces.py:79
msgid "Total number of comments on this item"
msgstr ""
#: ./profiles/default/portal_atct.xml
msgid "Total number of comments on this item."
msgstr ""
#: ./profiles/default/portal_atct.xml
msgid "Users who have commented on the item"
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "Visible to everyone, non-editable."
msgstr ""
#: ./profiles/default/workflows/comment_review_workflow/definition.xml
msgid "When the previous transition was performed"
msgstr ""
#: ./browser/comments.py:170
msgid "Your comment awaits moderator approval."
msgstr ""
#. Default: "Delete"
#: ./browser/moderation.pt:52
msgid "bulkactions_delete"
msgstr ""
#. Default: "Publish"
#: ./browser/moderation.pt:49
msgid "bulkactions_publish"
msgstr ""
#. Default: "Action"
#: ./browser/moderation.pt:70
msgid "heading_action"
msgstr ""
#. Default: "Commenter"
#: ./browser/moderation.pt:65
msgid "heading_author"
msgstr ""
#. Default: "Comment"
#: ./browser/moderation.pt:69
msgid "heading_comment"
msgstr ""
#. Default: "In Response To"
#: ./browser/moderation.pt:67
msgid "heading_context"
msgstr ""
#. Default: "Date"
#: ./browser/moderation.pt:66
msgid "heading_date"
msgstr ""
#. Default: "Subject"
#: ./browser/moderation.pt:68
msgid "heading_subject"
msgstr ""
#. Default: "If selected, anonymous users are able to post comments without logging in. It is highly recommended to use a captcha solution to prevent spam if this setting is enabled."
#: ./interfaces.py:29
msgid "help_anonymous_comments"
msgstr ""
#. Default: "Use this setting to enable or disable captcha validation for comments. If no captcha options are currently available, install plone.formwidget.captcha or plone.formwidget.recaptcha."
#: ./interfaces.py:40
msgid "help_captcha"
msgstr ""
#. Default: "If selected, users are able to post comments on the site."
#: ./interfaces.py:22
msgid "help_globally_enabled"
msgstr ""
#. Default: "If selected, an image of the user is shown next to the comment."
#: ./interfaces.py:51
msgid "help_show_commenter_image"
msgstr ""
#. Default: "Apply"
#: ./browser/moderation.pt:55
msgid "label_apply"
msgstr ""
#. Default: "Delete"
#: ./browser/moderation.pt:113
msgid "label_delete"
msgstr ""
#. Default: "Globally enable comments"
#: ./interfaces.py:20
msgid "label_globally_enabled"
msgstr ""
#. Default: "Publish"
#: ./browser/moderation.pt:104
msgid "label_publish"
msgstr ""
#. Default: "No comments to moderate."
#: ./browser/moderation.pt:27
msgid "message_nothing_to_moderate"
msgstr ""
#. Default: "Bulk Actions"
#: ./browser/moderation.pt:48
msgid "title_bulkactions"
msgstr ""
#. Default: "Moderate comments"
#: ./browser/moderation.pt:21
msgid "title_review"
msgstr ""