Changeset 7959 for main/waeup.kofa/trunk
- Timestamp:
- 22 Mar 2012, 15:51:23 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/objecthistory.py
r7819 r7959 69 69 user = user.title 70 70 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 71 by = 'by' 72 if portal_language != 'en': 73 by = translate(_('by'),'waeup.kofa',target_language=portal_language) 74 msg = translate(msg,'waeup.kofa',target_language=portal_language) 71 by = translate(_('by'),'waeup.kofa',target_language=portal_language) 72 msg = translate(msg,'waeup.kofa',target_language=portal_language) 75 73 msg = u'%s - %s %s %s' % (timestamp, msg, by, user) 76 74 msgs.append(msg) -
main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py
r7952 r7959 35 35 IBatchProcessor, FatalCSVError, IObjectConverter, IUserAccount, 36 36 IObjectHistory, VALIDATED) 37 from waeup.kofa.interfaces import MessageFactory as _ 37 38 from waeup.kofa.students.interfaces import ( 38 39 IStudent, IStudentStudyCourse, … … 130 131 return None 131 132 132 133 133 def addEntry(self, obj, row, site): 134 134 parent = self.getParent(row, site) 135 135 parent.addStudent(obj) 136 # We don't need to log this because is already done by the workflow 137 # transition even handler. 136 # We have to log this if reg_state is provided. If not, 137 # logging is done by the event handler handle_student_added 138 if row.has_key('reg_state'): 139 parent.logger.info('%s - Student record created' % obj.student_id) 138 140 history = IObjectHistory(obj) 139 history.addMessage( 'Student record imported')141 history.addMessage(_('Student record created')) 140 142 return 141 143 … … 161 163 elif key == 'reg_state': 162 164 IWorkflowState(obj).setState(value) 163 msg = "State '%s' set" % value165 msg = _("State '${a}' set", mapping = {'a':value}) 164 166 history = IObjectHistory(obj) 165 167 history.addMessage(msg)
Note: See TracChangeset for help on using the changeset viewer.