From 0713bcd8bc14a9f8d7fd5bb7f80083871d465435 Mon Sep 17 00:00:00 2001 From: Gil Forcada Date: Thu, 5 Nov 2015 00:26:49 +0100 Subject: [PATCH] Use plone i18n domain plone.app.discussion is an official Plone core package, thus their translations belong to plone.app.locales. This commit removes the plone.app.discussion domain and changes it for plone. This fixes: https://github.com/plone/plone.app.discussion/issues/66 --- docs/source/howtos/howto_extend_the_comment_form.txt | 2 +- plone/app/discussion/__init__.py | 2 +- plone/app/discussion/browser/captcha.zcml | 2 +- plone/app/discussion/browser/comment.py | 2 +- plone/app/discussion/browser/comments.pt | 3 +-- plone/app/discussion/browser/comments.py | 2 +- plone/app/discussion/browser/configure.zcml | 2 +- plone/app/discussion/browser/moderation.pt | 4 ++-- plone/app/discussion/comment.py | 2 +- plone/app/discussion/configure.zcml | 2 +- plone/app/discussion/contentrules.py | 2 +- plone/app/discussion/interfaces.py | 2 +- plone/app/discussion/locales/update.sh | 6 ------ plone/app/discussion/notifications.zcml | 2 +- plone/app/discussion/permissions.zcml | 2 +- plone/app/discussion/subscribers.zcml | 2 +- 16 files changed, 16 insertions(+), 23 deletions(-) delete mode 100755 plone/app/discussion/locales/update.sh diff --git a/docs/source/howtos/howto_extend_the_comment_form.txt b/docs/source/howtos/howto_extend_the_comment_form.txt index 8be7674..6f3b604 100644 --- a/docs/source/howtos/howto_extend_the_comment_form.txt +++ b/docs/source/howtos/howto_extend_the_comment_form.txt @@ -143,7 +143,7 @@ plone.app.discussion.browser.comments.pt. You can now add code to show the website attribute to the documentByLine:: -
+
...
diff --git a/plone/app/discussion/__init__.py b/plone/app/discussion/__init__.py index 182a1d5..1936adc 100644 --- a/plone/app/discussion/__init__.py +++ b/plone/app/discussion/__init__.py @@ -2,4 +2,4 @@ from zope.i18nmessageid import MessageFactory -PloneAppDiscussionMessageFactory = MessageFactory('plone.app.discussion') +_ = MessageFactory('plone') diff --git a/plone/app/discussion/browser/captcha.zcml b/plone/app/discussion/browser/captcha.zcml index 9acfddf..2395163 100644 --- a/plone/app/discussion/browser/captcha.zcml +++ b/plone/app/discussion/browser/captcha.zcml @@ -2,7 +2,7 @@ xmlns="http://namespaces.zope.org/zope" xmlns:meta="http://namespaces.zope.org/meta" xmlns:zcml="http://namespaces.zope.org/zcml" - i18n_domain="plone.app.discussion"> + i18n_domain="plone"> diff --git a/plone/app/discussion/browser/comment.py b/plone/app/discussion/browser/comment.py index 837ca4e..d5574e7 100644 --- a/plone/app/discussion/browser/comment.py +++ b/plone/app/discussion/browser/comment.py @@ -6,7 +6,7 @@ from Products.CMFCore.utils import getToolByName from Products.Five.browser import BrowserView from Products.statusmessages.interfaces import IStatusMessage from comments import CommentForm -from plone.app.discussion import PloneAppDiscussionMessageFactory as _ +from plone.app.discussion import _ from plone.registry.interfaces import IRegistry from plone.z3cform.layout import wrap_form from z3c.form import button diff --git a/plone/app/discussion/browser/comments.pt b/plone/app/discussion/browser/comments.pt index 0bceda9..e026469 100644 --- a/plone/app/discussion/browser/comments.pt +++ b/plone/app/discussion/browser/comments.pt @@ -63,7 +63,7 @@ alt reply/author_name" />
-
+ diff --git a/plone/app/discussion/browser/comments.py b/plone/app/discussion/browser/comments.py index 1667184..77214d1 100644 --- a/plone/app/discussion/browser/comments.py +++ b/plone/app/discussion/browser/comments.py @@ -7,7 +7,7 @@ from Products.CMFCore.utils import getToolByName from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from Products.statusmessages.interfaces import IStatusMessage from datetime import datetime -from plone.app.discussion import PloneAppDiscussionMessageFactory as _ +from plone.app.discussion import _ from plone.app.discussion.browser.validator import CaptchaValidator from plone.app.discussion.interfaces import ICaptcha from plone.app.discussion.interfaces import IComment diff --git a/plone/app/discussion/browser/configure.zcml b/plone/app/discussion/browser/configure.zcml index acb6839..54067cf 100644 --- a/plone/app/discussion/browser/configure.zcml +++ b/plone/app/discussion/browser/configure.zcml @@ -2,7 +2,7 @@ xmlns="http://namespaces.zope.org/zope" xmlns:browser="http://namespaces.zope.org/browser" xmlns:zcml="http://namespaces.zope.org/zcml" - i18n_domain="plone.app.discussion"> + i18n_domain="plone"> diff --git a/plone/app/discussion/browser/moderation.pt b/plone/app/discussion/browser/moderation.pt index 81a1fca..39ae1f0 100644 --- a/plone/app/discussion/browser/moderation.pt +++ b/plone/app/discussion/browser/moderation.pt @@ -4,7 +4,7 @@ xmlns:i18n="http://xml.zope.org/namespaces/i18n" lang="en" metal:use-macro="context/main_template/macros/master" - i18n:domain="plone.app.discussion"> + i18n:domain="plone"> @@ -27,7 +27,7 @@
- Warning + Warning Moderation workflow is disabled. You have to + i18n_domain="plone"> diff --git a/plone/app/discussion/contentrules.py b/plone/app/discussion/contentrules.py index 8dc082b..81b832b 100644 --- a/plone/app/discussion/contentrules.py +++ b/plone/app/discussion/contentrules.py @@ -1,6 +1,6 @@ """ Content rules handlers """ -from plone.app.discussion import PloneAppDiscussionMessageFactory as _ +from plone.app.discussion import _ try: diff --git a/plone/app/discussion/interfaces.py b/plone/app/discussion/interfaces.py index 13662f5..ad773a5 100644 --- a/plone/app/discussion/interfaces.py +++ b/plone/app/discussion/interfaces.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- """Interfaces for plone.app.discussion """ -from plone.app.discussion import PloneAppDiscussionMessageFactory as _ +from plone.app.discussion import _ from zope import schema from zope.component.interfaces import IObjectEvent from zope.interface import Interface diff --git a/plone/app/discussion/locales/update.sh b/plone/app/discussion/locales/update.sh deleted file mode 100755 index 2e0c6a0..0000000 --- a/plone/app/discussion/locales/update.sh +++ /dev/null @@ -1,6 +0,0 @@ -domain=plone.app.discussion -i18ndude rebuild-pot --pot $domain.pot --create $domain --merge $domain-manual.pot ../ -i18ndude sync --pot $domain.pot */LC_MESSAGES/$domain.po - -i18ndude rebuild-pot --pot ../i18n/plone.pot --create plone --merge ../i18n/plone-manual.pot ../profiles -i18ndude sync --pot ../i18n/plone.pot ../i18n/plone-*.po diff --git a/plone/app/discussion/notifications.zcml b/plone/app/discussion/notifications.zcml index 253cea5..2a95b7b 100644 --- a/plone/app/discussion/notifications.zcml +++ b/plone/app/discussion/notifications.zcml @@ -1,7 +1,7 @@ + i18n_domain="plone"> + i18n_domain="plone"> diff --git a/plone/app/discussion/subscribers.zcml b/plone/app/discussion/subscribers.zcml index 12a30a5..befc5f3 100644 --- a/plone/app/discussion/subscribers.zcml +++ b/plone/app/discussion/subscribers.zcml @@ -1,7 +1,7 @@ + i18n_domain="plone">