Changeset 7741 for main/waeup.sirp/trunk/src/waeup/sirp
- Timestamp:
- 1 Mar 2012, 09:24:27 (13 years ago)
- 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 326 326 id, sys.exc_info()[0], sys.exc_info()[1])) 327 327 if len(deleted): 328 self.flash(_('Successfully removed: %s',328 self.flash(_('Successfully removed: ${a}', 329 329 mapping = {'a':', '.join(deleted)})) 330 330 self.redirect(self.url(self.context, u'@@manage')+'?tab2') … … 746 746 id, sys.exc_info()[0], sys.exc_info()[1])) 747 747 if len(deleted): 748 self.flash(_('Successfully removed: %s',748 self.flash(_('Successfully removed: ${a}', 749 749 mapping = {'a':', '.join(deleted)})) 750 750 ob_class = self.__implemented__.__name__.replace('waeup.sirp.','') -
main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py
r7738 r7741 1184 1184 except: 1185 1185 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]})) 1187 1187 return 1188 1188 if newpath: -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/paymentsmanagepage.pt
r7738 r7741 5 5 <thead> 6 6 <tr> 7 <th i18n:translate=""> </th>7 <th> </th> 8 8 <th i18n:translate="">Payment Id</th> 9 9 <th i18n:translate="">Creation Date</th> -
main/waeup.sirp/trunk/src/waeup/sirp/students/browser_templates/studylevelpage.pt
r7738 r7741 64 64 <div i18n:domain="waeup.sirp" 65 65 tal:condition="python: not len(context.keys())" i18n:translate=""> 66 The re no tickets added yet.66 The're no tickets added yet. 67 67 </div> -
main/waeup.sirp/trunk/src/waeup/sirp/students/utils.py
r7714 r7741 121 121 data_right.append([f_label,f_text]) 122 122 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]) 124 124 table = Table([[table_left, table_right],],style=SLIP_STYLE) 125 125 return table … … 305 305 fm.update() 306 306 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"])) 308 310 # Insert list of scanned documents 309 311 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) 311 315 f_label = Paragraph(f_label, style["Normal"]) 312 316 if viewlet.template.__grok_name__ == 'imagedisplay': -
main/waeup.sirp/trunk/src/waeup/sirp/students/viewlets.py
r7738 r7741 20 20 from zope.component import getUtility 21 21 from zope.interface import Interface 22 from zope.i18n import translate 22 23 from waeup.sirp.interfaces import ( 23 ISIRPObject, IExtFileStore, IFileStoreNameChooser )24 ISIRPObject, IExtFileStore, IFileStoreNameChooser, ISIRPUtils) 24 25 from waeup.sirp.interfaces import MessageFactory as _ 25 26 from waeup.sirp.utils.helpers import string_from_bytes, file_size … … 72 73 def render(self): 73 74 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) 74 79 return u'<li><a href="%s">%s</a></li>' % ( 75 url, self.text)80 url, text) 76 81 77 82 class StudentManageApplicationLink(StudentManageLink): -
main/waeup.sirp/trunk/src/waeup/sirp/utils/utils.py
r7734 r7741 44 44 # which is used for the translation of system messages 45 45 # (e.g. object histories). 46 PORTAL_LANGUAGE = ' en'46 PORTAL_LANGUAGE = 'de' 47 47 48 48 PREFERRED_LANGUAGES_DICT = {
Note: See TracChangeset for help on using the changeset viewer.