diff --git a/edc_qol/model_mixins/eq5d3l_model_mixin.py b/edc_qol/model_mixins/eq5d3l_model_mixin.py index b6066ad..9778c4d 100644 --- a/edc_qol/model_mixins/eq5d3l_model_mixin.py +++ b/edc_qol/model_mixins/eq5d3l_model_mixin.py @@ -2,6 +2,7 @@ from django.db import models from django.utils.html import format_html from django.utils.safestring import mark_safe +from django.utils.translation import gettext as _ from ..choices import ( ANXIETY_DEPRESSION, @@ -18,42 +19,49 @@ class Eq5d3lModelMixin(models.Model): self_care = models.CharField(verbose_name="Self-care", max_length=45, choices=SELF_CARE) usual_activities = models.CharField( - verbose_name="Usual activities", + verbose_name=_("Usual activities"), max_length=45, - help_text="Example. work, study, housework, family or leisure activities", + help_text=_("Example. work, study, housework, family or leisure activities"), choices=USUAL_ACTIVITIES, ) pain_discomfort = models.CharField( - verbose_name="Pain / Discomfort", max_length=45, choices=PAIN_DISCOMFORT + verbose_name=_("Pain / Discomfort"), max_length=45, choices=PAIN_DISCOMFORT ) anxiety_depression = models.CharField( - verbose_name="Anxiety / Depression", max_length=45, choices=ANXIETY_DEPRESSION + verbose_name=_("Anxiety / Depression"), max_length=45, choices=ANXIETY_DEPRESSION ) health_today_score_slider = models.CharField( - verbose_name=format_html("{}", "Visual score for how your health is TODAY"), + verbose_name=_("Visual score for how your health is TODAY"), max_length=3, ) health_today_score_confirmed = models.IntegerField( verbose_name=format_html( "{}", - mark_safe( # nosec B308, B703 - "Interviewer: " - "please confirm the number on the scale indicated from above." - ), + mark_safe( + _( + "Interviewer: " + "please confirm the number on the scale indicated from above." + ) + ), # nosec B308, B703 ), validators=[MinValueValidator(0), MaxValueValidator(100)], - help_text=( - "This scale is numbered from 0 to 100. " - "100 means the best health you can imagine" - "0 means the worst health you can imagine." + help_text=format_html( + "{}", + mark_safe( + _( + "This scale is numbered from 0 to 100. " + "100 means the best health you can imagine" + "0 means the worst health you can imagine." + ) + ), # nosec B308, B703 ), ) class Meta: abstract = True - verbose_name = "EuroQol EQ-5D-3L Instrument" - verbose_name_plural = "EuroQol EQ-5D-3L Instrument" + verbose_name = _("EuroQol EQ-5D-3L Instrument") + verbose_name_plural = _("EuroQol EQ-5D-3L Instrument")