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

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

src/f/t/ftw.bridge.client-1.0.8/ftw/bridge/client/browser/favorite.py   ftw.bridge.client(Download)
from Products.CMFCore.utils import getToolByName
from Products.Five import BrowserView
from Products.statusmessages.interfaces import IStatusMessage
from ftw.bridge.client import _
from ftw.bridge.client.exceptions import MaintenanceError
        if response is None or response.code != 200:
            IStatusMessage(self.request).addStatusMessage(
                _(u'favorite_creation_failed',
                  default=u'The favorite could not be created.'),
                type='error')
            return False
 
        else:
            IStatusMessage(self.request).addStatusMessage(
                _(u'info_favorite_created',

src/f/t/ftw.bridge.client-1.0.8/ftw/bridge/client/portlets/watcher.py   ftw.bridge.client(Download)
from Acquisition import aq_inner
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from ftw.bridge.client import _
from plone.app.portlets.portlets import base
from plone.memoize.compress import xhtml_compress
    def title(self):
        return _(u'title_watcher_portlet',
                 default='Recently modified')
 
 
    def title(self):
        return _(u'title_watcher_portlet',
                 default='Recently modified')
 
    def render(self):
class AddForm(base.AddForm):
 
    form_fields = form.Fields(IWatcherPortlet)
    label = _(u'title_watcher_portlet',
              default='Recently modified')

src/f/t/ftw.bridge.client-1.0.8/ftw/bridge/client/browser/watcher.py   ftw.bridge.client(Download)
from Products.statusmessages.interfaces import IStatusMessage
from datetime import datetime
from ftw.bridge.client import _
from ftw.bridge.client.exceptions import MaintenanceError
from ftw.bridge.client.interfaces import IBridgeRequest
            if response is None or response.code != 200:
                IStatusMessage(self.request).addStatusMessage(
                    _(u'error_portlet_creation_failed',
                      default=u'The dashboard portlet could not be created.'),
                    type='error')
 
            else:
                IStatusMessage(self.request).addStatusMessage(
                    _(u'info_msg_portlet_created',

src/f/t/ftw.bridge.client-1.0.8/ftw/bridge/client/interfaces.py   ftw.bridge.client(Download)
# pylint: disable=E0211, E0213
# E0211: Method has no argument
# E0213: Method should have "self" as first argument
 
from ftw.bridge.client import _
 
MAINTENANCE_ERROR_MESSAGE = _(
    u'error_msg_maintenance',
    default=u'The target service is currently in maintenace. Try again later.')