toscawidgets/tw2.core — pull request #103 by amol- (2014-01-09 00:29:46+00:00)
Title: CompoundWidget validation breaks formencode custom translation by not passing a valid state

FormEncode uses state._ when available to perform translations. This is used by TurboGears (also Pylons did the same) to make Formencode use the same language as detected by the framework itself.

When using TW2 forms with formencode validatiors i18n support breaks because CompoundWidget pass a dictionary instead of state object as the state parameter of the validate method. So even if a state object with a _ method is provided it gets ignored by the validate method.

Provides test unit to expose the issue.