Ignore:
Timestamp:
Mar 9, 2010 6:29:06 PM (14 years ago)
Author:
liebster
Message:

Changed definition plone message factory for using i18ndude rebuild

Location:
quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins/captchas_discussion/discussion_reply.cpy

    r817 r1863  
    1111from Products.PythonScripts.standard import url_quote_plus 
    1212from Products.CMFCore.utils import getToolByName 
    13 from Products.CMFPlone import PloneMessageFactory as _ 
     13from Products.CMFPlone import PloneMessageFactory as pmf 
    1414mtool = getToolByName(context, 'portal_membership') 
    1515dtool = getToolByName(context, 'portal_discussion') 
     
    6464                                                reply.absolute_url())) 
    6565 
    66 context.plone_utils.addPortalMessage(_(u'Comment added.')) 
     66context.plone_utils.addPortalMessage(pmf(u'Comment added.')) 
    6767target = '%s#%s' % (view, anchor) 
    6868return req.RESPONSE.redirect(target) 
  • quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins/captchas_join_form/register.cpy

    r817 r1863  
    1010## 
    1111 
    12 from Products.CMFPlone import PloneMessageFactory as _ 
     12from Products.CMFPlone import PloneMessageFactory as pmf 
    1313from ZODB.POSException import ConflictError 
    1414 
     
    3030    portal_registration.addMember(username, password, properties=REQUEST, REQUEST=context.REQUEST) 
    3131except AttributeError: 
    32     state.setError('username', _(u'The login name you selected is already in use or is not valid. Please choose another.')) 
    33     context.plone_utils.addPortalMessage(_(u'Please correct the indicated errors.'), 'error') 
     32    state.setError('username', pmf(u'The login name you selected is already in use or is not valid. Please choose another.')) 
     33    context.plone_utils.addPortalMessage(pmf(u'Please correct the indicated errors.'), 'error') 
    3434    return state.set(status='failure') 
    3535 
     
    4949        if portal.validate_email: 
    5050            context.acl_users.userFolderDelUsers([username,], REQUEST=context.REQUEST) 
    51             msg = _(u'status_fatal_password_mail', 
     51            msg = pmf(u'status_fatal_password_mail', 
    5252                    default=u'Failed to create your account: we were unable to send your password to your email address: ${address}', 
    5353                    mapping={u'address' : str(err)}) 
     
    5555            return state.set(status='failure') 
    5656        else: 
    57             msg = _(u'status_nonfatal_password_mail', 
     57            msg = pmf(u'status_nonfatal_password_mail', 
    5858                    default=u'You account has been created, but we were unable to send your password to your email address: ${address}', 
    5959                    mapping={u'address' : str(err)}) 
     
    6363 
    6464if came_from_prefs: 
    65     context.plone_utils.addPortalMessage(_(u'User added.')) 
     65    context.plone_utils.addPortalMessage(pmf(u'User added.')) 
    6666    state.set(status='prefs') 
    6767 
  • quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins/captchas_sendto_form/sendto.cpy

    r817 r1863  
    1414from Products.CMFPlone.PloneTool import AllowSendto 
    1515from Products.CMFCore.utils import getToolByName 
    16 from Products.CMFPlone import PloneMessageFactory as _ 
     16from Products.CMFPlone import PloneMessageFactory as pmf 
    1717from ZODB.POSException import ConflictError 
    1818 
     
    2323 
    2424if not mtool.checkPermission(AllowSendto, context): 
    25     context.plone_utils.addPortalMessage(_(u'You are not allowed to send this link.'), 'error') 
     25    context.plone_utils.addPortalMessage(pmf(u'You are not allowed to send this link.'), 'error') 
    2626    return state.set(status='failure') 
    2727 
     
    3434        show = True 
    3535if not show: 
    36     context.plone_utils.addPortalMessage(_(u'You are not allowed to send this link.'), 'error') 
     36    context.plone_utils.addPortalMessage(pmf(u'You are not allowed to send this link.'), 'error') 
    3737    return state.set(status='failure') 
    3838 
     
    5757except: # TODO To many things could possibly go wrong. So we catch all. 
    5858    exception = context.plone_utils.exceptionString() 
    59     message = _(u'Unable to send mail: ${exception}', 
     59    message = pmf(u'Unable to send mail: ${exception}', 
    6060                mapping={u'exception' : exception}) 
    6161    context.plone_utils.addPortalMessage(message, 'error') 
     
    6565transaction_note(tmsg) 
    6666 
    67 context.plone_utils.addPortalMessage(_(u'Mail sent.')) 
     67context.plone_utils.addPortalMessage(pmf(u'Mail sent.')) 
    6868return state 
  • quintagroup.plonecaptchas/trunk/quintagroup/plonecaptchas/skins/plone_captchas/prefs_captchas_setup.cpy

    r849 r1863  
    1010## 
    1111from Products.CMFCore.utils import getToolByName 
    12 from Products.CMFPlone import PloneMessageFactory as _ 
     12from Products.CMFPlone import PloneMessageFactory as pmf 
    1313 
    1414import string 
     
    5252captcha_props.manage_changeProperties(**kw) 
    5353 
    54 context.plone_utils.addPortalMessage(_(u'Changes saved.')) 
     54context.plone_utils.addPortalMessage(pmf(u'Changes saved.')) 
    5555return state 
Note: See TracChangeset for help on using the changeset viewer.