From 39ad552fcfafa53ee7d2893a8cb6ea1a4a2b09ad Mon Sep 17 00:00:00 2001 From: erikvw Date: Tue, 21 Jan 2025 19:49:31 -0600 Subject: [PATCH] format_html, mark_safe, translations --- .../model_mixins/subject_contact_fields_mixin.py | 12 ++++++------ .../subject_indirect_contact_fields_mixin.py | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/edc_locator/model_mixins/subject_contact_fields_mixin.py b/edc_locator/model_mixins/subject_contact_fields_mixin.py index c4f76e8..62e6111 100644 --- a/edc_locator/model_mixins/subject_contact_fields_mixin.py +++ b/edc_locator/model_mixins/subject_contact_fields_mixin.py @@ -10,9 +10,9 @@ class SubjectContactFieldsMixin(models.Model): max_length=25, choices=YES_NO, verbose_name=format_html( - "Has the participant given permission {} " + "Has the participant given permission {text} " "by study staff for follow-up purposes during the study?", - "to contacted by telephone or cell", + text="to contacted by telephone or cell", ), ) @@ -21,8 +21,8 @@ class SubjectContactFieldsMixin(models.Model): choices=YES_NO, verbose_name=format_html( "Has the participant given permission for study " - "staff {} for follow-up purposes?", - "to make home visits", + "staff {text} for follow-up purposes?", + text="to make home visits", ), ) @@ -32,9 +32,9 @@ class SubjectContactFieldsMixin(models.Model): null=True, blank=False, verbose_name=format_html( - "Has the participant given permission {} " + "Has the participant given permission {text} " "by study staff for follow-up purposes during the study?", - "to be contacted by SMS", + text="to be contacted by SMS", ), ) diff --git a/edc_locator/model_mixins/subject_indirect_contact_fields_mixin.py b/edc_locator/model_mixins/subject_indirect_contact_fields_mixin.py index ab261d7..250f4ec 100644 --- a/edc_locator/model_mixins/subject_indirect_contact_fields_mixin.py +++ b/edc_locator/model_mixins/subject_indirect_contact_fields_mixin.py @@ -10,10 +10,10 @@ class SubjectIndirectContactFieldsMixin(models.Model): max_length=25, choices=YES_NO, verbose_name=format_html( - "{} {} {}?", - "Has the participant given permission for study staff", - "to contact anyone else", - "for follow-up purposes during the study", + "{text1} {text2} {text3}?", + text1="Has the participant given permission for study staff", + text2="to contact anyone else", + text3="for follow-up purposes during the study", ), help_text="For example a partner, spouse, family member, neighbour ...", )