Commit be6c57f5 by Ned Batchelder

Mark XModule strings for i18n

parent c7cf0c6d
...@@ -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 = []
......
...@@ -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:
......
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