Changeset 7690 for main/waeup.sirp/trunk


Ignore:
Timestamp:
23 Feb 2012, 15:41:42 (13 years ago)
Author:
Henrik Bettermann
Message:

Do not translate message in event handler bit in addMessage.

Location:
main/waeup.sirp/trunk/src/waeup/sirp
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/workflow.py

    r7689 r7690  
    1919"""
    2020import grok
    21 from zope.component import getUtility
    22 from zope.i18n import translate
    2321from hurry.workflow.workflow import Transition, WorkflowState, NullCondition
    2422from hurry.workflow.interfaces import IWorkflowState, IWorkflowTransitionEvent
     
    165163    """
    166164    msg = event.transition.user_data['msg']
    167     portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
    168     if portal_language != 'en':
    169         msg = translate(msg,'waeup.sirp',target_language=portal_language)
    170165    history = IObjectHistory(obj)
    171166    history.addMessage(msg)
  • main/waeup.sirp/trunk/src/waeup/sirp/objecthistory.py

    r7681 r7690  
    7272        if portal_language != 'en':
    7373            by = translate(_('by'),'waeup.sirp',target_language=portal_language)
     74            msg = translate(msg,'waeup.sirp',target_language=portal_language)
    7475        msg = u'%s - %s %s %s' % (timestamp, msg, by, user)
    7576        msgs.append(msg)
  • main/waeup.sirp/trunk/src/waeup/sirp/students/workflow.py

    r7681 r7690  
    33import grok
    44from zope.component import getUtility
    5 from zope.i18n import translate
    65from hurry.workflow.workflow import Transition, WorkflowState, NullCondition
    76from hurry.workflow.interfaces import IWorkflowState, IWorkflowTransitionEvent
     
    186185
    187186    msg = event.transition.user_data['msg']
    188     portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
    189     if portal_language != 'en':
    190         msg = translate(msg,'waeup.sirp',target_language=portal_language)
    191187    history = IObjectHistory(obj)
    192188    history.addMessage(msg)
Note: See TracChangeset for help on using the changeset viewer.