Skip to content

Commit

Permalink
fix: [ACI-909] remove redundant translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrii committed Apr 19, 2024
1 parent e02d084 commit 1264594
Show file tree
Hide file tree
Showing 70 changed files with 2,631 additions and 8,078 deletions.
10 changes: 4 additions & 6 deletions credentials/apps/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,9 @@ class SiteConfiguration(models.Model):
default="openedx",
)
partner_from_address = models.EmailField(
verbose_name=_("Email address for partners"),
help_text=_(
'An address to use for the "From" field of any automated emails sent out to partners. '
"If not defined, no-reply@sitedomain will be used."
),
verbose_name="Email address for partners",
help_text='An address to use for the "From" field of any automated emails sent out to partners. '
+ "If not defined, no-reply@sitedomain will be used.",
blank=True,
null=True,
)
Expand Down Expand Up @@ -81,7 +79,7 @@ class SiteConfiguration(models.Model):
)
verified_certificate_url = models.URLField(
verbose_name=_("Verified Certificate URL"),
help_text=_("This field is deprecated, and will be removed."),
help_text="This field is deprecated, and will be removed.",
blank=True,
null=True,
)
Expand Down
28 changes: 12 additions & 16 deletions credentials/apps/credentials/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class AbstractCertificate(AbstractCredential):
max_length=255,
null=True,
blank=True,
help_text=_("Custom certificate title to override default display_name for a course/program."),
help_text="Custom certificate title to override default display_name for a course/program.",
)

class Meta:
Expand Down Expand Up @@ -228,7 +228,7 @@ class CourseCertificate(AbstractCertificate):

class Meta:
unique_together = (("course_id", "certificate_type", "site"),)
verbose_name = _("Course certificate configuration")
verbose_name = "Course certificate configuration"

@cached_property
def course_key(self):
Expand Down Expand Up @@ -262,21 +262,19 @@ class ProgramCertificate(AbstractCertificate):
)
include_hours_of_effort = models.BooleanField(
default=False,
help_text=_(
"Display the estimated total number of hours needed to complete all courses in the program. This "
"feature will only be displayed in the certificate if the attribute 'Total hours of effort' has "
"been set for the program in Discovery."
),
help_text="Display the estimated total number of hours needed to complete all courses in the program. This "
"feature will only be displayed in the certificate if the attribute 'Total hours of effort' has "
"been set for the program in Discovery.",
)
language = models.CharField(
max_length=8, null=True, help_text=_("Locale in which certificates for this program will be rendered")
max_length=8, null=True, help_text="Locale in which certificates for this program will be rendered"
)

def __str__(self):
return f"ProgramCertificate: {self.program_uuid}"

class Meta:
verbose_name = _("Program certificate configuration")
verbose_name = "Program certificate configuration"
unique_together = (("site", "program_uuid"),)

@cached_property
Expand All @@ -285,9 +283,7 @@ def program_details(self):
program_details = get_program_details_by_uuid(uuid=self.program_uuid, site=self.site)

if not program_details:
msg = _(
f"No matching program with UUID [{self.program_uuid}] in credentials catalog for program certificate"
)
msg = f"No matching program with UUID [{self.program_uuid}] in credentials catalog for program certificate"
raise NoMatchingProgramException(msg)

if self.use_org_name:
Expand Down Expand Up @@ -347,13 +343,13 @@ class ProgramCompletionEmailConfiguration(TimeStampedModel):
identifier = models.CharField(
max_length=50,
unique=True,
help_text=_(
help_text=(
"""Should be either "default" to affect all programs, the program type slug, or the UUID of the program. """
"""Values are unique."""
),
)
html_template = models.TextField(
help_text=_("For HTML emails." "Allows tags include (a, b, blockquote, div, em, i, li, ol, span, strong, ul)")
help_text=("For HTML emails." "Allows tags include (a, b, blockquote, div, em, i, li, ol, span, strong, ul)")
)
plaintext_template = models.TextField(help_text="For plaintext emails. No formatting tags. Text will send as is.")
enabled = models.BooleanField(default=False)
Expand Down Expand Up @@ -397,8 +393,8 @@ class UserCredentialDateOverride(TimeStampedModel):
UserCredential,
on_delete=models.CASCADE,
related_name="date_override",
help_text=_("The id of the UserCredential that this date overrides"),
help_text="The id of the UserCredential that this date overrides",
)
date = models.DateTimeField(
help_text=_("The date to override a course certificate with. This is set in the LMS Django Admin."),
help_text="The date to override a course certificate with. This is set in the LMS Django Admin.",
)
6 changes: 3 additions & 3 deletions credentials/apps/records/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class UserGrade(TimeStampedModel):
course_run = models.ForeignKey(CourseRun, on_delete=models.PROTECT)
letter_grade = models.CharField(max_length=255, blank=True)
percent_grade = models.DecimalField(max_digits=5, decimal_places=4, null=False)
verified = models.BooleanField(verbose_name=_("Verified Learner ID"), default=True)
verified = models.BooleanField(verbose_name="Verified Learner ID", default=True)
lms_last_updated_at = models.DateTimeField(null=True)

class Meta:
Expand All @@ -47,7 +47,7 @@ class ProgramCertRecord(TimeStampedModel):
ProgramCertificate,
null=True,
default=None,
help_text=_("Note: certificate is deprecated, and is kept around because it is used in an old data migration."),
help_text="Note: certificate is deprecated, and is kept around because it is used in an old data migration.",
on_delete=models.CASCADE,
)
program = models.ForeignKey(Program, on_delete=models.PROTECT)
Expand All @@ -58,7 +58,7 @@ def __str__(self):
return f"ProgramCertificateRecord: {self.uuid}"

class Meta:
verbose_name = _("Shared program record")
verbose_name = "Shared program record"
unique_together = ("program", "user")


Expand Down
Loading

0 comments on commit 1264594

Please sign in to comment.