Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(11)  |  Call(7)  |  Derive(0)  |  Import(4)
Factory for creating i18n messages.

src/f/t/ftw.notification.base-1.2.4/ftw/notification/base/events/handlers.py   ftw.notification.base(Download)
from DateTime import DateTime
from ftw.notification.base import notification_base_factory as _
from ftw.notification.base.events.events import NotificationEvent
from ftw.notification.base.interfaces import INotifier
from Products.CMFCore.utils import getToolByName
 
    if event.action is None:
        action = _(u"label_send_notification", default=u"Send Notification")
    else:
        action = event.action
    else:
        IStatusMessage(object_.REQUEST).addStatusMessage(
            _(u'statusmessage_no_recipients',
              default=u"You have to select at least one recipient"),
            type='error')

src/f/t/ftw.notification.base-1.2.4/ftw/notification/base/browser/views.py   ftw.notification.base(Download)
from ftw.notification.base import notification_base_factory as _
from ftw.notification.base.events.handlers import object_edited
from ftw.table.interfaces import ITableGenerator
from Products.CMFCore.utils import getToolByName
from Products.CMFPlone.utils import safe_unicode
             'transform': checkbox_cc_helper},
            {'column': 'name',
             'column_title': _(u'label_name', default='Name'),
             'transform': name_helper})
 
             'transform': checkbox_cc_group_helper},
            {'column': 'name',
             'column_title': _(u'label_name', default='Name'),
             'transform': groupname_helper})
 

src/f/t/ftw.notification.email-2.0.7/ftw/notification/email/events/handlers.py   ftw.notification.email(Download)
from DateTime import DateTime
from ftw.journal.events.events import JournalEntryEvent
from ftw.notification.base import notification_base_factory as _
from ftw.notification.base.interfaces import INotifier
from Products.CMFCore.utils import getToolByName
 
    if event.action is None:
        action = _(u"label_send_notification", default=u"Send Notification")
    else:
        action = event.action

src/f/t/ftw.notification.email-2.0.7/ftw/notification/email/notifier.py   ftw.notification.email(Download)
from ftw.notification.base import notification_base_factory as _nb
from ftw.notification.base.notifier import BaseNotifier
from ftw.notification.email.interfaces import (
    IEMailRepresentation, ISubjectCreator, IAttachmentCreator)
from Products.CMFCore.utils import getToolByName
                    email.as_string(), to_addr, email['From'], subject)
                IStatusMessage(object_.REQUEST).addStatusMessage(
                        _nb('statusmessage_notification_sent'), type='info')
            except (ConflictError, Retry):
                raise
                logger.error(exs.read())
                IStatusMessage(object_.REQUEST).addStatusMessage(
                    _nb('statusmessage_notification_not_sent'), type='error')