Changeset 1673 for trunk/LeMillTool.py


Ignore:
Timestamp:
04/26/07 20:12:24 (12 years ago)
Author:
jukka
Message:

Fixed #1238. Changed the rest of portal_status_messages to addPortalMessage(_(u'message'))

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LeMillTool.py

    r1672 r1673  
    3131from DateTime import DateTime 
    3232import time, re 
     33from Products.LeMill import LeMillMessageFactory as _ 
    3334 
    3435 
     
    224225    def savePiece(self, uid, values): 
    225226        # Edit one piece 
     227        putils= getToolByName(self, 'plone_utils') 
    226228        problem='' 
    227229        piece=self.uid_catalog(UID=uid) 
     
    229231        if values.has_key('title') and values['title']: 
    230232            if not piece.checkTitle(values['title']): 
    231                 problem=self.translate('Title %s is already in use.' % values['title'], domain='lemill') 
     233                msg = _(u"Title ${title} is already in use.", mapping={u'title' : self.title_or_id()}) 
     234                putils.addPortalMessage(msg) 
    232235                del values['title'] 
    233236                 
    234237        piece.edit(**values) 
    235238        piece.at_post_edit_script() 
    236         return problem 
    237239 
    238240    def giveLanguageLink(self, REQUEST, lang, url, param): 
Note: See TracChangeset for help on using the changeset viewer.