Changeset 8141
- Timestamp:
- 13 Apr 2012, 10:00:27 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/locales/de/LC_MESSAGES/zope.po
r8024 r8141 2 2 msgstr "" 3 3 "Project-Id-Version: WAeUP.KOFA\n" 4 "PO-Revision-Date: 2012-04- 03 09:28+0100\n"4 "PO-Revision-Date: 2012-04-13 10:21+0100\n" 5 5 "Last-Translator: Henrik Bettermann <henrik@waeup.org>\n" 6 6 "Language-Team: WAeUP Germany <henrik@waeup.org>\n" … … 49 49 msgstr "--" 50 50 51 #: src/zope/app/form/browser/boolwidgets.py:121 52 msgid "True" 53 msgstr "ja" 54 55 #: src/zope/app/form/browser/boolwidgets.py:122 56 msgid "False" 57 msgstr "nein" 58 -
main/waeup.kofa/trunk/src/waeup/kofa/locales/en/LC_MESSAGES/zope.po
r8024 r8141 2 2 msgstr "" 3 3 "Project-Id-Version: WAeUP.KOFA\n" 4 "PO-Revision-Date: 2012-04- 03 08:19+0100\n"4 "PO-Revision-Date: 2012-04-13 10:18+0100\n" 5 5 "Last-Translator: Henrik Bettermann <henrik@waeup.org>\n" 6 6 "Language-Team: WAeUP Germany <henrik@waeup.org>\n" … … 49 49 msgstr "--" 50 50 51 #: src/zope/app/form/browser/boolwidgets.py:121 52 msgid "True" 53 msgstr "yes" 54 55 #: src/zope/app/form/browser/boolwidgets.py:122 56 msgid "False" 57 msgstr "no" 58 -
main/waeup.kofa/trunk/src/waeup/kofa/locales/zope.pot
r8024 r8141 47 47 msgid "sequence-value-is-empty" 48 48 msgstr "" 49 50 #: src/zope/app/form/browser/boolwidgets.py:121 51 msgid "True" 52 msgstr "" 53 54 #: src/zope/app/form/browser/boolwidgets.py:122 55 msgid "False" 56 msgstr "" -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r8120 r8141 710 710 711 711 @property 712 def translated_values(self): 713 lang = self.request.cookies.get('kofa.language') 714 for value in self.context.values(): 715 import pdb; pdb.set_trace() 716 value_dict = value.__dict__ 717 value_dict['mandatory'] = translate(str(value.mandatory), 'zope', 718 target_language=lang) 719 value_dict['carry_over'] = translate(str(value.carry_over), 'zope', 720 target_language=lang) 721 value_dict['automatic'] = translate(str(value.automatic), 'zope', 722 target_language=lang) 723 yield value_dict 724 725 @property 712 726 def label(self): 713 727 # Here we know that the cookie has been set … … 753 767 level_title = translate(self.context.level_title, 'waeup.kofa', 754 768 target_language=lang) 755 return translate(_('Course Registration Slip 769 return translate(_('Course Registration Slip'), 756 770 'waeup.kofa', target_language=portal_language) \ 757 771 + ' %s' % level_title … … 780 794 (Cred, 'credits', 1.5), 781 795 (Mand, 'mandatory', 1.5), 782 (Score, 'score', 1.5),('Auto', 'automatic', 1.5) 796 (Score, 'score', 1.5), 797 #('Auto', 'automatic', 1.5) 783 798 ], 784 799 tabledata=tabledata) … … 910 925 label = _('Add course ticket') 911 926 form_fields = grok.AutoFields(ICourseTicketAdd).omit( 912 ' grade', 'score', 'automatic', 'carry_over')927 'score', 'automatic', 'carry_over') 913 928 pnav = 4 914 929 … … 918 933 course = data['course'] 919 934 ticket.automatic = False 935 ticket.carry_over = False 920 936 ticket.code = course.code 921 937 ticket.title = course.title … … 1849 1865 grok.require('waeup.handleStudent') 1850 1866 form_fields = grok.AutoFields(ICourseTicketAdd).omit( 1851 ' grade', 'score', 'mandatory', 'automatic', 'carry_over')1867 'score', 'mandatory', 'automatic', 'carry_over') 1852 1868 1853 1869 def update(self): -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studylevelpage.pt
r7876 r8141 44 44 </thead> 45 45 <tbody> 46 <tr tal:repeat="value context/values" class="gradeC">46 <tr tal:repeat="value view/translated_values" class="gradeC"> 47 47 <td tal:content="value/semester">SEMESTER</td> 48 48 <td> <a tal:attributes="href value/__name__"> … … 54 54 <td tal:content="value/credits">CREDITS</td> 55 55 <td tal:content="value/mandatory">MANDATORY</td> 56 <td tal:content="value/score ">SCORE</td>56 <td tal:content="value/score|nothing">SCORE</td> 57 57 <td tal:content="value/carry_over">CO</td> 58 58 <td tal:content="value/automatic">AUTO</td> -
main/waeup.kofa/trunk/src/waeup/kofa/students/studycourse.py
r7811 r8141 64 64 ticket.passmark = val.course.passmark 65 65 ticket.semester = val.course.semester 66 ticket.carry_over = False 66 67 self[str(studylevel.level)][ticket.code] = ticket 67 68 # Collect carry-over courses in base levels (not in repeating levels) -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r8120 r8141 77 77 The returned snippet is unicode type. 78 78 """ 79 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 79 80 if not isinstance(text, unicode): 80 81 if isinstance(text, basestring): … … 82 83 else: 83 84 text = unicode(text) 85 # Mainly for boolean values we need our customized 86 # localisation of the zope domain 87 text = translate(text, 'zope', target_language=portal_language) 84 88 text = text.replace('</div>', '<br /></div>') 85 89 tag1 = u'<font color="%s" size="%d">' % (color, size) … … 335 339 data.extend(docs_as_flowables(view, portal_language)) 336 340 337 # Insert content table on second page341 # Insert content table (optionally on second page) 338 342 if tabledata and tableheader: 339 data.append(PageBreak()) 343 #data.append(PageBreak()) 344 data.append(Spacer(1, 20)) 340 345 data.append(Paragraph(view.content_title, style["Heading3"])) 341 346 contenttable = render_table_data(tableheader,tabledata)
Note: See TracChangeset for help on using the changeset viewer.