Ignore:
Timestamp:
29 May 2012, 22:34:04 (13 years ago)
Author:
Henrik Bettermann
Message:

Localize jsaction message.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py

    r8396 r8548  
    3434from zope.site.hooks import getSite
    3535from waeup.kofa.interfaces import IKofaObject, IUserAccount, IKofaUtils
     36from waeup.kofa.interfaces import MessageFactory as _
    3637from waeup.kofa.utils.helpers import to_timezone
    3738from waeup.kofa.browser.interfaces import ITheme
     
    9596class JSAction(Action):
    9697
    97     msg = '\'Are you sure?\''
     98    msg = _('\'Are you sure?\'')
    9899
    99100    def render(self):
     
    103104        if isinstance(label, Message):
    104105            label = translate(self.label, context=self.form.request)
     106        msg = translate(self.msg, context=self.form.request)
    105107        return ('<input type="submit" id="%s" name="%s" value="%s"'
    106108                ' class="btn" onclick="return confirmPost(%s)" />' %
    107                 (self.__name__, self.__name__, escape(label, quote=True), self.msg)
     109                (self.__name__, self.__name__, escape(label, quote=True), msg)
    108110                )
    109111
Note: See TracChangeset for help on using the changeset viewer.