Changeset 50095
- Timestamp:
- 11/17/06 11:54:21 (3 years ago)
- Files:
-
- CPS3/products/CPSPortlets/trunk/CHANGES (modified) (1 diff)
- CPS3/products/CPSPortlets/trunk/PortletsTool.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
CPS3/products/CPSPortlets/trunk/CHANGES
r50032 r50095 7 7 Bug fixes 8 8 ~~~~~~~~~ 9 - 9 - Fixed #1645 : alt attribute of icons img tags is not translated. 10 10 New internal features 11 11 ~~~~~~~~~~~~~~~~~~~~~ CPS3/products/CPSPortlets/trunk/PortletsTool.py
r48411 r50095 1 1 # -*- coding: ISO-8859-15 -*- 2 # Copyright (c) 2004 Nuxeo SARL<http://nuxeo.com>3 # Copyright (c) 2004 Chalmers University of Technology <http://www.chalmers.se>2 # Copyright (c) 2004-2006 Nuxeo SAS <http://nuxeo.com> 3 # Copyright (c) 2004-2006 Chalmers University of Technology <http://www.chalmers.se> 4 4 # Authors : Julien Anguenot <ja@nuxeo.com> 5 5 # Jean-Marc Orliaguet <jmo@ita.chalmers.se> 6 6 # 7 7 # This program is free software; you can redistribute it and/or 8 8 # modify it under the terms of the GNU General Public License 9 9 # as published by the Free Software Foundation; either version 2 10 10 # of the License, or (at your option) any later version. 11 11 # 12 12 # This program is distributed in the hope that it will be useful, 13 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 15 # GNU General Public License for more details. 16 16 # 17 17 # You should have received a copy of the GNU General Public License 18 18 # along with this program; if not, write to the Free Software 19 19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 20 # 20 21 # $Id$ 21 22 … … 51 52 ICON_RAMCACHE_ID = 'icons' 52 53 ACTIONICON_RAMCACHE_ID = 'actioncons' 53 IMG_TAG = '<img src="%s" width="%s" height="%s" alt="%s" />'54 IMG_TAG = '<img src="%s" width="%s" height="%s" alt="%s" title="%s" />' 54 55 55 56 # FTI … … 815 816 if img is None: 816 817 return None 818 trans = self.translation_service 819 language = trans.getSelectedLanguage() 820 alt_text = trans.translateDefault(alt, target_language=language) 817 821 img_tag = IMG_TAG % (base_url + icon_path, 818 822 getattr(img, 'width', 16), 819 823 getattr(img, 'height', 16), 820 alt )824 alt_text, alt_text) 821 825 if cache is not None: 822 826 cache.setEntry(index, img_tag) … … 868 872 if img is None: 869 873 return None 874 trans = self.translation_service 875 language = trans.getSelectedLanguage() 876 alt_text = trans.translateDefault(alt, target_language=language) 870 877 img_tag = IMG_TAG % (base_url + icon_path, 871 878 getattr(img, 'width', 0), 872 879 getattr(img, 'height', 0), 873 alt )880 alt_text, alt_text) 874 881 if cache is not None: 875 882 cache.setEntry(index, img_tag)
