Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
3f739b05
Commit
3f739b05
authored
May 18, 2015
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7997 from openfun/rmoch/i18n_problem_explanation_title
i18n lon-capa problem explanation title
parents
41363ead
8ce222ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
AUTHORS
+1
-0
common/lib/xmodule/xmodule/js/src/problem/edit.coffee
+6
-3
No files found.
AUTHORS
View file @
3f739b05
...
...
@@ -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>
common/lib/xmodule/xmodule/js/src/problem/edit.coffee
View file @
3f739b05
...
...
@@ -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">
\n
Explanation
\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
=
''
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment