From 7effca9ec64f8877104d740ccd7fc099c3d0165f Mon Sep 17 00:00:00 2001 From: polesye Date: Tue, 6 May 2014 11:26:49 +0300 Subject: [PATCH] BLD-722: CodeResponse i18n. --- common/lib/capa/capa/responsetypes.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/lib/capa/capa/responsetypes.py b/common/lib/capa/capa/responsetypes.py index 2c2868a1a2..b27fcbe8b6 100644 --- a/common/lib/capa/capa/responsetypes.py +++ b/common/lib/capa/capa/responsetypes.py @@ -1863,10 +1863,12 @@ class CodeResponse(LoncapaResponse): self.initial_display = find_with_default( codeparam, 'initial_display', '') + _ = self.capa_system.i18n.ugettext self.answer = find_with_default(codeparam, 'answer_display', - 'No answer provided.') + _(u'No answer provided.')) def get_score(self, student_answers): + _ = self.capa_system.i18n.ugettext try: # Note that submission can be a file submission = student_answers[self.answer_id] @@ -1882,7 +1884,7 @@ class CodeResponse(LoncapaResponse): if self.capa_system.xqueue is None: cmap = CorrectMap() 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 # Prepare xqueue request