pallets-eco / wtforms

A flexible forms validation and rendering library for Python.
https://wtforms.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.51k stars 395 forks source link

SelectField / RadioField should have translated options #838

Closed jssuzanne closed 7 months ago

jssuzanne commented 7 months ago

Actual Behavior

On https://github.com/wtforms/wtforms/blob/master/src/wtforms/fields/choices.py#L59, the options are instanciate with a label. Or in https://github.com/wtforms/wtforms/blob/master/src/wtforms/fields/core.py#L123, when the label is not None it is use directly.

Expected Behavior

On https://github.com/wtforms/wtforms/blob/master/src/wtforms/fields/choices.py#L59, the label should be wrap by the method gettext (https://github.com/wtforms/wtforms/blob/master/src/wtforms/fields/core.py#L194)

Environment

jssuzanne commented 7 months ago

Sorry bad, issue, the translation is not the pb of WTForms but mine. I close this issue.