Changeset 7833 for main/waeup.kofa
- Timestamp:
- 10 Mar 2012, 09:45:25 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r7819 r7833 232 232 @property 233 233 def introduction(self): 234 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE235 lang = self.request.cookies.get('kofa.language' , portal_language)234 # Here we know that the cookie has been set 235 lang = self.request.cookies.get('kofa.language') 236 236 html = self.context.description_dict.get(lang,'') 237 237 if html =='': 238 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 238 239 html = self.context.description_dict.get(portal_language,'') 239 240 if html =='': -
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r7819 r7833 290 290 @property 291 291 def frontpage(self): 292 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 293 lang = self.request.cookies.get('kofa.language', portal_language) 292 lang = self.request.cookies.get('kofa.language') 294 293 html = self.context['configuration'].frontpage_dict.get(lang,'') 295 294 if html =='': 295 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 296 296 html = self.context[ 297 297 'configuration'].frontpage_dict.get(portal_language,'') -
main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py
r7819 r7833 261 261 switched = [] # for log file 262 262 switched_translated = [] # for flash message 263 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 264 preferred_language = self.request.cookies.get( 265 'kofa.language', portal_language) 263 # Here we know that the cookie has been set 264 preferred_language = self.request.cookies.get('kofa.language') 266 265 for bed_id in child_id: 267 266 message = self.context[bed_id].switchReservation() -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r7819 r7833 662 662 @property 663 663 def label(self): 664 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE665 lang = self.request.cookies.get('kofa.language' , portal_language)664 # Here we know that the cookie has been set 665 lang = self.request.cookies.get('kofa.language') 666 666 level_title = translate(self.context.level_title, 'waeup.kofa', 667 667 target_language=lang) … … 762 762 @property 763 763 def label(self): 764 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE765 lang = self.request.cookies.get('kofa.language' , portal_language)764 # Here we know that the cookie has been set 765 lang = self.request.cookies.get('kofa.language') 766 766 level_title = translate(self.context.level_title, 'waeup.kofa', 767 767 target_language=lang) … … 1732 1732 @property 1733 1733 def label(self): 1734 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE1735 lang = self.request.cookies.get('kofa.language' , portal_language)1734 # Here we know that the cookie has been set 1735 lang = self.request.cookies.get('kofa.language') 1736 1736 level_title = translate(self.context.level_title, 'waeup.kofa', 1737 1737 target_language=lang) -
main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py
r7819 r7833 73 73 def render(self): 74 74 url = self.view.url(self.context.getStudent(), self.link) 75 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE76 lang = self.request.cookies.get('kofa.language' , portal_language)75 # Here we know that the cookie has been set 76 lang = self.request.cookies.get('kofa.language') 77 77 text = translate(self.text, 'waeup.kofa', 78 78 target_language=lang)
Note: See TracChangeset for help on using the changeset viewer.