>From what I gather, it will be similar to my crude hack, only instead
of hardcoding gettext function it will retrieve one via the state
variable. Luckily, formencode already uses utility function to format
error messages so change is localized.
IIUC, Validator.message method will be changed along these lines:
def message(self, msgName, state, **kw):
if self._messages.has_key(msgName):
message = self._messages.get(msgName)
if callable(state): # or some state's attribute
message = state(message)
return message % kw
Then you pass TG's gettext or lazy_gettext as a state (again, I think
this can be done once in turbogears.validate()).