Currently the options given for a list type field (e.g. on/off values for a checkbox) are never passed through the t() function, unlike the other field labels.
The perfect location for this would probably be in list_allowed_values() of field/modules/list/list.module.
In the case that an "allowed_values_function" does not exist we get original allowed values
$values = $field['settings']['allowed_values'];
and could apply t() to all values.
If we do it any later than we cannot be sure whether the allowed values came from an "allowed_values_function" and t() has been used already.
Moreover list_allowed_values() is being called for all options whether they appear in a form element or in a field formatter.
Comments
Comment #1
mindgame commentedComment #2
mindgame commentedI'm using this patch now.
Comment #3
damien tournoud commentedTranslation of field meta is handled by the i18n_field module, part of the i18n suite. Doing anything else is Drupal 8 material.
Comment #4
mindgame commentedComment #5
jedward3 commentedIt works for me. (It requires me to uninstall and reinstall entityform, but then it worked!)