Changeset 8921 for main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
- Timestamp:
- 5 Jul 2012, 15:28:28 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r8920 r8921 91 91 return 92 92 93 def translated_values(view): 94 lang = view.request.cookies.get('kofa.language') 95 for value in view.context.values(): 96 value_dict = dict([i for i in value.__dict__.items()]) 97 value_dict['mandatory_bool'] = value.mandatory 98 value_dict['mandatory'] = translate(str(value.mandatory), 'zope', 99 target_language=lang) 100 value_dict['carry_over'] = translate(str(value.carry_over), 'zope', 101 target_language=lang) 102 value_dict['automatic'] = translate(str(value.automatic), 'zope', 103 target_language=lang) 104 yield value_dict 105 93 106 class StudentsBreadcrumb(Breadcrumb): 94 107 """A breadcrumb for the students container. … … 710 723 @property 711 724 def translated_values(self): 712 lang = self.request.cookies.get('kofa.language') 713 for value in self.context.values(): 714 value_dict = dict([i for i in value.__dict__.items()]) 715 value_dict['mandatory'] = translate(str(value.mandatory), 'zope', 716 target_language=lang) 717 value_dict['carry_over'] = translate(str(value.carry_over), 'zope', 718 target_language=lang) 719 value_dict['automatic'] = translate(str(value.automatic), 'zope', 720 target_language=lang) 721 yield value_dict 725 return translated_values(self) 722 726 723 727 @property … … 821 825 datatable.need() 822 826 return 827 828 @property 829 def translated_values(self): 830 return translated_values(self) 823 831 824 832 @property … … 1787 1795 return total_credits 1788 1796 1797 @property 1798 def translated_values(self): 1799 return translated_values(self) 1800 1789 1801 @action(_('Add course ticket')) 1790 1802 def addCourseTicket(self, **data):
Note: See TracChangeset for help on using the changeset viewer.