wtforms/wtforms — pull request #121 by devurandom (2014-08-24 00:42:53+00:00)
Title: Fix wtforms/wtforms#120: Allow custom Labels in Field's __init__

Fixes wtforms/wtforms#120 by allowing code like the following:
```python
class i18nLabel(Label):
def __init__(self, field_id, **kwargs):
super(i18nLabel, self).__init__(field_id, None)
self.translations = kwargs

def __call__(self, text=None, **kwargs):
if 'for_' in kwargs:
kwargs['for'] = kwargs.pop('for_')
else:
kwargs.setdefault('for', self.field_id)

attributes = html_params(**kwargs)
return ''.join(HTMLString('%s' % (attributes, lang, text)) for lang, text in self.translations.iteritems())

_ = i18nLabel

class ApplicationForm(Form):
name = StringField(_('name', de='German Label', en='English Label'))
```