Changeset 7741


Ignore:
Timestamp:
1 Mar 2012, 09:24:27 (13 years ago)
Author:
Henrik Bettermann
Message:

Some repairs.

Location:
main/waeup.sirp/trunk/src/waeup/sirp
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py

    r7738 r7741  
    326326                        id, sys.exc_info()[0], sys.exc_info()[1]))
    327327        if len(deleted):
    328             self.flash(_('Successfully removed: %s',
     328            self.flash(_('Successfully removed: ${a}',
    329329                mapping = {'a':', '.join(deleted)}))
    330330        self.redirect(self.url(self.context, u'@@manage')+'?tab2')
     
    746746                            id, sys.exc_info()[0], sys.exc_info()[1]))
    747747        if len(deleted):
    748             self.flash(_('Successfully removed: %s',
     748            self.flash(_('Successfully removed: ${a}',
    749749                mapping = {'a':', '.join(deleted)}))
    750750            ob_class = self.__implemented__.__name__.replace('waeup.sirp.','')
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r7738 r7741  
    11841184        except:
    11851185            self.flash(_('Given storage path cannot be used.'))
    1186             self.flash(_('Error: %s', mapping = {'a':sys.exc_info()[1]}))
     1186            self.flash(_('Error: ${a}', mapping = {'a':sys.exc_info()[1]}))
    11871187            return
    11881188        if newpath:
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/paymentsmanagepage.pt

    r7738 r7741  
    55    <thead>
    66    <tr>
    7       <th i18n:translate="">&nbsp;</th>
     7      <th>&nbsp;</th>
    88      <th i18n:translate="">Payment Id</th>
    99      <th i18n:translate="">Creation Date</th>
  • main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studylevelpage.pt

    r7738 r7741  
    6464<div i18n:domain="waeup.sirp"
    6565  tal:condition="python: not len(context.keys())" i18n:translate="">
    66   There no tickets added yet.
     66  The're no tickets added yet.
    6767</div>
  • main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py

    r7714 r7741  
    121121        data_right.append([f_label,f_text])
    122122    table_left = Table(data_left,style=SLIP_STYLE)
    123     table_right = Table(data_right,style=SLIP_STYLE, colWidths=[4*cm, 10*cm])
     123    table_right = Table(data_right,style=SLIP_STYLE, colWidths=[6*cm, 8*cm])
    124124    table = Table([[table_left, table_right],],style=SLIP_STYLE)
    125125    return table
     
    305305        fm.update()
    306306        if fm.viewlets:
    307             story.append(Paragraph('Scanned Documents', style["Heading3"]))
     307            sc_translation = translate(_('Scanned Documents'), 'waeup.sirp',
     308                target_language=portal_language)
     309            story.append(Paragraph(sc_translation, style["Heading3"]))
    308310            # Insert list of scanned documents
    309311            for viewlet in fm.viewlets:
    310                 f_label = formatted_label(size=12) % viewlet.label
     312                f_label = formatted_label(size=12) % translate(
     313                viewlet.label, 'waeup.sirp',
     314                target_language=portal_language)
    311315                f_label = Paragraph(f_label, style["Normal"])
    312316                if viewlet.template.__grok_name__ == 'imagedisplay':
  • main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py

    r7738 r7741  
    2020from zope.component import getUtility
    2121from zope.interface import Interface
     22from zope.i18n import translate
    2223from waeup.sirp.interfaces import (
    23     ISIRPObject, IExtFileStore, IFileStoreNameChooser)
     24    ISIRPObject, IExtFileStore, IFileStoreNameChooser, ISIRPUtils)
    2425from waeup.sirp.interfaces import MessageFactory as _
    2526from waeup.sirp.utils.helpers import string_from_bytes, file_size
     
    7273    def render(self):
    7374        url = self.view.url(self.context.getStudent(), self.link)
     75        portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
     76        lang = self.request.cookies.get('sirp.language', portal_language)
     77        text = translate(self.text, 'waeup.sirp',
     78            target_language=lang)
    7479        return u'<li><a href="%s">%s</a></li>' % (
    75                 url, self.text)
     80                url, text)
    7681
    7782class StudentManageApplicationLink(StudentManageLink):
  • main/waeup.sirp/trunk/src/waeup/sirp/utils/utils.py

    r7734 r7741  
    4444    # which is used for the translation of system messages
    4545    # (e.g. object histories).
    46     PORTAL_LANGUAGE = 'en'
     46    PORTAL_LANGUAGE = 'de'
    4747
    4848    PREFERRED_LANGUAGES_DICT = {
Note: See TracChangeset for help on using the changeset viewer.