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

All Samples(17)  |  Call(14)  |  Derive(0)  |  Import(3)
Factory for creating i18n messages.

src/p/r/Products.CMFCalendar-2.3.0-beta/Products/CMFCalendar/browser/event.py   Products.CMFCalendar(Download)
 
from Products.CMFCalendar.interfaces import IMutableEvent
from Products.CMFCalendar.utils import Message as _
 
class EventTypeVocabulary(object):
    def __call__(self, context):
        context = getattr(context, 'context', context)
        mdtool = getUtility(IMetadataTool)
        items = [ (str(v), unicode(v), _(v))
                  for v in mdtool.listAllowedSubjects(context) ]
 
    title = TextLine(
        title=_(u'Title'),
        required=False,
        missing_value=u'',
        max_length=100)
 
    contact_name = TextLine(
        title=_(u'Contact Name'),
 
    location = TextLine(
        title=_(u'Location'),
        required=False,
        missing_value=u'',

src/p/r/Products.CMFCalendar-2.3.0-beta/Products/CMFCalendar/skins/zpt_calendar/event_edit_form.py   Products.CMFCalendar(Download)
##parameters=change='', change_and_view=''
##
from Products.CMFCalendar.utils import Message as _
from Products.CMFDefault.utils import decode
 
buttons = []
target = context.getActionInfo('object/edit')['url']
buttons.append( {'name': 'change', 'value': _(u'Change')} )
buttons.append( {'name': 'change_and_view', 'value': _(u'Change and View')} )
options['form'] = { 'action': target,

src/p/r/Products.CMFCalendar-2.3.0-beta/Products/CMFCalendar/skins/zpt_calendar/event_edit_control.py   Products.CMFCalendar(Download)
##parameters=title=None, description=None, event_type=None, effectiveDay=None, effectiveMo=None, effectiveYear=None, expirationDay=None, expirationMo=None, expirationYear=None, start_time=None, startAMPM=None, stop_time=None, stopAMPM=None, location=None, contact_name=None, contact_email=None, contact_phone=None, event_url=None, **kw
##
from Products.CMFCalendar.exceptions import ResourceLockedError
from Products.CMFCalendar.utils import Message as _
 
                 start_time, startAMPM, stop_time, stopAMPM, location,
                 contact_name, contact_email, contact_phone, event_url)
    return context.setStatus(True, _(u'Event changed.'))
except ResourceLockedError, errmsg:
    return context.setStatus(False, errmsg)