equal
deleted
inserted
replaced
58 def print_string(value, req, props, displaytime=True): |
58 def print_string(value, req, props, displaytime=True): |
59 # don't translate empty value if you don't want strange results |
59 # don't translate empty value if you don't want strange results |
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 |
|
64 def print_int(value, req, props, displaytime=True): |
|
65 return unicode(value) |
63 |
66 |
64 def print_date(value, req, props, displaytime=True): |
67 def print_date(value, req, props, displaytime=True): |
65 return ustrftime(value, req.property_value('ui.date-format')) |
68 return ustrftime(value, req.property_value('ui.date-format')) |
66 |
69 |
67 def print_time(value, req, props, displaytime=True): |
70 def print_time(value, req, props, displaytime=True): |
122 return unicode(req.property_value('ui.float-format') % value) |
125 return unicode(req.property_value('ui.float-format') % value) |
123 |
126 |
124 PRINTERS = { |
127 PRINTERS = { |
125 'Bytes': print_bytes, |
128 'Bytes': print_bytes, |
126 'String': print_string, |
129 'String': print_string, |
|
130 'Int': print_int, |
|
131 'BigInt': print_int, |
127 'Date': print_date, |
132 'Date': print_date, |
128 'Time': print_time, |
133 'Time': print_time, |
129 'TZTime': print_tztime, |
134 'TZTime': print_tztime, |
130 'Datetime': print_datetime, |
135 'Datetime': print_datetime, |
131 'TZDatetime': print_tzdatetime, |
136 'TZDatetime': print_tzdatetime, |