Issue 169 in formalchemy: i18n doesn't seem to work with DateFieldRenderer

7 views
Skip to first unread message

forma...@googlecode.com

unread,
Oct 28, 2011, 5:11:32 PM10/28/11
to forma...@googlegroups.com
Status: New
Owner: ----

New issue 169 by chris.do...@gmail.com: i18n doesn't seem to work with
DateFieldRenderer
http://code.google.com/p/formalchemy/issues/detail?id=169

What steps will reproduce the problem?
1. Set up pyramid app, forms,
2. formalchemy i18n_resources dir etc., lang='en'
3. use a date field


What is the expected output? What do you see instead?
expect a pulldown of months ('January','February',etc..) instead get
('month_01','month_02', etc...)


What version of the product are you using? On what operating system?
1.4.1. it may already be fixed in the core, in which case my apologies

Please provide any additional information below.
Offending lines seem to be fields:551, in DateFieldRenderer._render, the
month_options line.

The F_ function seems to expect a domain='formalchemy' argument. I
subclassed the DateFieldRenderer locally and added a:

instead of 550:
F_ = self.get_translator(**kwargs)
tempfix:
realF_ = self.get_translator(**kwargs)

def F_(tstring):
return realF_(tstring, 'formalchemy')

as a temporary fix.

Reply all
Reply to author
Forward
0 new messages