Ignore:
Timestamp:
26 Feb 2012, 16:34:10 (13 years ago)
Author:
Henrik Bettermann
Message:

Backup translation work in progress.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/browser
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/batchprocessing.txt

    r7665 r7705  
    113113
    114114    >>> modeselect.getControl(value='create').selected = True
    115     >>> browser.getControl('Proceed to step 3...').click()
     115    >>> browser.getControl('Proceed to step 3').click()
    116116
    117117Step 3: Fix headerlines
     
    127127The submit button is enabled:
    128128
    129     >>> browser.getControl('Perform import...').disabled
     129    >>> browser.getControl('Perform import').disabled
    130130    False
    131131
    132     >>> browser.getControl('Perform import...').click()
     132    >>> browser.getControl('Perform import').click()
    133133
    134134Step 4: See import results
     
    197197    >>> modeselect = browser.getControl(name='mode')
    198198    >>> modeselect.getControl(value='create').selected = True
    199     >>> browser.getControl('Proceed to step 3...').click()
     199    >>> browser.getControl('Proceed to step 3').click()
    200200
    201201Step 3: Fix headerlines
     
    211211The submit button is enabled:
    212212
    213     >>> browser.getControl('Perform import...').disabled
     213    >>> browser.getControl('Perform import').disabled
    214214    False
    215215
    216     >>> browser.getControl('Perform import...').click()
     216    >>> browser.getControl('Perform import').click()
    217217
    218218Step 4: See import results
     
    262262    >>> modeselect = browser.getControl(name='mode')
    263263    >>> modeselect.getControl(value='create').selected = True
    264     >>> browser.getControl('Proceed to step 3...').click()
     264    >>> browser.getControl('Proceed to step 3').click()
    265265
    266266Step 3: Fix headerlines
     
    276276The submit button is enabled:
    277277
    278     >>> browser.getControl('Perform import...').disabled
     278    >>> browser.getControl('Perform import').disabled
    279279    False
    280280
    281     >>> browser.getControl('Perform import...').click()
     281    >>> browser.getControl('Perform import').click()
    282282
    283283Step 4: See import results
     
    328328    >>> modeselect = browser.getControl(name='mode')
    329329    >>> modeselect.getControl(value='create').selected = True
    330     >>> browser.getControl('Proceed to step 3...').click()
     330    >>> browser.getControl('Proceed to step 3').click()
    331331
    332332Step 3: Fix headerlines
     
    342342The submit button is enabled:
    343343
    344     >>> browser.getControl('Perform import...').disabled
     344    >>> browser.getControl('Perform import').disabled
    345345    False
    346346
    347     >>> browser.getControl('Perform import...').click()
     347    >>> browser.getControl('Perform import').click()
    348348
    349349Step 4: See import results
     
    393393    >>> modeselect = browser.getControl(name='mode')
    394394    >>> modeselect.getControl(value='create').selected = True
    395     >>> browser.getControl('Proceed to step 3...').click()
     395    >>> browser.getControl('Proceed to step 3').click()
    396396
    397397Step 3: Fix headerlines
     
    407407The submit button is enabled:
    408408
    409     >>> browser.getControl('Perform import...').disabled
     409    >>> browser.getControl('Perform import').disabled
    410410    False
    411411
    412     >>> browser.getControl('Perform import...').click()
     412    >>> browser.getControl('Perform import').click()
    413413
    414414Step 4: See import results
     
    466466    >>> modeselect = browser.getControl(name='mode')
    467467    >>> modeselect.getControl(value='create').selected = True
    468     >>> browser.getControl('Proceed to step 3...').click()
     468    >>> browser.getControl('Proceed to step 3').click()
    469469
    470470Step 3: Fix headerlines
     
    473473perfom the import:
    474474
    475     >>> browser.getControl('Perform import...').click()
     475    >>> browser.getControl('Perform import').click()
    476476
    477477One line could not be imported:
     
    528528    >>> modeselect = browser.getControl(name='mode')
    529529    >>> modeselect.getControl(value='create').selected = True
    530     >>> browser.getControl('Proceed to step 3...').click()
     530    >>> browser.getControl('Proceed to step 3').click()
    531531
    532532Step 3/4: Fix headerlines and import:
     
    535535perfom the import:
    536536
    537     >>> browser.getControl('Perform import...').click()
     537    >>> browser.getControl('Perform import').click()
    538538
    539539This time everything should work:
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r7703 r7705  
    751751    label = _(u'Upload file')
    752752    pnav = 0
     753    upload_button =_(u'Upload')
     754    cancel_button =_(u'Cancel')
    753755
    754756    def update(self, uploadfile=None, CANCEL=None, SUBMIT=None):
     
    797799    label = _(u'Process CSV file')
    798800    pnav = 0
     801    cancel_button =_(u'Cancel')
    799802
    800803    def getFiles(self):
     
    826829    label = _(u'Process CSV file')
    827830    pnav = 0
     831    cancel_button =_(u'Cancel')
     832    back_button =_(u'Back to step 1')
     833    proceed_button =_(u'Proceed to step 3')
    828834
    829835    filename = None
     
    943949    label = _(u'Process CSV file')
    944950    pnav = 0
     951    cancel_button =_(u'Cancel')
     952    reset_button =_(u'Reset')
     953    update_button =_(u'Set headerfields')
     954    back_button =_(u'Back to step 2')
     955    proceed_button =_(u'Perform import')
    945956
    946957    filename = None
     
    10461057    label = _(u'Process CSV file')
    10471058    pnav = 0
     1059    show_button =_(u'View processing log')
     1060    back_button =_(u'Back to data center')
    10481061
    10491062    filename = None
     
    11011114    label = _(u'Show logfiles')
    11021115    pnav = 0
     1116    back_button = _(u'Back to Data Center')
     1117    show_button = _(u'Show')
    11031118
    11041119    def update(self, show=None, logname=None, back=None):
     
    11431158    label = _('Edit data center settings')
    11441159    pnav = 0
     1160    save_button =_(u'Save')
     1161    reset_button =_(u'Reset')
     1162    cancel_button =_(u'Cancel')
    11451163
    11461164    def update(self, newpath=None, move=False, overwrite=False,
     
    15791597    grok.name('addcourse')
    15801598    grok.require('waeup.manageUniversity')
    1581     label = u'Add course'
     1599    label = _(u'Add course')
    15821600    form_fields = grok.AutoFields(ICourseAdd)
    15831601    pnav = 1
    15841602
    1585     @action('Add course')
     1603    @action(_('Add course'))
    15861604    def addCourse(self, **data):
    15871605        course = createObject(u'waeup.Course')
     
    15951613                # do not use error.msg but render a more detailed message instead
    15961614                # and show links to all certs with same code
    1597                 message = 'A course with same code already exists: '
     1615                message = _('A course with same code already exists: ')
    15981616                message += '<a href="%s">%s</a>' % (
    15991617                    self.url(entry), getattr(entry, '__name__', u'Unnamed'))
     
    16011619            self.redirect(self.url(self.context, u'@@addcourse'))
    16021620            return
    1603         message = u'Course %s successfully created.' % (course.code)
     1621        message = _(u'Course ${a} successfully created.', mapping = {'a':course.code})
    16041622        self.flash(message)
    16051623        self.redirect(self.url(self.context, u'@@manage')+'?tab2')
     
    16161634    grok.name('addcertificate')
    16171635    grok.require('waeup.manageUniversity')
    1618     label = u'Add certificate'
     1636    label = _(u'Add certificate')
    16191637    form_fields = grok.AutoFields(ICertificateAdd)
    16201638    pnav = 1
    16211639
    1622     @action('Add certificate')
     1640    @action(_('Add certificate'))
    16231641    def addCertificate(self, **data):
    16241642        certificate = createObject(u'waeup.Certificate')
     
    16321650                # do not use error.msg but render a more detailed message instead
    16331651                # and show links to all certs with same code
    1634                 message = 'A certificate with same code already exists: '
     1652                message = _('A certificate with same code already exists: ')
    16351653                message += '<a href="%s">%s</a>' % (
    16361654                    self.url(entry), getattr(entry, '__name__', u'Unnamed'))
     
    16381656            self.redirect(self.url(self.context, u'@@addcertificate'))
    16391657            return
    1640         message = u'Certificate %s successfully created.' % (certificate.code)
     1658        message = _(u'Certificate ${a} successfully created.', mapping = {'a':certificate.code})
    16411659        self.flash(message)
    16421660        self.redirect(self.url(self.context, u'@@manage')+'?tab3')
    16431661        return
    16441662
    1645     @action('Cancel', validator=NullValidator)
     1663    @action(_('Cancel'), validator=NullValidator)
    16461664    def cancel(self): #, **data):
    16471665        self.redirect(self.url(self.context))
     
    16701688    grok.name('manage')
    16711689    grok.require('waeup.manageUniversity')
    1672     label = u'Edit course'
     1690    label = _(u'Edit course')
    16731691    pnav = 1
    16741692
    16751693    form_fields = grok.AutoFields(ICourse)
    16761694
    1677     @action('Save', style='primary')
     1695    @action(_('Save'), style='primary')
    16781696    def save(self, **data):
    16791697        self.applyData(self.context, **data)
    1680         self.flash('Form has been saved.')
     1698        self.flash(_('Form has been saved.'))
    16811699        return
    16821700
     
    16871705    #    return
    16881706
    1689     @action('Cancel', validator=NullValidator)
     1707    @action(_('Cancel'), validator=NullValidator)
    16901708    def cancel(self, **data):
    16911709        self.redirect(self.url(self.context))
     
    17201738    grok.require('waeup.manageUniversity')
    17211739    pnav = 1
    1722     label = 'Edit certificate'
     1740    label = _('Edit certificate')
    17231741
    17241742    form_fields = grok.AutoFields(ICertificate)
     
    17261744    pnav = 1
    17271745    grok.template('certificatemanagepage')
    1728     taboneactions = ['Save','Cancel']
    1729     tabtwoactions = ['Add course referrer',
    1730                      'Remove selected course referrers','Cancel']
    1731     tabthreeactions1 = ['Remove selected local roles']
    1732     tabthreeactions2 = ['Add local role']
     1746    taboneactions = [_('Save'),_('Cancel')]
     1747    tabtwoactions = [_('Add course referrer'),
     1748                     _('Remove selected course referrers'),_('Cancel')]
     1749    tabthreeactions1 = [_('Remove selected local roles')]
     1750    tabthreeactions2 = [_('Add local role')]
    17331751
    17341752    @property
    17351753    def label(self):
    1736         return 'Manage certificate'
     1754        return _('Manage certificate')
    17371755
    17381756    def update(self):
     
    17501768    def save(self, **data):
    17511769        self.applyData(self.context, **data)
    1752         self.flash('Form has been saved.')
    1753         return
    1754 
    1755     @jsaction('Remove selected course referrers')
     1770        self.flash(_('Form has been saved.'))
     1771        return
     1772
     1773    @jsaction(_('Remove selected course referrers'))
    17561774    def delCertificateCourses(self, **data):
    17571775        delSubobjects(self, redirect='@@manage', tab='2')
    17581776        return
    17591777
    1760     @action('Add course referrer', validator=NullValidator)
     1778    @action(_('Add course referrer'), validator=NullValidator)
    17611779    def addCertificateCourse(self, **data):
    17621780        self.redirect(self.url(self.context, 'addcertificatecourse'))
    17631781        return
    17641782
    1765     @action('Cancel', validator=NullValidator)
     1783    @action(_('Cancel'), validator=NullValidator)
    17661784    def cancel(self, **data):
    17671785        self.redirect(self.url(self.context))
     
    17821800        return get_users_with_local_roles(self.context)
    17831801
    1784     @action('Add local role', validator=NullValidator)
     1802    @action(_('Add local role'), validator=NullValidator)
    17851803    def addLocalRole(self, **data):
    17861804        return add_local_role(self, 3, **data)
    17871805
    1788     @action('Remove selected local roles')
     1806    @action(_('Remove selected local roles'))
    17891807    def delLocalRoles(self, **data):
    17901808        return del_local_roles(self,3,**data)
     
    17991817    form_fields = grok.AutoFields(ICertificateCourseAdd)
    18001818    pnav = 1
    1801     label = 'Add course referrer'
    1802 
    1803     @action('Add course referrer')
     1819    label = _('Add course referrer')
     1820
     1821    @action(_('Add course referrer'))
    18041822    def addCertcourse(self, **data):
    18051823        try:
    18061824            self.context.addCourseRef(**data)
    18071825        except KeyError:
    1808             self.status = self.flash('The chosen course referrer is already '
    1809                                   'part of this certificate.')
     1826            self.status = self.flash(_('The chosen course referrer is already '
     1827                                  'part of this certificate.'))
    18101828            return
    18111829        self.status = self.flash(
    1812             "Course referrer %s_%s added." % (data['course'].code,data['level']))
     1830            _("Course referrer ${a}_${b} added.",
     1831            mapping = {'a': data['course'].code, 'b': data['level']}))
    18131832        self.redirect(self.url(self.context, u'@@manage')+'?tab2')
    18141833
    1815     @action('Cancel', validator=NullValidator)
     1834    @action(_('Cancel'), validator=NullValidator)
    18161835    def cancel(self, **data):
    18171836        self.redirect(self.url(self.context))
     
    18461865    grok.require('waeup.manageUniversity')
    18471866    form_fields = grok.AutoFields(ICertificateCourse)
    1848     label = 'Edit course referrer'
    1849     pnav = 1
    1850 
    1851     @action('Save and return', style='primary')
     1867    label = _('Edit course referrer')
     1868    pnav = 1
     1869
     1870    @action(_('Save and return'), style='primary')
    18521871    def saveAndReturn(self, **data):
    18531872        parent = self.context.__parent__
     
    18611880            parent.addCourseRef(**data)
    18621881            parent.delCourseRef(data['course'].code, level=old_level)
    1863         self.flash('Form has been saved.')
     1882        self.flash(_('Form has been saved.'))
    18641883        self.redirect(self.url(parent))
    18651884        return
    18661885
    1867     @action('Cancel', validator=NullValidator)
     1886    @action(_('Cancel'), validator=NullValidator)
    18681887    def cancel(self, **data):
    18691888        self.redirect(self.url(self.context))
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatecoursepage.pt

    r7665 r7705  
    1 <table class="form-table">
     1<table i18n:domain="waeup.sirp" class="form-table">
    22  <thead>
    33  </thead>
    44  <tbody>
    55    <tr>
    6       <td>Code:</td>
     6      <td i18n:translate="">Code:</td>
    77      <td tal:content="context/__name__">CODE</td>
    88    </tr> 
    99    <tr>
    10       <td>Course Code:</td>
     10      <td i18n:translate="">Course Code:</td>
    1111      <td tal:content="context/getCourseCode">THE COURSE</td>
    1212    </tr>   
    1313    <tr>
    14       <td>Course Title:</td>
     14      <td i18n:translate="">Course Title:</td>
    1515      <td tal:content="context/course/title">THE TITLE</td>
    1616    </tr>
    1717    <tr>
    18       <td>Provided by:</td>
     18      <td i18n:translate="">Provided by:</td>
    1919      <td>
    2020      <span tal:content="python: context.course.__parent__.__parent__.longtitle()">DEPARTMENT</span>
     
    2424    </tr>   
    2525    <tr>
    26       <td>Level:</td>
     26      <td i18n:translate="">Level:</td>
    2727      <td tal:content="view/leveltitle">LEVEL</td>
    2828    </tr>
    2929    <tr>
    30       <td>Is mandatory course (not elective):</td>
     30      <td i18n:translate="">Is mandatory course (not elective):</td>
    3131      <td tal:content="context/mandatory">MANDATORY</td>
    3232    </tr>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatemanagepage.pt

    r7669 r7705  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       enctype="multipart/form-data">
     2      enctype="multipart/form-data" i18n:domain="waeup.sirp">
    33
    44  <ul class="tabs" data-tabs="tabs">
    5     <li tal:attributes="class view/tab1"><a href="#tab-1"><span>Settings</span></a></li>
    6     <li tal:attributes="class view/tab2"><a href="#tab-2"><span>Course Referrers</span></a></li>
    7     <li tal:attributes="class view/tab3"><a href="#tab-3"><span>Local Roles</span></a></li>
     5    <li tal:attributes="class view/tab1"><a href="#tab-1" i18n:translate="">Settings</a></li>
     6    <li tal:attributes="class view/tab2"><a href="#tab-2" i18n:translate="">Course Referrers</a></li>
     7    <li tal:attributes="class view/tab3"><a href="#tab-3" i18n:translate="">Local Roles</a></li>
    88  </ul>
    99   
     
    4242    </div>
    4343    <div id="tab-2" tal:attributes="class view/tab2">
    44       <h3>Course Referrers</h3>
     44      <h3 i18n:translate="">Course Referrers</h3>
    4545      <table class="display dataTableManage">
    4646        <thead>
    4747          <tr>
    48             <th>&nbsp;</th><th>Level</th><th>Semester</th><th>Referrer</th><th>Course</th><th>Title</th>
    49             <th>Mandatory</th>
     48            <th>&nbsp;</th><th i18n:translate="">Level</th>
     49            <th i18n:translate="">Semester</th><th i18n:translate="">Referrer</th>
     50            <th i18n:translate="">Course</th><th i18n:translate="">Title</th>
     51            <th i18n:translate="">Mandatory</th>
    5052          </tr>
    5153        </thead>
     
    102104            <th>&nbsp;
    103105            </th>
    104             <th>User Id
     106            <th i18n:translate="">User Id
    105107            </th>
    106             <th>Name
     108            <th i18n:translate="">Name
    107109            </th>
    108             <th>Local Role
     110            <th i18n:translate="">Local Role
    109111            </th>
    110112          </tr>
     
    112114        <tbody>
    113115          <tr tal:repeat="entry view/getUsersWithLocalRoles" class="gradeC"> <td>
    114               <input type="checkbox" name="role_id" tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
     116              <input type="checkbox" name="role_id"
     117                tal:attributes="value python: entry['user_name']+'|'+entry['local_role']" /> </td>
    115118            <td tal:content="entry/user_name"> USERNAME </td>
    116119            <td tal:content="entry/user_title"> USERTITLE </td>
     
    121124      <div tal:condition="view/availableActions">
    122125        <span tal:repeat="action view/actions" tal:omit-tag="">
    123           <input tal:condition="python:action.label in view.tabthreeactions1" tal:replace="structure action/render"/>
     126          <input tal:condition="python:action.label in view.tabthreeactions1"
     127            tal:replace="structure action/render"/>
    124128        </span>
    125129      </div><br /><br />
     
    127131        <tr> <td>
    128132            <select id="user" name="user">
    129               <option tal:repeat="user view/getUsers" tal:attributes="value user/name">
     133              <option tal:repeat="user view/getUsers"
     134                tal:attributes="value user/name">
    130135              <span tal:replace="user/val/title">USERTITLE
    131136              </span>
     
    133138            </select> </td> <td>
    134139            <select id="local_role" name="local_role">
    135               <option tal:repeat="localrole view/getLocalRoles" tal:attributes="value localrole/name">
     140              <option tal:repeat="localrole view/getLocalRoles"
     141                tal:attributes="value localrole/name">
    136142              <span tal:replace="localrole/title">LOCALROLETITLE
    137143              </span>
     
    140146            <div tal:condition="view/availableActions">
    141147              <span tal:repeat="action view/actions" tal:omit-tag="">
    142                 <input tal:condition="python:action.label in view.tabthreeactions2" tal:replace="structure action/render"/>
     148                <input tal:condition="python:action.label in view.tabthreeactions2"
     149                  tal:replace="structure action/render"/>
    143150              </span>
    144151            </div> </td>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/certificatepage.pt

    r7669 r7705  
    1818</table>
    1919
    20 <h3><span tal:content="context/__name__">Code</span> Course Referrers</h3>
     20<h3>
     21  <span tal:content="context/__name__">Code</span>
     22  <span i18n:domain="waeup.sirp" i18n:translate="">Course Referrers</span>
     23</h3>
    2124<br />
    22 <table class="display dataTable">
     25<table i18n:domain="waeup.sirp" class="display dataTable">
    2326<thead>
    2427  <tr>
    25     <th>Level</th><th>Semester</th><th>Referrer</th><th>Course</th>
    26     <th>Title</th><th>Mandatory</th>
     28    <th i18n:translate="">Level</th><th i18n:translate="">Semester</th>
     29    <th i18n:translate="">Referrer</th><th i18n:translate="">Course</th>
     30    <th i18n:translate="">Title</th><th i18n:translate="">Mandatory</th>
    2731  </tr>
    2832</thead>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/configurationmanagepage.pt

    r7669 r7705  
    1 <form action="." tal:attributes="action request/URL" method="POST" enctype="multipart/form-data">
     1<form action="." tal:attributes="action request/URL" method="POST"
     2  enctype="multipart/form-data" i18n:domain="waeup.sirp">
    23    <ul class="tabs" data-tabs="tabs">
    34      <li tal:attributes="class view/tab1">
    4       <a href="#tab-1">
    5         <span>Site Settings
    6         </span></a>
     5      <a href="#tab-1" i18n:translate="">Site Settings</a>
    76      </li>
    87      <li tal:attributes="class view/tab2">
    9       <a href="#tab-2">Session Configurations</a>
     8      <a href="#tab-2" i18n:translate="">Session Configurations</a>
    109      </li>
    1110    </ul>
     
    5150            <th>&nbsp;
    5251            </th>
    53             <th>Name
     52            <th i18n:translate="">Name
    5453            </th>
    5554          </tr>
     
    6463      <div tal:condition="view/availableActions">
    6564        <span tal:repeat="action view/actions" tal:omit-tag="">
    66           <input tal:condition="python:action.label in view.tabtwoactions" tal:replace="structure action/render"/>
     65          <input tal:condition="python:action.label in view.tabtwoactions"
     66            tal:replace="structure action/render"/>
    6767        </span>
    6868      </div>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterimport1page.pt

    r7464 r7705  
    1 <h3>Step 1</h3>
    2 <p>
     1<h3 i18n:domain="waeup.sirp" i18n:translate="">Step 1</h3>
     2<p i18n:domain="waeup.sirp" i18n:translate="">
    33  Using batch processing you can mass-create, mass-update, or
    44  mass-remove datasets from the database using CSV files.
    55</p>
    6 <p>
    7   Please select a file for processing from the list below
     6<p i18n:domain="waeup.sirp" i18n:translate="">
     7  Please select a file for processing from the list below.
    88</p>
    9 <form method="POST">
     9<form i18n:domain="waeup.sirp" method="POST">
    1010  <table>
    1111    <thead>
    12       <th /><th>Filename</th><th>Datasets</th><th>Size</th><th>Date</th>
     12      <th />
     13      <th i18n:translate="">Filename</th>
     14      <th i18n:translate="">Datasets</th>
     15      <th i18n:translate="">Size</th>
     16      <th i18n:translate="">Date</th>
    1317    </thead>
    1418    <tbody>
    1519      <tr tal:repeat="file view/getFiles">
    1620        <td>
    17           <button type="submit" name="select" class="btn primary"
     21          <button i18n:translate=""
     22            type="submit" name="select" class="btn primary"
    1823            tal:attributes="value file/name">Select</button>
    1924        </td>
     
    2530    </tbody>
    2631  </table>
    27   <input type="submit" name="cancel" class="btn" value="Cancel" />
     32  <input type="submit" name="cancel" class="btn"
     33      tal:attributes="value view/cancel_button" />
    2834</form>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterimport2page.pt

    r7464 r7705  
    1 <h3>Step 2</h3>
    2 <form method="POST">
     1<h3 i18n:domain="waeup.sirp" i18n:translate="">Step 2</h3>
     2<form i18n:domain="waeup.sirp" method="POST">
    33  <p>
    4     <b>File:</b>
    5     <span tal:content="view/filename">Filename.csv
    6     </span>
    7     <input type="hidden" name="filename"  tal:attributes="value view/filename" />
     4    <b i18n:translate="">File:</b>
     5    <span tal:content="view/filename">Filename.csv</span>
     6    <input type="hidden" name="filename" tal:attributes="value view/filename" />
    87  </p>
    9   <p> Please select a file-processor and a processing-mode from the selections below:
     8  <p i18n:translate="">
     9    Please select a file-processor and a processing-mode from the selections below.
    1010  </p>
    1111  <div>
    1212    <table
    13            tal:define="body view/getPreviewBody;
    14                         headers view/getPreviewHeader;
    15                         fieldnum python: len(headers)">
     13       tal:define="body view/getPreviewBody;
     14                    headers view/getPreviewHeader;
     15                    fieldnum python: len(headers)">
    1616      <thead>
    1717        <tr>
     
    3030    </table>
    3131  </div>
    32   <div> <b>Processor:</b>
     32  <div> <b i18n:translate="">Processor:</b>
    3333    <select name="importer">
    3434      <option tal:repeat="importer view/getImporters"
     
    4141  <p>&nbsp;
    4242  </p>
    43   <div> <b>Mode:</b>
     43  <div> <b i18n:translate="">Mode:</b>
    4444    <input type="radio" name="mode" value="create" checked="checked"
    4545       tal:attributes="checked python: view.mode == 'create' and 'checked' or '';
     
    5757    </p>
    5858  </div>
    59   <input class="btn" type="submit" name="cancel" value="Cancel" />
    60   <input class="btn danger" type="submit" name="back1" value="Back to step 1" />
    61   <input class="btn primary" tal:attributes="disabled python: view.getWarnings() and 'disabled' or ''"
    62     type="submit" name="proceed" value="Proceed to step 3..." />
     59  <input class="btn" type="submit" name="cancel" tal:attributes="value view/cancel_button" />
     60  <input class="btn danger" type="submit" name="back1" tal:attributes="value view/back_button" />
     61  <input class="btn primary"
     62    tal:attributes="disabled python: view.getWarnings() and 'disabled' or ''; value view/proceed_button"
     63    type="submit" name="proceed" />
    6364</form>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterimport3page.pt

    r7464 r7705  
    1 <div class="alert-message success" tal:condition="not: view/getWarnings">
     1<div i18n:domain="waeup.sirp" i18n:translate=""
     2  class="alert-message success" tal:condition="not: view/getWarnings">
    23  Header fields OK
    34</div>
    45
    5 <h3>Step 3</h3>
    6 <form>
    7   <p>
     6<h3 i18n:domain="waeup.sirp" i18n:translate="">Step 3</h3>
     7<form i18n:domain="waeup.sirp">
     8  <p i18n:translate="">
    89    Eventually modify headerfields of import file below.
    910  </p>
    1011  <p>
    11     <b>File:</b>
     12    <b i18n:translate="">File:</b>
    1213    <span tal:content="view/filename">Filename.csv</span>
    1314    <input type="hidden" name="filename"
     
    1516  </p>
    1617  <p>
    17     <b>Processor:</b>
     18    <b i18n:translate="">Processor:</b>
    1819    <span tal:content="view/importer/name">Importer Name</span>
    1920    <input type="hidden" name="importer"
     
    2122  </p>
    2223  <p>
    23     <b>Processing mode: </b>
     24    <b i18n:translate="">Processing mode: </b>
    2425    <span tal:content="view/mode">mode</span>
    2526    <input type="hidden" name="mode"
     
    4142        <tr>
    4243          <th tal:repeat="headerfield headers">
    43             <i>change to:</i>
     44            <i i18n:translate="">change to:</i>
    4445          </th>
    4546        </tr>
     
    6869  </div>
    6970
    70   <input class="btn" type="submit" name="cancel" value="Cancel" />
    71   <input class="btn" type="reset" name="reset" value="Reset" />
    72   <input class="btn" type="submit" name="update" value="Set headerfields" />
     71  <input class="btn" type="submit" name="cancel"
     72    tal:attributes="value view/cancel_button" />
     73  <input class="btn" type="reset" name="reset"
     74    tal:attributes="value view/reset_button" />
     75  <input class="btn" type="submit" name="update"
     76    tal:attributes="value view/update_button" />
    7377  <br /><br />
    74   <input class="btn danger" type="submit" name="back2" value="Back to step 2" />
    75   <input class="btn primary" tal:attributes="disabled python: view.getWarnings() and 'disabled' or ''"
    76    type="submit" name="proceed" value="Perform import..." />
     78  <input class="btn danger" type="submit" name="back2"
     79    tal:attributes="value view/back_button" />
     80  <input class="btn primary"
     81    tal:attributes="disabled python: view.getWarnings() and 'disabled' or ''; value view/proceed_button"
     82    type="submit" name="proceed"/>
    7783</form>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterimport4page.pt

    r7464 r7705  
    1 <h3>Step 4</h3>
    2 <p>
     1<h3 i18n:domain="waeup.sirp" i18n:translate="">Step 4</h3>
     2<p i18n:domain="waeup.sirp" i18n:translate="">
    33  Batch processing finished.
    44</p>
    5 <p>
    6   <b>File:</b> <span tal:content="view/filename">Filename.csv</span>
     5<p i18n:domain="waeup.sirp">
     6  <b i18n:translate="">File:</b> <span tal:content="view/filename">Filename.csv</span>
    77</p>
    8 <p>
    9   <b>Processor:</b>
     8<p i18n:domain="waeup.sirp">
     9  <b i18n:translate="">Processor:</b>
    1010  <span tal:content="view/importer/name">Importer Name</span>
    1111</p>
    12 <p>
    13   <b>Processing mode: </b>
     12<p i18n:domain="waeup.sirp">
     13  <b i18n:translate="">Processing mode: </b>
    1414  <span tal:content="view/mode">mode</span>
    1515</p>
    16 <form method="POST">
    17   <input class="btn primary" type="submit" name="finish" value="Back to data center" />
    18   <input class="btn" type="submit" name="showlog" value="View processing log" />
     16<form method="POST" i18n:domain="waeup.sirp">
     17  <input class="btn primary" type="submit" name="finish"
     18    tal:attributes="value view/back_button" />
     19  <input class="btn" type="submit" name="showlog"
     20    tal:attributes="value view/show_button" />
    1921</form>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterlogspage.pt

    r7464 r7705  
    1 <div tal:define="files view/files">
    2   <p tal:condition="not: files">Currently no log files are available.
     1<div i18n:domain="waeup.sirp" tal:define="files view/files">
     2  <p i18n:translate="" tal:condition="not: files">
     3  Currently no log files are available.
    34  </p>
    45  <table tal:condition="files" class="condensed-table">
     
    78        <th>
    89        </th>
    9         <th>File
     10        <th i18n:translate="">File
    1011        </th>
    11         <th>Date
     12        <th i18n:translate="">Date
    1213        </th>
    13         <th>Size
     14        <th i18n:translate="">Size
    1415        </th>
    1516      </tr>
    1617    </thead>
    1718    <tbody>
    18       <tr tal:repeat="file files" tal:attributes="class python: repeat['file'].odd() and 'odd' or 'even'">
     19      <tr tal:repeat="file files"
     20          tal:attributes="class python: repeat['file'].odd() and 'odd' or 'even'">
    1921        <td class="text-center">
    2022          <form method="POST">
    21             <input type="submit" class="btn primary" name="show" value="Show" />
     23            <input i18n:translate="" type="submit" class="btn primary" name="show"
     24                tal:attributes="value view/show_button" />
    2225            <input type="hidden" name="logname" tal:attributes="value file/name" />
    2326          </form></td>
     
    2932  </table>
    3033  <form method="POST">
    31     <input type="submit" class="btn" name="back" value="Back to Data Center" />
     34    <input i18n:translate="" type="submit" class="btn" name="back"
     35        tal:attributes="value view/back_button"/>
    3236  </form>
    3337</div>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacentermanagepage.pt

    r7464 r7705  
    1 <form method="POST">
     1<form  i18n:domain="waeup.sirp" method="POST">
    22  <div>
    3     Storage path:
     3    <span  i18n:translate="">Storage path:</span>
    44    <input type="text" name="newpath"
    55     tal:attributes="value context/storage" />
    66    <br /><br />
    7     Copy existing data to new storage? &nbsp;&nbsp;
     7    <span  i18n:translate="">
     8    Copy existing data to new storage?
     9    </span>&nbsp;&nbsp;
    810    <input type="checkbox" name="move" checked="checked" />
    911    <br /><br />
    10     Overwrite contents in new location? &nbsp;&nbsp;
     12    <span  i18n:translate="">
     13    Overwrite contents in new location?
     14    </span>&nbsp;&nbsp;
    1115    <input type="checkbox" name="overwrite" checked="no" />
    1216    <br /><br />
    13     <input class="btn primary" type="submit" name="save" value="Save" />
    14     <input class="btn" type="reset" name="reset" value="Reset" />
    15     <input class="btn" type="submit" name="cancel" value="Cancel" />
     17    <input class="btn primary" type="submit" name="save"
     18        tal:attributes="value view/save_button" />
     19    <input class="btn" type="reset" name="reset"
     20        tal:attributes="value view/reset_button" />
     21    <input class="btn" type="submit" name="cancel"
     22        tal:attributes="value view/cancel_button" />
    1623  </div>
    1724</form>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenterpage.pt

    r7465 r7705  
    1 <p>
     1<p  i18n:domain="waeup.sirp" i18n:translate="">
    22The data center helps you to manage portal data. You can upload CSV
    33files here, which will be available for import afterwards.
    44</p>
    55
    6 <p>
    7   <b>Storage path:</b> <span tal:content="context/storage">/foo/bar</span>
     6<p i18n:domain="waeup.sirp">
     7  <b i18n:translate="">Storage path:</b>
     8  <span tal:content="context/storage">/foo/bar</span>
    89</p>
    910
    10 <table>
     11<table i18n:domain="waeup.sirp">
    1112  <thead>
    1213    <tr>
    13       <th>File</th>
    14       <th>Size</th>
    15       <th>Uploaded</th>
     14      <th i18n:translate="">File</th>
     15      <th i18n:translate="">Size</th>
     16      <th i18n:translate="">Uploaded</th>
    1617    </tr>
    1718  </thead>
    1819  <tbody>
    1920    <tr tal:repeat="file context/getFiles">
    20       <td tal:content="file/name">thefilename</td>
     21      <td tal:content="file/name">FILENAME</td>
    2122      <td tal:content="file/size">12 k</td>
    2223      <td tal:content="file/uploaddate">Mar 12, 2008</td>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/datacenteruploadpage.pt

    r7464 r7705  
    33  <br /><br />
    44  <div>
    5     <input class="btn primary" type="submit" name="SUBMIT" value="Upload" />
    6     <input class="btn" type="submit" name="CANCEL" value="Cancel" />
     5    <input class="btn primary" type="submit" name="SUBMIT"
     6        tal:attributes="value view/upload_button" />
     7    <input class="btn" type="submit" name="CANCEL"
     8        tal:attributes="value view/cancel_button"/>
    79  </div>
    810</form>
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/viewlets.py

    r7701 r7705  
    1818import grok
    1919from urllib import urlencode
     20from zope.i18n import translate
    2021from zope.component import getMultiAdapter, queryAdapter, getUtility
    2122from zope.interface import Interface
     
    8586    icon = 'actionicon_modify.png' # File must exist in static/
    8687    target = '@@manage' # link to this viewname.
    87     text = 'Edit' # Text to display on the button
     88    text = _('Edit') # Text to display on the button
    8889
    8990    # We set the template file explicitly (instead of using
     
    154155    icon = 'actionicon_modify.png'
    155156    target = '@@manage'
    156     text = 'Edit'
     157    text = _('Edit')
    157158
    158159class AddActionButton(ActionButton):
     
    164165    icon = 'actionicon_add.png'
    165166    target = 'add'
    166     text = 'Add'
     167    text = _('Add')
    167168   
    168169class RemoveActionButton(ActionButton):
     
    174175    icon = 'actionicon_delete.png'
    175176    target = 'remove'
    176     text = 'Remove'   
     177    text = _('Remove')
    177178
    178179class SearchActionButton(ActionButton):
     
    184185    icon = 'actionicon_search.png'
    185186    target = 'search'
    186     text = 'Search'
     187    text = _('Search')
    187188
    188189
     
    309310    grok.order(2)
    310311    grok.require('waeup.Anonymous')
    311     text = 'Login'
     312    text = _('Login')
    312313    link = 'login'
    313314
     
    347348
    348349    link = 'configuration'
    349     text = u'Portal Configuration'
     350    text = _(u'Portal Configuration')
    350351   
    351352    def render(self):
    352353        url = self.view.url(grok.getSite(), self.link)
     354        text = translate(self.text, context=self.request)
    353355        return u'<li><a href="%s">%s</a></li>' % (
    354                 url, self.text)
     356                url, text)
    355357
    356358class ManageUsersLink(ManageLink):
     
    361363
    362364    link = u'users'
    363     text = u'Portal Users'
     365    text = _(u'Portal Users')
    364366
    365367class ContactActionButton(ManageActionButton):
     
    369371    grok.require('waeup.manageUsers')
    370372    icon = 'actionicon_mail.png'
    371     text = 'Send email'
     373    text = _('Send email')
    372374    target = 'contactuser'
    373375
     
    379381
    380382    link = u'datacenter'
    381     text = u'Data Center'
     383    text = _(u'Data Center')
    382384
    383385class MyPreferences(LeftSidebarLink):
     
    386388    grok.order(7)
    387389    grok.require('waeup.Public')
    388     title = u'My Preferences'
     390    title = _(u'My Preferences')
    389391    icon = ''
    390392
     
    401403    grok.order(8)
    402404    grok.require('waeup.Public')
    403     title = u'My Roles'
     405    title = _(u'My Roles')
    404406    icon = ''
    405407
     
    420422    grok.context(IDataCenter)
    421423    grok.view(DatacenterPage)
    422     text = 'Edit settings'
     424    text = _('Edit settings')
    423425
    424426class ManageFacultiesContainerActionButton(ManageActionButton):
     
    427429    grok.context(IFacultiesContainer)
    428430    grok.view(FacultiesContainerPage)
    429     text = 'Manage academic section'
     431    text = _('Manage academic section')
    430432
    431433class SearchFacultiesContainerActionButton(ManageActionButton):
     
    434436    grok.context(IFacultiesContainer)
    435437    grok.view(FacultiesContainerPage)
    436     text = 'Search academic section'
     438    text = _('Search academic section')
    437439    icon = 'actionicon_search.png'
    438440    target = '@@search'
     
    443445    grok.context(IFaculty)
    444446    grok.view(FacultyPage)
    445     text = 'Manage faculty'
     447    text = _('Manage faculty')
    446448
    447449class ManageDepartmentActionButton(ManageActionButton):
     
    450452    grok.context(IDepartment)
    451453    grok.view(DepartmentPage)
    452     text = 'Manage department'
     454    text = _('Manage department')
    453455
    454456class ShowDepartmentStudentsActionButton(ManageActionButton):
     
    459461    grok.require('waeup.showStudents')
    460462    icon = 'actionicon_student.png'
    461     text = 'Show students'
     463    text = _('Show students')
    462464    target = 'showdepstudents'
    463465
     
    467469    grok.context(ICourse)
    468470    grok.view(CoursePage)
    469     text = 'Edit course'
     471    text = _('Edit course')
    470472   
    471473class ManageCertificateActionButton(ManageActionButton):
     
    474476    grok.context(ICertificate)
    475477    grok.view(CertificatePage)
    476     text = 'Manage certificate'
     478    text = _('Manage certificate')
    477479
    478480class ShowCertificateStudentsActionButton(ManageActionButton):
     
    483485    grok.require('waeup.showStudents')
    484486    icon = 'actionicon_student.png'
    485     text = 'Show students'
     487    text = _('Show students')
    486488    target = 'showcertstudents'
    487489
     
    491493    grok.context(ICertificateCourse)
    492494    grok.view(CertificateCoursePage)
    493     text = 'Edit course referrer'
     495    text = _('Edit course referrer')
    494496
    495497#
     
    501503    grok.context(IUsersContainer)
    502504    grok.view(UsersContainerPage)
    503     text = 'Add user'
    504 
    505 #class AddFacultyActionButton(AddActionButton):
    506 #    grok.context(IFacultiesContainer)
    507 #    grok.view(FacultiesContainerPage)
    508 #    text = 'Add faculty'
    509    
    510 #class AddDepartmentActionButton(AddActionButton):
    511 #    grok.context(IFaculty)
    512 #    grok.view(FacultyPage)
    513 #    text = 'Add department'
    514 
    515 #class AddCertificateActionButton(AddActionButton):
    516 #    grok.context(IDepartment)
    517 #    grok.view(DepartmentPage)
    518 #    grok.order(3)
    519 #    text = 'Add certificate'
    520 #    target = 'addcertificate'
    521    
    522 #class AddCourseActionButton(AddActionButton):
    523 #    grok.context(IDepartment)
    524 #    grok.view(DepartmentPage)
    525 #    grok.order(4)
    526 #    text = 'Add course'
    527 #    target = 'addcourse'
    528 
    529 #class AddCertificateCourseActionButton(AddActionButton):
    530 #    grok.context(ICertificate)
    531 #    grok.view(CertificatePage)
    532 #    grok.order(4)
    533 #    text = 'Add course referrer'
    534 #    target = 'addcertificatecourse'
    535 
    536 #
    537 # Remove actions...
    538 #
    539 
    540 
    541 #class RemoveFacultyActionButton(RemoveActionButton):
    542 #    grok.context(IFacultiesContainer)
    543 #    grok.view(FacultiesContainerPage)
    544 #    text = 'Remove faculty'
    545    
    546 #class RemoveDepartmentActionButton(RemoveActionButton):
    547 #    grok.context(IFaculty)
    548 #    grok.view(FacultyPage)
    549 #    text = 'Remove department'
    550    
     505    text = _('Add user')
    551506
    552507#
     
    561516    icon = 'actionicon_manage.png' # File must exist in static/
    562517    target = '@@show' # link to this viewname.
    563     text = 'Show batch logs' # Text to display on the button
     518    text = _('Show batch logs') # Text to display on the button
    564519
    565520class BrowseDatacenterLogs(BrowseActionButton):
     
    569524    icon = 'documentinfo_templet.png'
    570525    target = '@@logs'
    571     text = 'Show batch logs'
     526    text = _('Show batch logs')
    572527
    573528#
     
    581536    icon = 'actionbox_templet.png'
    582537    target = '@@import1'
    583     text = 'Batch processing'
     538    text = _('Batch processing')
    584539
    585540class UploadCSVButton(ActionButton):
     
    590545    icon = 'go-up-16x16.png'
    591546    target = '@@upload'
    592     text = 'Upload CSV file'
     547    text = _('Upload CSV file')
    593548
    594549#
     
    699654    grok.require('waeup.managePortalConfiguration')
    700655
    701     link_title = 'Portal Configuration'
     656    link_title = _('Portal Configuration')
    702657    def link_target(self):
    703658        return self.view.url(self.view.context, 'configuration')
     
    709664    grok.require('waeup.manageUsers')
    710665
    711     link_title = 'Portal Users'
     666    link_title = _('Portal Users')
    712667    target_viewname = 'users'
    713668   
     
    718673    grok.require('waeup.manageDataCenter')
    719674
    720     link_title = 'Data Center'
     675    link_title = _('Data Center')
    721676    target_viewname = 'datacenter'
    722677
     
    794749
    795750    def render(self):
    796         return u'<div class="text-right"><form method="POST"><input class="text-right" type="submit" value="remove" /></form></div>'
     751        return u'<div class="text-right"><form method="POST">' + \
     752            '<input class="text-right" type="submit" value="remove" />' + \
     753            '</form></div>'
Note: See TracChangeset for help on using the changeset viewer.