equal
deleted
inserted
replaced
2 """user interface libraries |
2 """user interface libraries |
3 |
3 |
4 contains some functions designed to help implementation of cubicweb user interface |
4 contains some functions designed to help implementation of cubicweb user interface |
5 |
5 |
6 :organization: Logilab |
6 :organization: Logilab |
7 :copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
7 :copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
8 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
8 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
9 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
9 :license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
10 """ |
10 """ |
11 __docformat__ = "restructuredtext en" |
11 __docformat__ = "restructuredtext en" |
12 |
12 |
37 return u'' |
37 return u'' |
38 if attrtype == 'String': |
38 if attrtype == 'String': |
39 # don't translate empty value if you don't want strange results |
39 # don't translate empty value if you don't want strange results |
40 if props is not None and value and props.get('internationalizable'): |
40 if props is not None and value and props.get('internationalizable'): |
41 return req._(value) |
41 return req._(value) |
42 |
|
43 return value |
42 return value |
44 if attrtype == 'Date': |
43 if attrtype == 'Date': |
45 return ustrftime(value, req.property_value('ui.date-format')) |
44 return ustrftime(value, req.property_value('ui.date-format')) |
46 if attrtype == 'Time': |
45 if attrtype == 'Time': |
47 return ustrftime(value, req.property_value('ui.time-format')) |
46 return ustrftime(value, req.property_value('ui.time-format')) |