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
This commit is contained in:
Gil Forcada 2015-11-05 00:26:49 +01:00
parent 24aadbdb72
commit 0713bcd8bc
16 changed files with 16 additions and 23 deletions

View File

@ -143,7 +143,7 @@ plone.app.discussion.browser.comments.pt.
You can now add code to show the website attribute to the documentByLine:: You can now add code to show the website attribute to the documentByLine::
<div class="documentByLine" i18n:domain="plone.app.discussion"> <div class="documentByLine" i18n:domain="plone">
... ...
<div class="commentWebsite" <div class="commentWebsite"
tal:condition="reply/website|nothing"> tal:condition="reply/website|nothing">

View File

@ -2,4 +2,4 @@
from zope.i18nmessageid import MessageFactory from zope.i18nmessageid import MessageFactory
PloneAppDiscussionMessageFactory = MessageFactory('plone.app.discussion') _ = MessageFactory('plone')

View File

@ -2,7 +2,7 @@
xmlns="http://namespaces.zope.org/zope" xmlns="http://namespaces.zope.org/zope"
xmlns:meta="http://namespaces.zope.org/meta" xmlns:meta="http://namespaces.zope.org/meta"
xmlns:zcml="http://namespaces.zope.org/zcml" xmlns:zcml="http://namespaces.zope.org/zcml"
i18n_domain="plone.app.discussion"> i18n_domain="plone">
<!-- Captcha comment form extender --> <!-- Captcha comment form extender -->
<configure zcml:condition="have plone.app.discussion-captcha"> <configure zcml:condition="have plone.app.discussion-captcha">

View File

@ -6,7 +6,7 @@ from Products.CMFCore.utils import getToolByName
from Products.Five.browser import BrowserView from Products.Five.browser import BrowserView
from Products.statusmessages.interfaces import IStatusMessage from Products.statusmessages.interfaces import IStatusMessage
from comments import CommentForm from comments import CommentForm
from plone.app.discussion import PloneAppDiscussionMessageFactory as _ from plone.app.discussion import _
from plone.registry.interfaces import IRegistry from plone.registry.interfaces import IRegistry
from plone.z3cform.layout import wrap_form from plone.z3cform.layout import wrap_form
from z3c.form import button from z3c.form import button

View File

@ -63,7 +63,7 @@
alt reply/author_name" /> alt reply/author_name" />
</div> </div>
<div class="documentByLine" i18n:domain="plone.app.discussion"> <div class="documentByLine">
<tal:name> <tal:name>
<a href="" <a href=""
tal:condition="has_author_link" tal:condition="has_author_link"
@ -170,7 +170,6 @@
<div tal:condition="python: has_replies and not isDiscussionAllowed" <div tal:condition="python: has_replies and not isDiscussionAllowed"
class="discreet" class="discreet"
i18n:domain="plone.app.discussion"
i18n:translate="label_commenting_disabled"> i18n:translate="label_commenting_disabled">
Commenting has been disabled. Commenting has been disabled.
</div> </div>

View File

@ -7,7 +7,7 @@ from Products.CMFCore.utils import getToolByName
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from Products.statusmessages.interfaces import IStatusMessage from Products.statusmessages.interfaces import IStatusMessage
from datetime import datetime 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.browser.validator import CaptchaValidator
from plone.app.discussion.interfaces import ICaptcha from plone.app.discussion.interfaces import ICaptcha
from plone.app.discussion.interfaces import IComment from plone.app.discussion.interfaces import IComment

View File

@ -2,7 +2,7 @@
xmlns="http://namespaces.zope.org/zope" xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser" xmlns:browser="http://namespaces.zope.org/browser"
xmlns:zcml="http://namespaces.zope.org/zcml" xmlns:zcml="http://namespaces.zope.org/zcml"
i18n_domain="plone.app.discussion"> i18n_domain="plone">
<include package="plone.app.registry" /> <include package="plone.app.registry" />

View File

