Merge pull request #4121 from edx/sarina/fix-i18n-bugs
Fix i18n translation issues
This commit is contained in:
@@ -236,7 +236,7 @@ class TestGetProblemGradeDistribution(ModuleStoreTestCase):
|
||||
|
||||
def test_get_students_opened_subsection_csv(self):
|
||||
|
||||
tooltip = '4162 student(s) opened Subsection 5: Relational Algebra Exercises'
|
||||
tooltip = '4162 students opened Subsection 5: Relational Algebra Exercises'
|
||||
attributes = '?module_id=' + self.item.location.to_deprecated_string() + '&tooltip=' + tooltip + '&csv=true'
|
||||
request = self.request_factory.get(reverse('get_students_opened_subsection') + attributes)
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ class TestPasswordHistory(LoginEnrollmentTestCase):
|
||||
student_email, _ = self._setup_user()
|
||||
user = User.objects.get(email=student_email)
|
||||
|
||||
err_msg = 'You are re-using a password that you have used recently. You must have 1 distinct password(s)'
|
||||
err_msg = 'You are re-using a password that you have used recently. You must have 1 distinct password'
|
||||
success_msg = 'Your Password Reset is Complete'
|
||||
|
||||
token = default_token_generator.make_token(user)
|
||||
@@ -190,7 +190,7 @@ class TestPasswordHistory(LoginEnrollmentTestCase):
|
||||
staff_email, _ = self._setup_user(is_staff=True)
|
||||
user = User.objects.get(email=staff_email)
|
||||
|
||||
err_msg = 'You are re-using a password that you have used recently. You must have 2 distinct password(s)'
|
||||
err_msg = 'You are re-using a password that you have used recently. You must have 2 distinct passwords'
|
||||
success_msg = 'Your Password Reset is Complete'
|
||||
|
||||
token = default_token_generator.make_token(user)
|
||||
|
||||
@@ -493,8 +493,11 @@ class Courses(SysadminDashboardView):
|
||||
data.append([course.display_name, course.id.to_deprecated_string()]
|
||||
+ self.git_info_for_course(gdir))
|
||||
|
||||
return dict(header=[_('Course Name'), _('Directory/ID'),
|
||||
_('Git Commit'), _('Last Change'),
|
||||
return dict(header=[_('Course Name'),
|
||||
_('Directory/ID'),
|
||||
# Translators: "Git Commit" is a computer command; see http://gitref.org/basic/#commit
|
||||
_('Git Commit'),
|
||||
_('Last Change'),
|
||||
_('Last Editor')],
|
||||
title=_('Information about all courses'),
|
||||
data=data)
|
||||
|
||||
@@ -351,15 +351,19 @@ edx_d3CreateStackedBarGraph = function(parameters, svg, divTooltip) {
|
||||
|
||||
// Construct the tooltip
|
||||
if (d.tooltip['type'] == 'subsection') {
|
||||
tooltip_str = d.tooltip['num_students'] + ' ' + gettext('student(s) opened Subsection') + ' ' \
|
||||
+ d.tooltip['subsection_num'] + ': ' + d.tooltip['subsection_name']
|
||||
stud_str = ngettext('%(num_students)s student opened Subsection', '%(num_students)s students opened Subsection', d.tooltip['num_students']);
|
||||
stud_str = interpolate(stud_str, {'num_students': d.tooltip['num_students']}, true);
|
||||
tooltip_str = stud_str + ' ' + d.tooltip['subsection_num'] + ': ' + d.tooltip['subsection_name'];
|
||||
}else if (d.tooltip['type'] == 'problem') {
|
||||
stud_str = ngettext('%(num_students)s student', '%(num_students)s students', d.tooltip['count_grade']);
|
||||
stud_str = interpolate(stud_str, {'num_students': d.tooltip['count_grade']}, true);
|
||||
q_str = ngettext('%(num_questions)s question', '%(num_questions)s questions', d.tooltip['max_grade']);
|
||||
q_str = interpolate(q_str, {'num_questions': d.tooltip['max_grade']}, true);
|
||||
|
||||
tooltip_str = d.tooltip['label'] + ' ' + d.tooltip['problem_name'] + ' - ' \
|
||||
+ d.tooltip['count_grade'] + ' ' + gettext('students') + ' (' \
|
||||
+ d.tooltip['student_count_percent'] + '%) (' + \
|
||||
+ d.tooltip['percent'] + '%: ' + \
|
||||
+ d.tooltip['grade'] +'/' + d.tooltip['max_grade'] + ' '
|
||||
+ gettext('questions') + ')'
|
||||
+ stud_str + ' (' + d.tooltip['student_count_percent'] + '%) (' \
|
||||
+ d.tooltip['percent'] + '%: ' + d.tooltip['grade'] +'/' \
|
||||
+ q_str + ')';
|
||||
}
|
||||
graph.divTooltip.style("visibility", "visible")
|
||||
.text(tooltip_str);
|
||||
@@ -438,4 +442,4 @@ edx_d3CreateStackedBarGraph = function(parameters, svg, divTooltip) {
|
||||
};
|
||||
|
||||
return graph;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -752,7 +752,7 @@ function goto( mode)
|
||||
%endif
|
||||
|
||||
<p>
|
||||
${_("Student distribution per country, all courses, Sep-12 to Oct-17, 1 server (shown here as an example):")}
|
||||
${_("Student distribution per country, all courses, Sep 12 to Oct 17, 1 server (shown here as an example):")}
|
||||
</p>
|
||||
|
||||
<div id="posts-list" class="clearfix">
|
||||
|
||||
@@ -110,9 +110,9 @@
|
||||
function(data) {
|
||||
if (data.success) {
|
||||
$("#change_email_title").html("${_('Please verify your new email')}");
|
||||
$("#change_email_form").html("<p>${_(('You\'ll receive a confirmation in your in-box.'
|
||||
$("#change_email_form").html("<p>${_('You\'ll receive a confirmation in your inbox.'
|
||||
' Please click the link in the email to confirm'
|
||||
' the email change.'))}</p>");
|
||||
' the email change.')}</p>");
|
||||
} else {
|
||||
$("#change_email_error").html(data.error).stop().css("display", "block");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user