Adds translation for lms progress chart tooltip.

Tooltip text under lms->courseview->progress tab->chart
was not under any translation, causing it to appear untranslated for
learners. This would enable its translation to any language.

LEARNER-2607
This commit is contained in:
Adeel Khan
2017-09-28 15:33:08 +05:00
parent b96f646d35
commit 9ef887c547
17 changed files with 16510 additions and 4810 deletions

View File

@@ -14,6 +14,7 @@ from datetime import datetime
from contracts import contract
from pytz import UTC
from django.utils.translation import ugettext_lazy as _
log = logging.getLogger("edx.courseware")
@@ -270,7 +271,10 @@ class WeightedSubsectionsGrader(CourseGrader):
subgrade_result = subgrader.grade(grade_sheet, generate_random_scores)
weighted_percent = subgrade_result['percent'] * weight
section_detail = u"{0} = {1:.2%} of a possible {2:.2%}".format(assignment_type, weighted_percent, weight)
section_detail = _(u"{assignment_type} = {weighted_percent:.2%} of a possible {weight:.2%}").format(
assignment_type=assignment_type,
weighted_percent=weighted_percent,
weight=weight)
total_percent += weighted_percent
section_breakdown += subgrade_result['section_breakdown']