Changeset 7738


Ignore:
Timestamp:
1 Mar 2012, 07:51:32 (13 years ago)
Author:
Henrik Bettermann
Message:

Finalize internationalization of py and pt files. Javascript is still missing.

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  
    118118                        id, sys.exc_info()[0], sys.exc_info()[1]))
    119119        if len(deleted):
    120             self.flash(_('Successfully removed:') + ' %s' % ', '.join(deleted))
     120            self.flash(_('Successfully removed: ${a}',
     121                mapping = {'a':', '.join(deleted)}))
    121122        self.redirect(self.url(self.context, '@@manage'))
    122123        return
     
    325326                        id, sys.exc_info()[0], sys.exc_info()[1]))
    326327        if len(deleted):
    327             self.flash(_('Successfully removed:') + ' %s' % ', '.join(deleted))
     328            self.flash(_('Successfully removed: %s',
     329                mapping = {'a':', '.join(deleted)}))
    328330        self.redirect(self.url(self.context, u'@@manage')+'?tab2')
    329331        return
     
    744746                            id, sys.exc_info()[0], sys.exc_info()[1]))
    745747        if len(deleted):
    746             self.flash(_('Successfully removed:') + ' %s' % ', '.join(deleted))
     748            self.flash(_('Successfully removed: %s',
     749                mapping = {'a':', '.join(deleted)}))
    747750            ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
    748751            self.context.loggerInfo(
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r7714 r7738  
    11801180            not_copied = self.context.setStoragePath(newpath, move=move)
    11811181            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}))
    11831184        except:
    11841185            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]}))
    11861187            return
    11871188        if newpath:
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser.py

    r7735 r7738  
    18741874    ac_prefix = 'PWD'
    18751875    pnav = 0
     1876    set_button = _('Set')
    18761877
    18771878    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">
    22  <td class="fieldname">
    33    <span tal:replace="viewlet/label">FILENAME</span>:
     
    1818                  name python:('upload_%s' % viewlet.input_name)"
    1919               value="Upload" class="btn primary" />
    20       <span i18n:translate="max_file_size">
     20      <span i18n:translate="">
    2121        Max. file size:
    2222      </span>
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/mydatadropdowntabs.pt

    r7459 r7738  
    11<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>
    34  <ul class="dropdown-menu">
    45    <li tal:repeat="target viewlet/targets">
    56      <a tal:attributes="href target/url"
    6          tal:content="target/title">Link Title</a>
     7         tal:content="target/title">LINKTITLE</a>
    78    </li>
    89  </ul>
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/paymentsmanagepage.pt

    r7629 r7738  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       enctype="multipart/form-data">
     2      i18n:domain="waeup.sirp" enctype="multipart/form-data">
    33
    44  <table class="display dataTableManage">
    55    <thead>
    66    <tr>
    7       <th>&nbsp;</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="">&nbsp;</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>
    1515    </tr>
    1616    </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">
    22  <table class="form-table">
    33    <tbody>
    44      <tr>
    5       <td class="fieldname">
     5      <td class="fieldname" i18n:translate="">
    66          Registration Number:
    77      </td>
     
    1212      </tr>
    1313      <tr>
    14         <td class="fieldname">
     14        <td class="fieldname" i18n:translate="">
    1515          Access Code:
    1616        </td>
    1717        <td>
    18           <span tal:replace="view/ac_prefix">PIN Prefix
     18          <span tal:replace="view/ac_prefix">
     19            PINPREFIX
    1920          </span> -
    2021          <input class="span1" name="ac_series" type="text"
     
    2627  </table>
    2728  <input type="submit" name="SUBMIT" class="btn primary"
    28          value="Set" />
     29         tal:attributes="value view/set_button" />
    2930</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="">
    3234    <li> Acquire a password access code (PWD).
    3335    </li>
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studenthistory.pt

    r7464 r7738  
    11<div class="workflow">
    22  <div tal:repeat="msg context/history/messages">
    3     <span tal:replace="msg">message</span><br />
     3    <span tal:replace="msg">MESSAGE</span><br />
    44  </div>
    55</div>
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studycoursemanagepage.pt

    r7737 r7738  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       enctype="multipart/form-data">
     2      i18n:domain="waeup.sirp" enctype="multipart/form-data">
    33
    44  <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>
    711  </ul>
    812
     
    2428
    2529    <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>
    2731      <table class="display dataTableManage">
    2832        <thead>
    2933          <tr>
    30             <th>&nbsp;</th><th>Level Code</th><th>Level Title</th>
     34            <th>&nbsp;</th>
     35            <th i18n:translate="">Level Code</th>
     36            <th i18n:translate="">Level Title</th>
    3137          </tr>
    3238        </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           DEPARTMENT
    35         </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           FACULTY
    46         </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>
    5050</table>
    5151
    52 <h3>Study Levels (Course Lists)</h3>
     52<h3 i18n:domain="waeup.sirp" i18n:translate="">Study Levels (Course Lists)</h3>
    5353
    54 
    55 <table>
     54<table i18n:domain="waeup.sirp">
    5655  <thead>
    5756    <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>
    6059    </tr>
    6160  </thead>
     
    7069
    7170
    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.
    7474</div>
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studyleveladdpage.pt

    r7464 r7738  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       enctype="multipart/form-data">
     2      i18n:domain="waeup.sirp" enctype="multipart/form-data">
    33
    4   <p>Text to explain course registration procedure.</p>
     4  <p i18n:translate="">Text to explain course registration procedure.</p>
    55
    66  <div class="actionButtons" tal:condition="view/availableActions">
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studyleveleditpage.pt

    r7665 r7738  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       enctype="multipart/form-data">
     2      i18n:domain="waeup.sirp" enctype="multipart/form-data">
    33
    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>
    58  <table class="display dataTableManage">
    69  <thead>
    710    <tr>
    811      <th>&nbsp;</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>
    1720    </tr>
    1821  </thead>
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studylevelmanagepage.pt

    r7737 r7738  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       enctype="multipart/form-data">
     2      i18n:domain="waeup.sirp" enctype="multipart/form-data">
    33
    44  <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>
    711  </ul>
    812
     
    2428
    2529    <div id="tab-2" tal:attributes="class view/tab2">
    26       <h3>Course Tickets</h3>
     30      <h3 i18n:translate="">Course Tickets</h3>
    2731      <table class="display dataTableManage">
    2832      <thead>
    2933        <tr>
    3034          <th>&nbsp;</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>
    4145        </tr>
    4246      </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>
    617    <tr>
    7       <td class="fieldname">
    8         <span tal:content="widget/label">label</span>:
     18      <td i18n:translate="">
     19        Total Credits:
    920      </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>
    1423      </td>
    1524    </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>
    2626</table>
    2727
    28 <h3>Course Tickets</h3>
     28<h3 i18n:domain="waeup.sirp" i18n:translate="">Course Tickets</h3>
    2929
    30 <table class="display dataTable">
     30<table class="display dataTable" i18n:domain="waeup.sirp">
    3131  <thead>
    3232    <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>
    4343    </tr>
    4444  </thead>
     
    6262
    6363
    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.
    6667</div>
  • main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py

    r7735 r7738  
    6868
    6969    link = 'index'
    70     text = u'Base Data'
     70    text = _(u'Base Data')
    7171
    7272    def render(self):
     
    7878    grok.order(1)
    7979    link = 'application_slip'
    80     text = u'Application Slip'
     80    text = _(u'Application Slip')
    8181
    8282    def render(self):
     
    9292    grok.order(2)
    9393    link = 'index'
    94     text = u'Base Data'
     94    text = _(u'Base Data')
    9595
    9696class StudentManageClearanceLink(StudentManageLink):
    9797    grok.order(3)
    9898    link = 'view_clearance'
    99     text = u'Clearance Data'
     99    text = _(u'Clearance Data')
    100100
    101101class StudentManagePersonalLink(StudentManageLink):
    102102    grok.order(4)
    103103    link = 'view_personal'
    104     text = u'Personal Data'
     104    text = _(u'Personal Data')
    105105
    106106class StudentManageStudyCourseLink(StudentManageLink):
    107107    grok.order(5)
    108108    link = 'studycourse'
    109     text = u'Study Course'
     109    text = _(u'Study Course')
    110110
    111111class StudentManagePaymentsLink(StudentManageLink):
     
    113113    grok.require('waeup.payStudent')
    114114    link = 'payments'
    115     text = u'Payments'
     115    text = _(u'Payments')
    116116
    117117class StudentManageAccommodationLink(StudentManageLink):
     
    119119    grok.require('waeup.handleAccommodation')
    120120    link = 'accommodation'
    121     text = u'Accommodation'
     121    text = _(u'Accommodation')
    122122
    123123class StudentManageHistoryLink(StudentManageLink):
    124124    grok.order(8)
    125125    link = 'history'
    126     text = u'History'
     126    text = _(u'History')
    127127
    128128
     
    132132    grok.view(StudentsContainerPage)
    133133    grok.require('waeup.manageStudent')
    134     text = 'Manage student section'
     134    text = _('Manage student section')
    135135
    136136class StudentsContainerAddActionButton(AddActionButton):
     
    139139    grok.view(StudentsContainerManagePage)
    140140    grok.require('waeup.manageStudent')
    141     text = 'Add student'
     141    text = _('Add student')
    142142    target = 'addstudent'
    143143
     
    148148    grok.require('waeup.manageStudent')
    149149    icon = 'actionicon_mail.png'
    150     text = 'Send email'
     150    text = _('Send email')
    151151    target = 'contactstudent'
    152152
     
    156156    grok.view(StudentBaseDisplayFormPage)
    157157    grok.require('waeup.manageStudent')
    158     text = 'Manage'
     158    text = _('Manage')
    159159    target = 'manage_base'
    160160
     
    164164    grok.view(StudentClearanceDisplayFormPage)
    165165    grok.require('waeup.manageStudent')
    166     text = 'Manage'
     166    text = _('Manage')
    167167    target = 'edit_clearance'
    168168
     
    172172    grok.view(StudentClearanceDisplayFormPage)
    173173    grok.require('waeup.clearStudent')
    174     text = 'Clear student'
     174    text = _('Clear student')
    175175    target = 'clear'
    176176    icon = 'actionicon_accept.png'
     
    187187    grok.view(StudentClearanceDisplayFormPage)
    188188    grok.require('waeup.clearStudent')
    189     text = 'Reject clearance'
     189    text = _('Reject clearance')
    190190    target = 'reject_clearance'
    191191    icon = 'actionicon_reject.png'
     
    203203    grok.require('waeup.viewStudent')
    204204    icon = 'actionicon_pdf.png'
    205     text = 'Download clearance slip'
     205    text = _('Download clearance slip')
    206206    target = 'clearance.pdf'
    207207
     
    211211    grok.view(StudentPersonalDisplayFormPage)
    212212    grok.require('waeup.viewStudent')
    213     text = 'Edit'
     213    text = _('Edit')
    214214    target = 'edit_personal'
    215215
     
    219219    grok.view(StudyCourseDisplayFormPage)
    220220    grok.require('waeup.manageStudent')
    221     text = 'Manage'
     221    text = _('Manage')
    222222    target = 'manage'
    223223
     
    228228    grok.require('waeup.viewStudent')
    229229    icon = 'actionicon_pdf.png'
    230     text = 'Download course registration slip'
     230    text = _('Download course registration slip')
    231231    target = 'course_registration.pdf'
    232232
     
    236236    grok.view(StudyLevelDisplayFormPage)
    237237    grok.require('waeup.manageStudent')
    238     text = 'Manage'
     238    text = _('Manage')
    239239    target = 'manage'
    240240
     
    244244    grok.view(StudyLevelDisplayFormPage)
    245245    grok.require('waeup.validateStudent')
    246     text = 'Validate courses'
     246    text = _('Validate courses')
    247247    target = 'validate_courses'
    248248    icon = 'actionicon_accept.png'
     
    260260    grok.view(StudyLevelDisplayFormPage)
    261261    grok.require('waeup.validateStudent')
    262     text = 'Reject courses'
     262    text = _('Reject courses')
    263263    target = 'reject_courses'
    264264    icon = 'actionicon_reject.png'
     
    276276    grok.view(CourseTicketDisplayFormPage)
    277277    grok.require('waeup.manageStudent')
    278     text = 'Manage'
     278    text = _('Manage')
    279279    target = 'manage'
    280280
     
    293293    grok.require('waeup.viewStudent')
    294294    icon = 'actionicon_pdf.png'
    295     text = 'Download payment receipt'
     295    text = _('Download payment receipt')
    296296    target = 'payment_receipt.pdf'
    297297
     
    308308    grok.require('waeup.payStudent')
    309309    icon = 'actionicon_call.png'
    310     text = 'Request callback'
     310    text = _('Request callback')
    311311    target = 'callback'
    312312
     
    323323    grok.require('waeup.handleAccommodation')
    324324    icon = 'actionicon_home.png'
    325     text = 'Book accommodation'
     325    text = _('Book accommodation')
    326326    target = 'add'
    327327
     
    332332    grok.require('waeup.handleAccommodation')
    333333    icon = 'actionicon_pdf.png'
    334     text = 'Download bed allocation slip'
     334    text = _('Download bed allocation slip')
    335335    target = 'bed_allocation.pdf'
    336336
     
    341341    grok.require('waeup.manageHostels')
    342342    icon = 'actionicon_reload.png'
    343     text = 'Relocate student'
     343    text = _('Relocate student')
    344344    target = 'relocate'
    345345
     
    349349    grok.view(StudentBaseDisplayFormPage)
    350350    grok.require('waeup.handleStudent')
    351     text = 'Edit base data'
     351    text = _('Edit base data')
    352352    target = 'edit_base'
    353353
     
    358358    grok.require('waeup.handleStudent')
    359359    icon = 'actionicon_key.png'
    360     text = 'Change password'
     360    text = _('Change password')
    361361    target = 'change_password'
    362362
     
    367367    grok.require('waeup.handleStudent')
    368368    icon = 'actionicon_portrait.png'
    369     text = 'Change portrait'
     369    text = _('Change portrait')
    370370    target = 'change_portrait'
    371371
     
    382382    grok.require('waeup.handleStudent')
    383383    icon = 'actionicon_start.gif'
    384     text = 'Start clearance'
     384    text = _('Start clearance')
    385385    target = 'start_clearance'
    386386
     
    396396    grok.view(StudentClearanceDisplayFormPage)
    397397    grok.require('waeup.handleStudent')
    398     text = 'Edit'
     398    text = _('Edit')
    399399    target = 'cedit'
    400400
     
    411411    grok.require('waeup.handleStudent')
    412412    icon = 'actionicon_start.gif'
    413     text = 'Start course registration'
     413    text = _('Start course registration')
    414414    target = 'start_course_registration'
    415415
     
    425425    grok.view(StudyCourseDisplayFormPage)
    426426    grok.require('waeup.handleStudent')
    427     text = 'Add course list'
     427    text = _('Add course list')
    428428    target = 'add'
    429429
     
    443443    grok.view(StudyLevelDisplayFormPage)
    444444    grok.require('waeup.handleStudent')
    445     text = 'Add and remove courses'
     445    text = _('Add and remove courses')
    446446    target = 'edit'
    447447
     
    505505    grok.template('mydatadropdowntabs')
    506506    pnav = 4
    507     tab_title = u'My Data'
     507    tab_title = _(u'My Data')
    508508
    509509    @property
     
    525525        targets += [
    526526            {'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')},
    533533            ]
    534534        return targets
     
    541541    store.deleteFileByContext(context, attr=download_name)
    542542    write_log_message(view, 'deleted: %s' % download_name)
    543     view.flash('%s deleted.' % download_name)
     543    view.flash(_('${a} deleted.', mapping = {'a':download_name}))
    544544    return
    545545
     
    554554    # Check some file requirements first
    555555    if upload.filename.count('.') == 0:
    556         view.flash('File name has no extension.')
     556        view.flash(_('File name has no extension.'))
    557557        return False
    558558    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.'))
    560560        return False
    561561    basename, expected_ext = os.path.splitext(download_name)
     
    564564    if expected_ext:
    565565        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('.','')}))
    568568            return False
    569569    else:
    570570        if not ext.replace('.','') in ALLOWED_FILE_EXTENSIONS:
    571571            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)}))
    574574            return False
    575575        download_name += ext
    576576    size = file_size(upload)
    577577    if size > max_size:
    578         view.flash('Uploaded file is too big.')
     578        view.flash(_('Uploaded file is too big.'))
    579579        return False
    580580    upload.seek(0) # file pointer moved when determining size
     
    583583    store.createFile(file_id, upload)
    584584    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}))
    586586    return True
    587587
     
    601601    grok.order(1)
    602602    grok.require('waeup.viewStudent')
    603     label = u'File'
    604     title = u'Scan'
     603    label = _(u'File')
     604    title = _(u'Scan')
    605605    download_name = u'filename.jpg'
    606606
     
    656656                        self.context, self.view.__name__) + self.tab_redirect)
    657657            else:
    658                 self.view.flash('No local file selected.')
     658                self.view.flash(_('No local file selected.'))
    659659                self.view.redirect(
    660660                    self.view.url(
     
    670670    grok.require('waeup.viewStudent')
    671671    grok.template('imagedisplay')
    672     label = u'Passport Picture'
     672    label = _(u'Passport Picture')
    673673    download_name = u'passport.jpg'
    674674
     
    681681    grok.require('waeup.manageStudent')
    682682    grok.template('imageupload')
    683     label = u'Passport Picture (jpg only)'
     683    label = _(u'Passport Picture (jpg only)')
    684684    mus = 1024 * 50
    685685    download_name = u'passport.jpg'
     
    696696    """
    697697    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')
    700700    download_name = u'birth_certificate'
    701701
     
    707707    """
    708708    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')
    711711    mus = 1024 * 150
    712712    download_name = u'birth_certificate'
     
    717717    """
    718718    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')
    721721    download_name = u'acceptance_letter'
    722722
     
    728728    """
    729729    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')
    732732    mus = 1024 * 150
    733733    download_name = u'acceptance_letter'
Note: See TracChangeset for help on using the changeset viewer.