Commit ed70a082 by Anton Stupak

Merge pull request #3608 from edx/anton/i18n-code-response

CodeResponse i18n.
parents 7b92d52f 7effca9e
...@@ -1874,10 +1874,12 @@ class CodeResponse(LoncapaResponse): ...@@ -1874,10 +1874,12 @@ class CodeResponse(LoncapaResponse):
self.initial_display = find_with_default( self.initial_display = find_with_default(
codeparam, 'initial_display', '') codeparam, 'initial_display', '')
_ = self.capa_system.i18n.ugettext
self.answer = find_with_default(codeparam, 'answer_display', self.answer = find_with_default(codeparam, 'answer_display',
'No answer provided.') _(u'No answer provided.'))
def get_score(self, student_answers): def get_score(self, student_answers):
_ = self.capa_system.i18n.ugettext
try: try:
# Note that submission can be a file # Note that submission can be a file
submission = student_answers[self.answer_id] submission = student_answers[self.answer_id]
...@@ -1893,7 +1895,7 @@ class CodeResponse(LoncapaResponse): ...@@ -1893,7 +1895,7 @@ class CodeResponse(LoncapaResponse):
if self.capa_system.xqueue is None: if self.capa_system.xqueue is None:
cmap = CorrectMap() cmap = CorrectMap()
cmap.set(self.answer_id, queuestate=None, cmap.set(self.answer_id, queuestate=None,
msg='Error checking problem: no external queueing server is configured.') msg=_(u'Error checking problem: no external queueing server is configured.'))
return cmap return cmap
# Prepare xqueue request # Prepare xqueue request
......
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