60 if props is not None and value and props.get('internationalizable'): |
60 if props is not None and value and props.get('internationalizable'): |
61 return req._(value) |
61 return req._(value) |
62 return value |
62 return value |
63 if attrtype == 'Date': |
63 if attrtype == 'Date': |
64 return ustrftime(value, req.property_value('ui.date-format')) |
64 return ustrftime(value, req.property_value('ui.date-format')) |
65 if attrtype == 'Time': |
65 if attrtype in ('Time', 'TZTime'): |
66 return ustrftime(value, req.property_value('ui.time-format')) |
66 return ustrftime(value, req.property_value('ui.time-format')) |
67 if attrtype == 'Datetime': |
67 if attrtype in ('Datetime', 'TZDatetime'): |
68 if displaytime: |
68 if displaytime: |
69 return ustrftime(value, req.property_value('ui.datetime-format')) |
69 return ustrftime(value, req.property_value('ui.datetime-format')) |
70 return ustrftime(value, req.property_value('ui.date-format')) |
70 return ustrftime(value, req.property_value('ui.date-format')) |
71 if attrtype == 'Boolean': |
71 if attrtype == 'Boolean': |
72 if value: |
72 if value: |
73 return req._('yes') |
73 return req._('yes') |
74 return req._('no') |
74 return req._('no') |
75 if attrtype == 'Float': |
75 if attrtype in ('Float', 'Decimal'): |
76 value = req.property_value('ui.float-format') % value |
76 value = req.property_value('ui.float-format') % value |
|
77 # XXX Interval |
77 return unicode(value) |
78 return unicode(value) |
78 |
79 |
79 |
80 |
80 # text publishing ############################################################# |
81 # text publishing ############################################################# |
81 |
82 |