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
be6c57f5
Commit
be6c57f5
authored
Dec 23, 2013
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mark XModule strings for i18n
parent
c7cf0c6d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
common/lib/xmodule/xmodule/js/src/annotatable/display.coffee
+11
-4
common/lib/xmodule/xmodule/js/src/capa/display.coffee
+7
-3
No files found.
common/lib/xmodule/xmodule/js/src/annotatable/display.coffee
View file @
be6c57f5
...
@@ -160,7 +160,10 @@ class @Annotatable
...
@@ -160,7 +160,10 @@ class @Annotatable
@
hideTips
visible
@
hideTips
visible
toggleAnnotationButtonText
:
(
hide
)
->
toggleAnnotationButtonText
:
(
hide
)
->
buttonText
=
(
if
hide
then
'Show'
else
'Hide'
)
+
' Annotations'
if
hide
buttonText
=
gettext
(
'Show Annotations'
)
else
buttonText
=
gettext
(
'Hide Annotations'
)
@
$
(
@
toggleAnnotationsSelector
).
text
(
buttonText
)
@
$
(
@
toggleAnnotationsSelector
).
text
(
buttonText
)
toggleInstructions
:
()
->
toggleInstructions
:
()
->
...
@@ -169,7 +172,10 @@ class @Annotatable
...
@@ -169,7 +172,10 @@ class @Annotatable
@
toggleInstructionsText
hide
@
toggleInstructionsText
hide
toggleInstructionsButton
:
(
hide
)
->
toggleInstructionsButton
:
(
hide
)
->
txt
=
(
if
hide
then
'Expand'
else
'Collapse'
)
+
' Instructions'
if
hide
txt
=
gettext
(
'Expand Instructions'
)
else
txt
=
gettext
(
'Collapse Instructions'
)
cls
=
(
if
hide
then
[
'expanded'
,
'collapsed'
]
else
[
'collapsed'
,
'expanded'
])
cls
=
(
if
hide
then
[
'expanded'
,
'collapsed'
]
else
[
'collapsed'
,
'expanded'
])
@
$
(
@
toggleInstructionsSelector
).
text
(
txt
).
removeClass
(
cls
[
0
]).
addClass
(
cls
[
1
])
@
$
(
@
toggleInstructionsSelector
).
text
(
txt
).
removeClass
(
cls
[
0
]).
addClass
(
cls
[
1
])
...
@@ -221,13 +227,14 @@ class @Annotatable
...
@@ -221,13 +227,14 @@ class @Annotatable
makeTipTitle
:
(
el
)
->
makeTipTitle
:
(
el
)
->
(
api
)
=>
(
api
)
=>
title
=
$
(
el
).
data
(
'comment-title'
)
title
=
$
(
el
).
data
(
'comment-title'
)
(
if
title
then
title
else
'Commentary'
)
(
if
title
then
title
else
gettext
(
'Commentary'
)
)
createComment
:
(
text
)
->
createComment
:
(
text
)
->
$
(
"<div class=
\"
annotatable-comment
\"
>
#{
text
}
</div>"
)
$
(
"<div class=
\"
annotatable-comment
\"
>
#{
text
}
</div>"
)
createReplyLink
:
(
problem_id
)
->
createReplyLink
:
(
problem_id
)
->
$
(
"<a class=
\"
annotatable-reply
\"
href=
\"
javascript:void(0);
\"
data-problem-id=
\"
#{
problem_id
}
\"
>Reply to Annotation</a>"
)
linktxt
=
gettext
(
'Reply to Annotation'
)
$
(
"<a class=
\"
annotatable-reply
\"
href=
\"
javascript:void(0);
\"
data-problem-id=
\"
#{
problem_id
}
\"
>
#{
linktxt
}
</a>"
)
findVisibleTips
:
()
->
findVisibleTips
:
()
->
visible
=
[]
visible
=
[]
...
...
common/lib/xmodule/xmodule/js/src/capa/display.coffee
View file @
be6c57f5
...
@@ -318,14 +318,16 @@ class @Problem
...
@@ -318,14 +318,16 @@ class @Problem
@
el
.
find
(
'.problem > div'
).
each
(
index
,
element
)
=>
@
el
.
find
(
'.problem > div'
).
each
(
index
,
element
)
=>
MathJax
.
Hub
.
Queue
[
"Typeset"
,
MathJax
.
Hub
,
element
]
MathJax
.
Hub
.
Queue
[
"Typeset"
,
MathJax
.
Hub
,
element
]
@
$
(
'.show-label'
).
text
'Hide Answer(s)'
`//
Translators
:
the
word
Answer
here
refers
to
the
answer
to
a
problem
the
student
must
solve
.
`
@
$
(
'.show-label'
).
text
gettext
(
'Hide Answer(s)'
)
@
el
.
addClass
'showed'
@
el
.
addClass
'showed'
@
updateProgress
response
@
updateProgress
response
else
else
@
$
(
'[id^=answer_], [id^=solution_]'
).
text
''
@
$
(
'[id^=answer_], [id^=solution_]'
).
text
''
@
$
(
'[correct_answer]'
).
attr
correct_answer
:
null
@
$
(
'[correct_answer]'
).
attr
correct_answer
:
null
@
el
.
removeClass
'showed'
@
el
.
removeClass
'showed'
@
$
(
'.show-label'
).
text
'Show Answer(s)'
`//
Translators
:
the
word
Answer
here
refers
to
the
answer
to
a
problem
the
student
must
solve
.
`
@
$
(
'.show-label'
).
text
gettext
(
'Show Answer(s)'
)
@
el
.
find
(
".capa_inputtype"
).
each
(
index
,
inputtype
)
=>
@
el
.
find
(
".capa_inputtype"
).
each
(
index
,
inputtype
)
=>
display
=
@
inputtypeDisplays
[
$
(
inputtype
).
attr
(
'id'
)]
display
=
@
inputtypeDisplays
[
$
(
inputtype
).
attr
(
'id'
)]
...
@@ -403,6 +405,7 @@ class @Problem
...
@@ -403,6 +405,7 @@ class @Problem
formulaequationinput
:
(
element
)
->
formulaequationinput
:
(
element
)
->
$
(
element
).
find
(
'input'
).
on
'input'
,
->
$
(
element
).
find
(
'input'
).
on
'input'
,
->
$p
=
$
(
element
).
find
(
'p.status'
)
$p
=
$
(
element
).
find
(
'p.status'
)
`//
Translators
:
the
word
Answer
here
is
about
answering
a
problem
the
student
must
solve
.
`
$p
.
text
gettext
(
"unanswered"
)
$p
.
text
gettext
(
"unanswered"
)
$p
.
parent
().
removeClass
().
addClass
"unanswered"
$p
.
parent
().
removeClass
().
addClass
"unanswered"
...
@@ -431,7 +434,8 @@ class @Problem
...
@@ -431,7 +434,8 @@ class @Problem
textline
:
(
element
)
->
textline
:
(
element
)
->
$
(
element
).
find
(
'input'
).
on
'input'
,
->
$
(
element
).
find
(
'input'
).
on
'input'
,
->
$p
=
$
(
element
).
find
(
'p.status'
)
$p
=
$
(
element
).
find
(
'p.status'
)
$p
.
text
"unanswered"
`//
Translators
:
the
word
Answer
here
is
about
answering
a
problem
the
student
must
solve
.
`
$p
.
text
gettext
(
"unanswered"
)
$p
.
parent
().
removeClass
().
addClass
"unanswered"
$p
.
parent
().
removeClass
().
addClass
"unanswered"
inputtypeSetupMethods
:
inputtypeSetupMethods
:
...
...
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