Commit 3f739b05 by Sarina Canelake

Merge pull request #7997 from openfun/rmoch/i18n_problem_explanation_title

i18n lon-capa problem explanation title
parents 41363ead 8ce222ed
......@@ -211,3 +211,4 @@ Amir Qayyum Khan <amir.qayyum@arbisoft.com>
Jolyon Bloomfield <jolyon@mit.edu>
Kyle McCormick <kylemccor@gmail.com>
Jim Cai <jimcai@stanford.edu>
Richard Moch <richard.moch@gmail.com>
......@@ -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 = '<solution>\n<div class="detailed-solution">\nExplanation\n\n' + p1 + '\n</div>\n</solution>';
var selectString = '<solution>\n<div class="detailed-solution">\n' + explanation_title + '\n\n' + p1 + '\n</div>\n</solution>';
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 = '';
......
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