Commit 3584b246 by Sarina Canelake

Translate strings in xmodule/capa_*.py

LMS-1744
parent 42c543b7
...@@ -62,12 +62,14 @@ class CapaModule(CapaMixin, XModule): ...@@ -62,12 +62,14 @@ class CapaModule(CapaMixin, XModule):
'ungraded_response': self.handle_ungraded_response 'ungraded_response': self.handle_ungraded_response
} }
generic_error_message = ( _ = self.runtime.service(self, "i18n").ugettext
generic_error_message = _(
"We're sorry, there was an error with processing your request. " "We're sorry, there was an error with processing your request. "
"Please try reloading your page and trying again." "Please try reloading your page and trying again."
) )
not_found_error_message = ( not_found_error_message = _(
"The state of this problem has changed since you loaded this page. " "The state of this problem has changed since you loaded this page. "
"Please refresh your page." "Please refresh your page."
) )
......
...@@ -265,10 +265,10 @@ class TestRescoringTask(TestIntegrationTask): ...@@ -265,10 +265,10 @@ class TestRescoringTask(TestIntegrationTask):
self.assertEqual(instructor_task.task_state, FAILURE) self.assertEqual(instructor_task.task_state, FAILURE)
status = json.loads(instructor_task.task_output) status = json.loads(instructor_task.task_output)
self.assertEqual(status['exception'], 'NotImplementedError') self.assertEqual(status['exception'], 'NotImplementedError')
self.assertEqual(status['message'], "Problem's definition does not support rescoring") self.assertEqual(status['message'], "Problem's definition does not support rescoring.")
status = InstructorTaskModuleTestCase.get_task_status(instructor_task.task_id) status = InstructorTaskModuleTestCase.get_task_status(instructor_task.task_id)
self.assertEqual(status['message'], "Problem's definition does not support rescoring") self.assertEqual(status['message'], "Problem's definition does not support rescoring.")
def define_randomized_custom_response_problem(self, problem_url_name, redefine=False): def define_randomized_custom_response_problem(self, problem_url_name, redefine=False):
""" """
......
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