From 3e0342cbb3fdc8b13200b2b784175a4e7d30ca55 Mon Sep 17 00:00:00 2001 From: Richard Moch Date: Mon, 18 May 2015 13:10:08 +0000 Subject: [PATCH] i18n lon-capa problem explanation title --- common/lib/xmodule/xmodule/js/src/problem/edit.coffee | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/problem/edit.coffee b/common/lib/xmodule/xmodule/js/src/problem/edit.coffee index 378b142d6e..68deb25bc5 100644 --- a/common/lib/xmodule/xmodule/js/src/problem/edit.coffee +++ b/common/lib/xmodule/xmodule/js/src/problem/edit.coffee @@ -201,6 +201,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor # @markdownToXml: (markdown)-> toXml = `function (markdown) { + // Translators: This is the title of the text explaining a problem + var explanation_title = gettext("Explanation"); var xml = markdown, i, splits, scriptFlag; @@ -348,14 +350,15 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor }); // replace explanations + xml = xml.replace(/\[explanation\]\n?([^\]]*)\[\/?explanation\]/gmi, function(match, p1) { - var selectString = '\n
\nExplanation\n\n' + p1 + '\n
\n
'; + var selectString = '\n
\n' + explanation_title + '\n\n' + p1 + '\n
\n
'; return selectString; }); - + // replace labels - // looks for >>arbitrary text<< and inserts it into the label attribute of the input type directly below the text. + // looks for >>arbitrary text<< and inserts it into the label attribute of the input type directly below the text. var split = xml.split('\n'); var new_xml = []; var line, i, curlabel, prevlabel = '';