- Timestamp:
- 23 Feb 2012, 10:18:10 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r7685 r7687 45 45 ISIRPObject, ILocalRolesAssignable, IExtFileStore, IPDF, 46 46 IFileStoreNameChooser, IPasswordValidator, IUserAccount, ISIRPUtils) 47 from waeup.sirp.interfaces import MessageFactory as _ 47 48 from waeup.sirp.permissions import get_users_with_local_roles 48 49 from waeup.sirp.students.interfaces import IStudentsUtils … … 648 649 """ 649 650 allowed_transitions = self.wf_info.getManualTransitions() 650 return [dict(name='', title= 'No transition')] +[651 return [dict(name='', title=_('No transition'))] +[ 651 652 dict(name=x, title=y) for x, y in allowed_transitions] 652 653 -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicantdisplaypage.pt
r7669 r7687 1 <h2> ... <span tal:replace="context/ state">Application State</span> ... </h2>1 <h2> ... <span tal:replace="context/translated_state">Application State</span> ... </h2> 2 2 3 3 <div class="workflow"> -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser_templates/applicanteditpage.pt
r7669 r7687 2 2 enctype="multipart/form-data"> 3 3 4 <h2> ... <span tal:replace="context/ state">Application State</span> ... </h2>4 <h2> ... <span tal:replace="context/translated_state">Application State</span> ... </h2> 5 5 6 6 <div class="workflow"> -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/workflow.py
r7686 r7687 19 19 """ 20 20 import grok 21 from zope.component import getUtility 22 from zope.i18n import translate 21 23 from hurry.workflow.workflow import Transition, WorkflowState, NullCondition 22 24 from hurry.workflow.interfaces import IWorkflowState, IWorkflowTransitionEvent 23 25 from waeup.sirp.applicants.interfaces import IApplicantBaseData 24 from waeup.sirp.interfaces import IObjectHistory, ISIRPWorkflowInfo 26 from waeup.sirp.interfaces import IObjectHistory, ISIRPWorkflowInfo, ISIRPUtils 25 27 from waeup.sirp.interfaces import MessageFactory as _ 26 28 from waeup.sirp.workflow import SIRPWorkflow, SIRPWorkflowInfo … … 48 50 Transition( 49 51 transition_id = 'init', 50 title = 'Initialize application',52 title = _('Initialize application'), 51 53 source = None, 52 54 condition = NullCondition, 53 msg = 'Application initialized',55 msg = _('Application initialized'), 54 56 destination = INITIALIZED), 55 57 56 58 Transition( 57 59 transition_id = 'start', 58 title = 'Start application',59 msg = 'Application started',60 title = _('Start application'), 61 msg = _('Application started'), 60 62 source = INITIALIZED, 61 63 destination = STARTED), … … 63 65 Transition( 64 66 transition_id = 'pay', 65 title = 'Pay acceptance fee',66 msg = 'Fee paid',67 title = _('Pay acceptance fee'), 68 msg = _('Fee paid'), 67 69 source = STARTED, 68 70 destination = PAID), … … 70 72 Transition( 71 73 transition_id = 'submit', 72 title = 'Submit application',73 msg = 'Application submitted',74 title = _('Submit application'), 75 msg = _('Application submitted'), 74 76 source = PAID, 75 77 destination = SUBMITTED), … … 77 79 Transition( 78 80 transition_id = 'admit', 79 title = 'Admit applicant',80 msg = 'Applicant admitted',81 title = _('Admit applicant'), 82 msg = _('Applicant admitted'), 81 83 source = SUBMITTED, 82 84 destination = ADMITTED), … … 84 86 Transition( 85 87 transition_id = 'refuse1', 86 title = 'Refuse application',87 msg = 'Application refused',88 title = _('Refuse application'), 89 msg = _('Application refused'), 88 90 source = SUBMITTED, 89 91 destination = NOT_ADMITTED), … … 91 93 Transition( 92 94 transition_id = 'refuse2', 93 title = 'Refuse application',94 msg = 'Application refused',95 title = _('Refuse application'), 96 msg = _('Application refused'), 95 97 source = ADMITTED, 96 98 destination = NOT_ADMITTED), … … 98 100 Transition( 99 101 transition_id = 'create', 100 title = 'Create student record',101 msg = 'Student record created',102 title = _('Create student record'), 103 msg = _('Student record created'), 102 104 source = ADMITTED, 103 105 destination = CREATED), … … 105 107 Transition( 106 108 transition_id = 'reset1', 107 title = 'Reset application to started',108 msg = 'Application reset',109 title = _('Reset application to started'), 110 msg = _('Application reset'), 109 111 source = SUBMITTED, 110 112 destination = STARTED), … … 112 114 Transition( 113 115 transition_id = 'reset2', 114 title = 'Reset application to started',115 msg = 'Application reset',116 title = _('Reset application to started'), 117 msg = _('Application reset'), 116 118 source = ADMITTED, 117 119 destination = STARTED), … … 119 121 Transition( 120 122 transition_id = 'reset3', 121 title = 'Reset application to started',122 msg = 'Application reset',123 title = _('Reset application to started'), 124 msg = _('Application reset'), 123 125 source = NOT_ADMITTED, 124 126 destination = STARTED), … … 126 128 Transition( 127 129 transition_id = 'reset4', 128 title = 'Reset application to started',129 msg = 'Application reset',130 title = _('Reset application to started'), 131 msg = _('Application reset'), 130 132 source = CREATED, 131 133 destination = STARTED), 132 134 Transition( 133 135 transition_id = 'reset5', 134 title = 'Reset application to paid',135 msg = 'Application reset',136 title = _('Reset application to paid'), 137 msg = _('Application reset'), 136 138 source = SUBMITTED, 137 139 destination = PAID), … … 163 165 """Append message to applicant history when transition happened. 164 166 """ 165 msg = '%s' % event.transition.user_data['msg'] 167 msg = event.transition.user_data['msg'] 168 portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE 169 if portal_language != 'en': 170 msg = translate(msg,'waeup.sirp',target_language=portal_language) 166 171 history = IObjectHistory(obj) 167 172 history.addMessage(msg) -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7681 r7687 41 41 ISIRPObject, IUserAccount, IExtFileStore, IPasswordValidator, IContactForm, 42 42 ISIRPUtils, IUniversity) 43 from waeup.sirp.interfaces import MessageFactory as _ 43 44 from waeup.sirp.widgets.datewidget import ( 44 45 FriendlyDateWidget, FriendlyDateDisplayWidget, … … 341 342 """ 342 343 allowed_transitions = self.wf_info.getManualTransitions() 343 return [dict(name='', title= 'No transition')] +[344 return [dict(name='', title=_('No transition'))] +[ 344 345 dict(name=x, title=y) for x, y in allowed_transitions] 345 346
Note: See TracChangeset for help on using the changeset viewer.