@ -4,7 +4,7 @@
xmlns:i18n="http://xml.zope.org/namespaces/i18n" xmlns:i18n="http://xml.zope.org/namespaces/i18n"
lang="en" lang="en"
metal:use-macro="context/main_template/macros/master" metal:use-macro="context/main_template/macros/master"
i18n:domain="plone.app.discussion"> i18n:domain="plone">
<body> <body>
<metal:main fill-slot="main"> <metal:main fill-slot="main">
@ -27,7 +27,7 @@
<div class="portalMessage warning" <div class="portalMessage warning"
tal:condition="not: view/moderation_enabled"> tal:condition="not: view/moderation_enabled">
<strong i18n:domain="plone" i18n:translate="">Warning</strong> <strong i18n:translate="">Warning</strong>
<span tal:omit-tag="" i18n:translate="message_moderation_disabled"> <span tal:omit-tag="" i18n:translate="message_moderation_disabled">
Moderation workflow is disabled. You have to Moderation workflow is disabled. You have to
<a i18n:name="enable_comment_workflow" <a i18n:name="enable_comment_workflow"

View File

@ -18,7 +18,7 @@ from OFS.owner import Owned
from OFS.role import RoleManager from OFS.role import RoleManager
from OFS.Traversable import Traversable from OFS.Traversable import Traversable
from persistent import Persistent from persistent import Persistent
from plone.app.discussion import PloneAppDiscussionMessageFactory as _ from plone.app.discussion import _
from plone.app.discussion.events import CommentAddedEvent from plone.app.discussion.events import CommentAddedEvent
from plone.app.discussion.events import CommentRemovedEvent from plone.app.discussion.events import CommentRemovedEvent
from plone.app.discussion.events import ReplyAddedEvent from plone.app.discussion.events import ReplyAddedEvent

View File

@ -5,7 +5,7 @@
xmlns:monkey="http://namespaces.plone.org/monkey" xmlns:monkey="http://namespaces.plone.org/monkey"
xmlns:zcml="http://namespaces.zope.org/zcml" xmlns:zcml="http://namespaces.zope.org/zcml"
xmlns:five="http://namespaces.zope.org/five" xmlns:five="http://namespaces.zope.org/five"
i18n_domain="plone.app.discussion"> i18n_domain="plone">
<five:registerPackage package="." /> <five:registerPackage package="." />

View File

@ -1,6 +1,6 @@
""" Content rules handlers """ Content rules handlers
""" """
from plone.app.discussion import PloneAppDiscussionMessageFactory as _ from plone.app.discussion import _
try: try:

View File

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""Interfaces for plone.app.discussion """Interfaces for plone.app.discussion
""" """
from plone.app.discussion import PloneAppDiscussionMessageFactory as _ from plone.app.discussion import _
from zope import schema from zope import schema
from zope.component.interfaces import IObjectEvent from zope.component.interfaces import IObjectEvent
from zope.interface import Interface from zope.interface import Interface

View File

@ -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

View File

@ -1,7 +1,7 @@
<configure <configure
xmlns="http://namespaces.zope.org/zope" xmlns="http://namespaces.zope.org/zope"
xmlns:zcml="http://namespaces.zope.org/zcml" xmlns:zcml="http://namespaces.zope.org/zcml"
i18n_domain="plone.app.discussion"> i18n_domain="plone">
<subscriber <subscriber
for="plone.app.discussion.interfaces.IComment for="plone.app.discussion.interfaces.IComment

View File

@ -1,6 +1,6 @@
<configure <configure
xmlns="http://namespaces.zope.org/zope" xmlns="http://namespaces.zope.org/zope"
i18n_domain="plone.app.discussion"> i18n_domain="plone">
<!-- custom permissions are defined here --> <!-- custom permissions are defined here -->

View File

@ -1,7 +1,7 @@
<configure <configure
xmlns="http://namespaces.zope.org/zope" xmlns="http://namespaces.zope.org/zope"
xmlns:zcml="http://namespaces.zope.org/zcml" xmlns:zcml="http://namespaces.zope.org/zcml"
i18n_domain="plone.app.discussion"> i18n_domain="plone">
<subscriber <subscriber
for="plone.app.discussion.interfaces.IComment for="plone.app.discussion.interfaces.IComment