diff --git a/authentic/identities.py b/authentic/identities.py index cf36ee7..7388cc3 100644 --- a/authentic/identities.py +++ b/authentic/identities.py @@ -217,6 +217,16 @@ class Field: value = keywords.pop('value', None) if identity: value = getattr(identity, self.key, value) + if 'options' in keywords: + # translate caption + new_options = [] + for p in keywords['options']: + if isinstance(p, (list, tuple)): + p = (p[0], _(p[1])) + else: + p = _(p) + new_options.append(p) + keywords['options'] = new_options if not self.read_only or admin: if self.multivalued: keywords['render_br'] = False