Changeset 7738 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 1 Mar 2012, 07:51:32 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r7714 r7738 118 118 id, sys.exc_info()[0], sys.exc_info()[1])) 119 119 if len(deleted): 120 self.flash(_('Successfully removed:') + ' %s' % ', '.join(deleted)) 120 self.flash(_('Successfully removed: ${a}', 121 mapping = {'a':', '.join(deleted)})) 121 122 self.redirect(self.url(self.context, '@@manage')) 122 123 return … … 325 326 id, sys.exc_info()[0], sys.exc_info()[1])) 326 327 if len(deleted): 327 self.flash(_('Successfully removed:') + ' %s' % ', '.join(deleted)) 328 self.flash(_('Successfully removed: %s', 329 mapping = {'a':', '.join(deleted)})) 328 330 self.redirect(self.url(self.context, u'@@manage')+'?tab2') 329 331 return … … 744 746 id, sys.exc_info()[0], sys.exc_info()[1])) 745 747 if len(deleted): 746 self.flash(_('Successfully removed:') + ' %s' % ', '.join(deleted)) 748 self.flash(_('Successfully removed: %s', 749 mapping = {'a':', '.join(deleted)})) 747 750 ob_class = self.__implemented__.__name__.replace('waeup.sirp.','') 748 751 self.context.loggerInfo( -
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r7714 r7738 1180 1180 not_copied = self.context.setStoragePath(newpath, move=move) 1181 1181 for name in not_copied: 1182 self.flash(_('File already existed (not copied):') + ' %s' % name) 1182 self.flash(_('File already existed (not copied): ${a}', 1183 mapping = {'a':name})) 1183 1184 except: 1184 1185 self.flash(_('Given storage path cannot be used.')) 1185 self.flash(_('Error: ') + '%s' %sys.exc_info()[1])1186 self.flash(_('Error: %s', mapping = {'a':sys.exc_info()[1]})) 1186 1187 return 1187 1188 if newpath: -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py
r7735 r7738 1874 1874 ac_prefix = 'PWD' 1875 1875 pnav = 0 1876 set_button = _('Set') 1876 1877 1877 1878 def update(self, SUBMIT=None): -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/imageupload.pt
r7669 r7738 1 <tr >1 <tr i18n:domain="waeup.sirp"> 2 2 <td class="fieldname"> 3 3 <span tal:replace="viewlet/label">FILENAME</span>: … … 18 18 name python:('upload_%s' % viewlet.input_name)" 19 19 value="Upload" class="btn primary" /> 20 <span i18n:translate=" max_file_size">20 <span i18n:translate=""> 21 21 Max. file size: 22 22 </span> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/mydatadropdowntabs.pt
r7459 r7738 1 1 <li tal:attributes="class viewlet/active" data-dropdown="dropdown" > 2 <a href="#" class="dropdown-toggle" tal:content="viewlet/tab_title">Tab Title</a> 2 <a href="#" class="dropdown-toggle" 3 tal:content="viewlet/tab_title">Tab Title</a> 3 4 <ul class="dropdown-menu"> 4 5 <li tal:repeat="target viewlet/targets"> 5 6 <a tal:attributes="href target/url" 6 tal:content="target/title">L ink Title</a>7 tal:content="target/title">LINKTITLE</a> 7 8 </li> 8 9 </ul> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/paymentsmanagepage.pt
r7629 r7738 1 1 <form action="." tal:attributes="action request/URL" method="POST" 2 enctype="multipart/form-data">2 i18n:domain="waeup.sirp" enctype="multipart/form-data"> 3 3 4 4 <table class="display dataTableManage"> 5 5 <thead> 6 6 <tr> 7 <th > </th>8 <th >Payment Id</th>9 <th >Creation Date</th>10 <th >Payment Date</th>11 <th >Category</th>12 <th >Item</th>13 <th >Session</th>14 <th >State</th>7 <th i18n:translate=""> </th> 8 <th i18n:translate="">Payment Id</th> 9 <th i18n:translate="">Creation Date</th> 10 <th i18n:translate="">Payment Date</th> 11 <th i18n:translate="">Category</th> 12 <th i18n:translate="">Item</th> 13 <th i18n:translate="">Session</th> 14 <th i18n:translate="">State</th> 15 15 </tr> 16 16 </thead> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/setpassword.pt
r7554 r7738 1 <form method="POST">1 <form i18n:domain="waeup.sirp" method="POST"> 2 2 <table class="form-table"> 3 3 <tbody> 4 4 <tr> 5 <td class="fieldname" >5 <td class="fieldname" i18n:translate=""> 6 6 Registration Number: 7 7 </td> … … 12 12 </tr> 13 13 <tr> 14 <td class="fieldname" >14 <td class="fieldname" i18n:translate=""> 15 15 Access Code: 16 16 </td> 17 17 <td> 18 <span tal:replace="view/ac_prefix">PIN Prefix 18 <span tal:replace="view/ac_prefix"> 19 PINPREFIX 19 20 </span> - 20 21 <input class="span1" name="ac_series" type="text" … … 26 27 </table> 27 28 <input type="submit" name="SUBMIT" class="btn primary" 28 value="Set" />29 tal:attributes="value view/set_button" /> 29 30 </form> 30 <div><h3>Instructions:</h3> 31 <ul class="list"> 31 <div i18n:domain="waeup.sirp" > 32 <h3 i18n:translate="">Instructions:</h3> 33 <ul class="list" i18n:translate=""> 32 34 <li> Acquire a password access code (PWD). 33 35 </li> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studenthistory.pt
r7464 r7738 1 1 <div class="workflow"> 2 2 <div tal:repeat="msg context/history/messages"> 3 <span tal:replace="msg"> message</span><br />3 <span tal:replace="msg">MESSAGE</span><br /> 4 4 </div> 5 5 </div> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studycoursemanagepage.pt
r7737 r7738 1 1 <form action="." tal:attributes="action request/URL" method="POST" 2 enctype="multipart/form-data">2 i18n:domain="waeup.sirp" enctype="multipart/form-data"> 3 3 4 4 <ul class="tabs" data-tabs="tabs"> 5 <li tal:attributes="class view/tab1"><a href="#tab-1"><span>Study Course Data</span></a></li> 6 <li tal:attributes="class view/tab2"><a href="#tab-2"><span>Study Levels</span></a></li> 5 <li tal:attributes="class view/tab1"><a href="#tab-1"> 6 <span i18n:translate="">Study Course Data</span></a> 7 </li> 8 <li tal:attributes="class view/tab2"><a href="#tab-2"> 9 <span i18n:translate="">Study Levels</span></a> 10 </li> 7 11 </ul> 8 12 … … 24 28 25 29 <div id="tab-2" tal:attributes="class view/tab2"> 26 <h3 >Study Levels (Course Lists)</h3>30 <h3 i18n:translate="">Study Levels (Course Lists)</h3> 27 31 <table class="display dataTableManage"> 28 32 <thead> 29 33 <tr> 30 <th> </th><th>Level Code</th><th>Level Title</th> 34 <th> </th> 35 <th i18n:translate="">Level Code</th> 36 <th i18n:translate="">Level Title</th> 31 37 </tr> 32 38 </thead> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studycoursepage.pt
r7669 r7738 1 <table class="form-table" >2 <thead>3 </thead>4 <tbody>5 <tal:block repeat="widget view/widgets">6 <tr>7 <td class="filedname">8 <span tal:content="widget/label">label</span>:9 </td>10 <td tal:on-error="default">11 <div class="widget" tal:content="structure widget">12 <input type="text" />13 </div>14 </td>15 </tr>16 </tal:block>17 <tr>18 <td>19 Study Mode:20 </td>21 <td class="field">22 <div class="widget" tal:content="view/current_mode">23 <input type="text" />24 </div>25 </td>26 </tr>27 <tr tal:condition="python: view.department is not None">28 <td>29 Department:30 </td>31 <td class="field">32 <a tal:attributes="href python: view.url(view.department)" class="widget"33 tal:content="view/department/longtitle">34 DEPARTMENT35 </a>36 </td>37 </tr>38 <tr tal:condition="python: view.faculty is not None">39 <td>40 Faculty:41 </td>42 <td class="field">43 <a tal:attributes="href python: view.url(view.faculty)" class="widget"44 tal:content="view/faculty/longtitle">45 FACULTY46 </a>47 </td>48 </tr>49 </tbody>1 <table class="form-table" i18n:domain="waeup.sirp"> 2 <thead> 3 </thead> 4 <tbody> 5 <tal:block repeat="widget view/widgets"> 6 <tr> 7 <td class="filedname"> 8 <span tal:content="widget/label">label</span>: 9 </td> 10 <td tal:on-error="default"> 11 <div class="widget" tal:content="structure widget"> 12 <input type="text" /> 13 </div> 14 </td> 15 </tr> 16 </tal:block> 17 <tr> 18 <td i18n:translate=""> 19 Study Mode: 20 </td> 21 <td class="field"> 22 <div class="widget" tal:content="view/current_mode"> 23 <input type="text" /> 24 </div> 25 </td> 26 </tr> 27 <tr tal:condition="python: view.department is not None"> 28 <td i18n:translate=""> 29 Department: 30 </td> 31 <td class="field"> 32 <a tal:attributes="href python: view.url(view.department)" class="widget" 33 tal:content="view/department/longtitle"> 34 DEPARTMENT 35 </a> 36 </td> 37 </tr> 38 <tr tal:condition="python: view.faculty is not None"> 39 <td i18n:translate=""> 40 Faculty: 41 </td> 42 <td class="field"> 43 <a tal:attributes="href python: view.url(view.faculty)" class="widget" 44 tal:content="view/faculty/longtitle"> 45 FACULTY 46 </a> 47 </td> 48 </tr> 49 </tbody> 50 50 </table> 51 51 52 <h3 >Study Levels (Course Lists)</h3>52 <h3 i18n:domain="waeup.sirp" i18n:translate="">Study Levels (Course Lists)</h3> 53 53 54 55 <table> 54 <table i18n:domain="waeup.sirp"> 56 55 <thead> 57 56 <tr> 58 <th >Level Code</th>59 <th >Level Title</th>57 <th i18n:translate="">Level Code</th> 58 <th i18n:translate="">Level Title</th> 60 59 </tr> 61 60 </thead> … … 70 69 71 70 72 <div tal:condition="python: not len(context.keys())"> 73 There are no levels registered yet. 71 <div tal:condition="python: not len(context.keys())" 72 i18n:domain="waeup.sirp" i18n:translate=""> 73 There are no levels registered yet. 74 74 </div> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studyleveladdpage.pt
r7464 r7738 1 1 <form action="." tal:attributes="action request/URL" method="POST" 2 enctype="multipart/form-data">2 i18n:domain="waeup.sirp" enctype="multipart/form-data"> 3 3 4 <p >Text to explain course registration procedure.</p>4 <p i18n:translate="">Text to explain course registration procedure.</p> 5 5 6 6 <div class="actionButtons" tal:condition="view/availableActions"> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studyleveleditpage.pt
r7665 r7738 1 1 <form action="." tal:attributes="action request/URL" method="POST" 2 enctype="multipart/form-data">2 i18n:domain="waeup.sirp" enctype="multipart/form-data"> 3 3 4 <h3>Course Tickets (Total Credits: <span tal:replace="view/total_credits">TOTAL</span>)</h3> 4 <h3 i18n:translate=""> 5 Course Tickets 6 (Total Credits: <span tal:replace="view/total_credits">TOTAL</span>) 7 </h3> 5 8 <table class="display dataTableManage"> 6 9 <thead> 7 10 <tr> 8 11 <th> </th> 9 <th >Sem.</th>10 <th >Code</th>11 <th >Title</th>12 <th >Department</th>13 <th >Faculty</th>14 <th >Credits</th>15 <th >Score</th>16 <th >CO</th>12 <th i18n:translate="">Sem.</th> 13 <th i18n:translate="">Code</th> 14 <th i18n:translate="">Title</th> 15 <th i18n:translate="">Department</th> 16 <th i18n:translate="">Faculty</th> 17 <th i18n:translate="">Credits</th> 18 <th i18n:translate="">Score</th> 19 <th i18n:translate="">CO</th> 17 20 </tr> 18 21 </thead> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studylevelmanagepage.pt
r7737 r7738 1 1 <form action="." tal:attributes="action request/URL" method="POST" 2 enctype="multipart/form-data">2 i18n:domain="waeup.sirp" enctype="multipart/form-data"> 3 3 4 4 <ul class="tabs" data-tabs="tabs"> 5 <li tal:attributes="class view/tab1"><a href="#tab-1"><span>Study Level Data</span></a></li> 6 <li tal:attributes="class view/tab2"><a href="#tab-2"><span>Course Tickets</span></a></li> 5 <li tal:attributes="class view/tab1"><a href="#tab-1"> 6 <span i18n:translate="">Study Level Data</span></a> 7 </li> 8 <li tal:attributes="class view/tab2"><a href="#tab-2"> 9 <span i18n:translate="">Course Tickets</span> 10 </a></li> 7 11 </ul> 8 12 … … 24 28 25 29 <div id="tab-2" tal:attributes="class view/tab2"> 26 <h3 >Course Tickets</h3>30 <h3 i18n:translate="">Course Tickets</h3> 27 31 <table class="display dataTableManage"> 28 32 <thead> 29 33 <tr> 30 34 <th> </th> 31 <th >Sem.</th>32 <th >Code</th>33 <th >Title</th>34 <th >Dept.</th>35 <th >Fact.</th>36 <th >Cred.</th>37 <th >Mand.</th>38 <th >Score</th>39 <th >CO</th>40 <th >Auto</th>35 <th i18n:translate="">Sem.</th> 36 <th i18n:translate="">Code</th> 37 <th i18n:translate="">Title</th> 38 <th i18n:translate="">Dept.</th> 39 <th i18n:translate="">Fact.</th> 40 <th i18n:translate="">Cred.</th> 41 <th i18n:translate="">Mand.</th> 42 <th i18n:translate="">Score</th> 43 <th i18n:translate="">CO</th> 44 <th i18n:translate="">Auto</th> 41 45 </tr> 42 46 </thead> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studylevelpage.pt
r7669 r7738 1 <table class="form-table"> 2 <thead> 3 </thead> 4 <tbody> 5 <tal:block repeat="widget view/widgets"> 1 <table class="form-table" i18n:domain="waeup.sirp"> 2 <thead> 3 </thead> 4 <tbody> 5 <tal:block repeat="widget view/widgets"> 6 <tr> 7 <td class="fieldname"> 8 <span tal:content="widget/label">label</span>: 9 </td> 10 <td tal:on-error="default"> 11 <div class="widget" tal:content="structure widget"> 12 <input type="text" /> 13 </div> 14 </td> 15 </tr> 16 </tal:block> 6 17 <tr> 7 <td class="fieldname">8 <span tal:content="widget/label">label</span>:18 <td i18n:translate=""> 19 Total Credits: 9 20 </td> 10 <td tal:on-error="default"> 11 <div class="widget" tal:content="structure widget"> 12 <input type="text" /> 13 </div> 21 <td> 22 <span tal:replace="view/total_credits">TOTAL</span> 14 23 </td> 15 24 </tr> 16 </tal:block> 17 <tr> 18 <td> 19 Total Credits: 20 </td> 21 <td> 22 <span tal:replace="view/total_credits">TOTAL</span> 23 </td> 24 </tr> 25 </tbody> 25 </tbody> 26 26 </table> 27 27 28 <h3 >Course Tickets</h3>28 <h3 i18n:domain="waeup.sirp" i18n:translate="">Course Tickets</h3> 29 29 30 <table class="display dataTable" >30 <table class="display dataTable" i18n:domain="waeup.sirp"> 31 31 <thead> 32 32 <tr> 33 <th >Sem.</th>34 <th >Code</th>35 <th >Title</th>36 <th >Dept.</th>37 <th >Fact.</th>38 <th >Cred.</th>39 <th >Mand.</th>40 <th >Score</th>41 <th >CO</th>42 <th >Auto</th>33 <th i18n:translate="">Sem.</th> 34 <th i18n:translate="">Code</th> 35 <th i18n:translate="">Title</th> 36 <th i18n:translate="">Dept.</th> 37 <th i18n:translate="">Fact.</th> 38 <th i18n:translate="">Cred.</th> 39 <th i18n:translate="">Mand.</th> 40 <th i18n:translate="">Score</th> 41 <th i18n:translate="">CO</th> 42 <th i18n:translate="">Auto</th> 43 43 </tr> 44 44 </thead> … … 62 62 63 63 64 <div tal:condition="python: not len(context.keys())"> 65 There no tickets added yet. 64 <div i18n:domain="waeup.sirp" 65 tal:condition="python: not len(context.keys())" i18n:translate=""> 66 There no tickets added yet. 66 67 </div> -
main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py
r7735 r7738 68 68 69 69 link = 'index' 70 text = u'Base Data'70 text = _(u'Base Data') 71 71 72 72 def render(self): … … 78 78 grok.order(1) 79 79 link = 'application_slip' 80 text = u'Application Slip'80 text = _(u'Application Slip') 81 81 82 82 def render(self): … … 92 92 grok.order(2) 93 93 link = 'index' 94 text = u'Base Data'94 text = _(u'Base Data') 95 95 96 96 class StudentManageClearanceLink(StudentManageLink): 97 97 grok.order(3) 98 98 link = 'view_clearance' 99 text = u'Clearance Data'99 text = _(u'Clearance Data') 100 100 101 101 class StudentManagePersonalLink(StudentManageLink): 102 102 grok.order(4) 103 103 link = 'view_personal' 104 text = u'Personal Data'104 text = _(u'Personal Data') 105 105 106 106 class StudentManageStudyCourseLink(StudentManageLink): 107 107 grok.order(5) 108 108 link = 'studycourse' 109 text = u'Study Course'109 text = _(u'Study Course') 110 110 111 111 class StudentManagePaymentsLink(StudentManageLink): … … 113 113 grok.require('waeup.payStudent') 114 114 link = 'payments' 115 text = u'Payments'115 text = _(u'Payments') 116 116 117 117 class StudentManageAccommodationLink(StudentManageLink): … … 119 119 grok.require('waeup.handleAccommodation') 120 120 link = 'accommodation' 121 text = u'Accommodation'121 text = _(u'Accommodation') 122 122 123 123 class StudentManageHistoryLink(StudentManageLink): 124 124 grok.order(8) 125 125 link = 'history' 126 text = u'History'126 text = _(u'History') 127 127 128 128 … … 132 132 grok.view(StudentsContainerPage) 133 133 grok.require('waeup.manageStudent') 134 text = 'Manage student section'134 text = _('Manage student section') 135 135 136 136 class StudentsContainerAddActionButton(AddActionButton): … … 139 139 grok.view(StudentsContainerManagePage) 140 140 grok.require('waeup.manageStudent') 141 text = 'Add student'141 text = _('Add student') 142 142 target = 'addstudent' 143 143 … … 148 148 grok.require('waeup.manageStudent') 149 149 icon = 'actionicon_mail.png' 150 text = 'Send email'150 text = _('Send email') 151 151 target = 'contactstudent' 152 152 … … 156 156 grok.view(StudentBaseDisplayFormPage) 157 157 grok.require('waeup.manageStudent') 158 text = 'Manage'158 text = _('Manage') 159 159 target = 'manage_base' 160 160 … … 164 164 grok.view(StudentClearanceDisplayFormPage) 165 165 grok.require('waeup.manageStudent') 166 text = 'Manage'166 text = _('Manage') 167 167 target = 'edit_clearance' 168 168 … … 172 172 grok.view(StudentClearanceDisplayFormPage) 173 173 grok.require('waeup.clearStudent') 174 text = 'Clear student'174 text = _('Clear student') 175 175 target = 'clear' 176 176 icon = 'actionicon_accept.png' … … 187 187 grok.view(StudentClearanceDisplayFormPage) 188 188 grok.require('waeup.clearStudent') 189 text = 'Reject clearance'189 text = _('Reject clearance') 190 190 target = 'reject_clearance' 191 191 icon = 'actionicon_reject.png' … … 203 203 grok.require('waeup.viewStudent') 204 204 icon = 'actionicon_pdf.png' 205 text = 'Download clearance slip'205 text = _('Download clearance slip') 206 206 target = 'clearance.pdf' 207 207 … … 211 211 grok.view(StudentPersonalDisplayFormPage) 212 212 grok.require('waeup.viewStudent') 213 text = 'Edit'213 text = _('Edit') 214 214 target = 'edit_personal' 215 215 … … 219 219 grok.view(StudyCourseDisplayFormPage) 220 220 grok.require('waeup.manageStudent') 221 text = 'Manage'221 text = _('Manage') 222 222 target = 'manage' 223 223 … … 228 228 grok.require('waeup.viewStudent') 229 229 icon = 'actionicon_pdf.png' 230 text = 'Download course registration slip'230 text = _('Download course registration slip') 231 231 target = 'course_registration.pdf' 232 232 … … 236 236 grok.view(StudyLevelDisplayFormPage) 237 237 grok.require('waeup.manageStudent') 238 text = 'Manage'238 text = _('Manage') 239 239 target = 'manage' 240 240 … … 244 244 grok.view(StudyLevelDisplayFormPage) 245 245 grok.require('waeup.validateStudent') 246 text = 'Validate courses'246 text = _('Validate courses') 247 247 target = 'validate_courses' 248 248 icon = 'actionicon_accept.png' … … 260 260 grok.view(StudyLevelDisplayFormPage) 261 261 grok.require('waeup.validateStudent') 262 text = 'Reject courses'262 text = _('Reject courses') 263 263 target = 'reject_courses' 264 264 icon = 'actionicon_reject.png' … … 276 276 grok.view(CourseTicketDisplayFormPage) 277 277 grok.require('waeup.manageStudent') 278 text = 'Manage'278 text = _('Manage') 279 279 target = 'manage' 280 280 … … 293 293 grok.require('waeup.viewStudent') 294 294 icon = 'actionicon_pdf.png' 295 text = 'Download payment receipt'295 text = _('Download payment receipt') 296 296 target = 'payment_receipt.pdf' 297 297 … … 308 308 grok.require('waeup.payStudent') 309 309 icon = 'actionicon_call.png' 310 text = 'Request callback'310 text = _('Request callback') 311 311 target = 'callback' 312 312 … … 323 323 grok.require('waeup.handleAccommodation') 324 324 icon = 'actionicon_home.png' 325 text = 'Book accommodation'325 text = _('Book accommodation') 326 326 target = 'add' 327 327 … … 332 332 grok.require('waeup.handleAccommodation') 333 333 icon = 'actionicon_pdf.png' 334 text = 'Download bed allocation slip'334 text = _('Download bed allocation slip') 335 335 target = 'bed_allocation.pdf' 336 336 … … 341 341 grok.require('waeup.manageHostels') 342 342 icon = 'actionicon_reload.png' 343 text = 'Relocate student'343 text = _('Relocate student') 344 344 target = 'relocate' 345 345 … … 349 349 grok.view(StudentBaseDisplayFormPage) 350 350 grok.require('waeup.handleStudent') 351 text = 'Edit base data'351 text = _('Edit base data') 352 352 target = 'edit_base' 353 353 … … 358 358 grok.require('waeup.handleStudent') 359 359 icon = 'actionicon_key.png' 360 text = 'Change password'360 text = _('Change password') 361 361 target = 'change_password' 362 362 … … 367 367 grok.require('waeup.handleStudent') 368 368 icon = 'actionicon_portrait.png' 369 text = 'Change portrait'369 text = _('Change portrait') 370 370 target = 'change_portrait' 371 371 … … 382 382 grok.require('waeup.handleStudent') 383 383 icon = 'actionicon_start.gif' 384 text = 'Start clearance'384 text = _('Start clearance') 385 385 target = 'start_clearance' 386 386 … … 396 396 grok.view(StudentClearanceDisplayFormPage) 397 397 grok.require('waeup.handleStudent') 398 text = 'Edit'398 text = _('Edit') 399 399 target = 'cedit' 400 400 … … 411 411 grok.require('waeup.handleStudent') 412 412 icon = 'actionicon_start.gif' 413 text = 'Start course registration'413 text = _('Start course registration') 414 414 target = 'start_course_registration' 415 415 … … 425 425 grok.view(StudyCourseDisplayFormPage) 426 426 grok.require('waeup.handleStudent') 427 text = 'Add course list'427 text = _('Add course list') 428 428 target = 'add' 429 429 … … 443 443 grok.view(StudyLevelDisplayFormPage) 444 444 grok.require('waeup.handleStudent') 445 text = 'Add and remove courses'445 text = _('Add and remove courses') 446 446 target = 'edit' 447 447 … … 505 505 grok.template('mydatadropdowntabs') 506 506 pnav = 4 507 tab_title = u'My Data'507 tab_title = _(u'My Data') 508 508 509 509 @property … … 525 525 targets += [ 526 526 {'url':student_url, 'title':'Base Data'}, 527 {'url':student_url + '/view_clearance', 'title': 'Clearance Data'},528 {'url':student_url + '/view_personal', 'title': 'Personal Data'},529 {'url':student_url + '/studycourse', 'title': 'Study Course'},530 {'url':student_url + '/payments', 'title': 'Payments'},531 {'url':student_url + '/accommodation', 'title': 'Accommodation Data'},532 {'url':student_url + '/history', 'title': 'History'},527 {'url':student_url + '/view_clearance', 'title':_('Clearance Data')}, 528 {'url':student_url + '/view_personal', 'title':_('Personal Data')}, 529 {'url':student_url + '/studycourse', 'title':_('Study Course')}, 530 {'url':student_url + '/payments', 'title':_('Payments')}, 531 {'url':student_url + '/accommodation', 'title':_('Accommodation Data')}, 532 {'url':student_url + '/history', 'title':_('History')}, 533 533 ] 534 534 return targets … … 541 541 store.deleteFileByContext(context, attr=download_name) 542 542 write_log_message(view, 'deleted: %s' % download_name) 543 view.flash( '%s deleted.' % download_name)543 view.flash(_('${a} deleted.', mapping = {'a':download_name})) 544 544 return 545 545 … … 554 554 # Check some file requirements first 555 555 if upload.filename.count('.') == 0: 556 view.flash( 'File name has no extension.')556 view.flash(_('File name has no extension.')) 557 557 return False 558 558 if upload.filename.count('.') > 1: 559 view.flash( 'File name contains more than one dot.')559 view.flash(_('File name contains more than one dot.')) 560 560 return False 561 561 basename, expected_ext = os.path.splitext(download_name) … … 564 564 if expected_ext: 565 565 if ext != expected_ext: 566 view.flash( '%s file extension expected.' %567 expected_ext.replace('.',''))566 view.flash(_('${a} file extension expected.', 567 mapping = {'a':expected_ext.replace('.','')})) 568 568 return False 569 569 else: 570 570 if not ext.replace('.','') in ALLOWED_FILE_EXTENSIONS: 571 571 view.flash( 572 'Only the following extension are allowed: %s' %573 ', '.join(ALLOWED_FILE_EXTENSIONS))572 _('Only the following extension are allowed: ${a}', 573 mapping = {'a':', '.join(ALLOWED_FILE_EXTENSIONS)})) 574 574 return False 575 575 download_name += ext 576 576 size = file_size(upload) 577 577 if size > max_size: 578 view.flash( 'Uploaded file is too big.')578 view.flash(_('Uploaded file is too big.')) 579 579 return False 580 580 upload.seek(0) # file pointer moved when determining size … … 583 583 store.createFile(file_id, upload) 584 584 write_log_message(view, 'uploaded: %s (%s)' % (download_name,upload.filename)) 585 view.flash( 'File %s uploaded.' % download_name)585 view.flash(_('File ${a} uploaded.', mapping = {'a':download_name})) 586 586 return True 587 587 … … 601 601 grok.order(1) 602 602 grok.require('waeup.viewStudent') 603 label = u'File'604 title = u'Scan'603 label = _(u'File') 604 title = _(u'Scan') 605 605 download_name = u'filename.jpg' 606 606 … … 656 656 self.context, self.view.__name__) + self.tab_redirect) 657 657 else: 658 self.view.flash( 'No local file selected.')658 self.view.flash(_('No local file selected.')) 659 659 self.view.redirect( 660 660 self.view.url( … … 670 670 grok.require('waeup.viewStudent') 671 671 grok.template('imagedisplay') 672 label = u'Passport Picture'672 label = _(u'Passport Picture') 673 673 download_name = u'passport.jpg' 674 674 … … 681 681 grok.require('waeup.manageStudent') 682 682 grok.template('imageupload') 683 label = u'Passport Picture (jpg only)'683 label = _(u'Passport Picture (jpg only)') 684 684 mus = 1024 * 50 685 685 download_name = u'passport.jpg' … … 696 696 """ 697 697 grok.order(1) 698 label = u'Birth Certificate'699 title = u'Birth Certificate Scan'698 label = _(u'Birth Certificate') 699 title = _(u'Birth Certificate Scan') 700 700 download_name = u'birth_certificate' 701 701 … … 707 707 """ 708 708 grok.order(1) 709 label = u'Birth Certificate'710 title = u'Birth Certificate Scan'709 label = _(u'Birth Certificate') 710 title = _(u'Birth Certificate Scan') 711 711 mus = 1024 * 150 712 712 download_name = u'birth_certificate' … … 717 717 """ 718 718 grok.order(1) 719 label = u'Acceptance Letter'720 title = u'Acceptance Letter Scan'719 label = _(u'Acceptance Letter') 720 title = _(u'Acceptance Letter Scan') 721 721 download_name = u'acceptance_letter' 722 722 … … 728 728 """ 729 729 grok.order(2) 730 label = u'Acceptance Letter'731 title = u'Acceptance Letter Scan'730 label = _(u'Acceptance Letter') 731 title = _(u'Acceptance Letter Scan') 732 732 mus = 1024 * 150 733 733 download_name = u'acceptance_letter'
Note: See TracChangeset for help on using the changeset viewer.