Commit da0664c5 by Saleem Latif

Add i18n to strings

parent 8b2c4994
......@@ -268,7 +268,8 @@ class CertificateGenerationHistory(TimeStampedModel):
"""
Return "regenerated" if record corresponds to Certificate Regeneration task, otherwise returns 'generated'
"""
return "regenerated" if self.is_regeneration else "generated"
# Translators: This is a past-tense verb that is used for task action messages.
return _("regenerated") if self.is_regeneration else _("generated")
def get_certificate_generation_candidates(self):
"""
......@@ -285,7 +286,8 @@ class CertificateGenerationHistory(TimeStampedModel):
task_input_json = json.loads(task_input)
except ValueError:
# if task input is empty, it means certificates were generated for all learners
return "All learners"
# Translators: This string represents task was executed for all learners.
return _("All learners")
# get statuses_to_regenerate from task_input convert statuses to human readable strings and return
statuses = task_input_json.get('statuses_to_regenerate', None)
......@@ -296,7 +298,8 @@ class CertificateGenerationHistory(TimeStampedModel):
# If students is present in task_input then, certificate generation task was run to
# generate certificates for white listed students otherwise it is for all students.
return "For exceptions" if 'students' in task_input_json else "All learners"
# Translators: This string represents task was executed for students having exceptions.
return _("For exceptions") if 'students' in task_input_json else _("All learners")
class Meta(object):
app_label = "certificates"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment