Commit 420be877 by Pavel Yushchenko

added some translations

parent f6462534
...@@ -91,7 +91,7 @@ describe 'CombinedOpenEnded', -> ...@@ -91,7 +91,7 @@ describe 'CombinedOpenEnded', ->
@combined.child_state = 'initial' @combined.child_state = 'initial'
@combined.rebind() @combined.rebind()
expect(@combined.answer_area.attr("disabled")).toBeUndefined() expect(@combined.answer_area.attr("disabled")).toBeUndefined()
expect(@combined.submit_button.val()).toBe("Submit") expect(@combined.submit_button.val()).toBe(gettext("Submit")
it 'when our child state is post_assessment', -> it 'when our child state is post_assessment', ->
@combined.child_state = 'post_assessment' @combined.child_state = 'post_assessment'
......
...@@ -549,11 +549,11 @@ class @CombinedOpenEnded ...@@ -549,11 +549,11 @@ class @CombinedOpenEnded
@prompt_container.slideToggle() @prompt_container.slideToggle()
@prompt_container.toggleClass('open') @prompt_container.toggleClass('open')
if @question_header.text() == "Hide Prompt" if @question_header.text() == "Hide Prompt"
new_text = "Show Prompt" new_text = gettext("Show Prompt")
Logger.log 'oe_hide_question', {location: @location} Logger.log 'oe_hide_question', {location: @location}
else else
Logger.log 'oe_show_question', {location: @location} Logger.log 'oe_show_question', {location: @location}
new_text = "Hide Prompt" new_text = gettext("Hide Prompt")
@question_header.text(new_text) @question_header.text(new_text)
return false return false
......
...@@ -580,11 +580,11 @@ class @PeerGradingProblem ...@@ -580,11 +580,11 @@ class @PeerGradingProblem
@prompt_container.slideToggle() @prompt_container.slideToggle()
@prompt_container.toggleClass('open') @prompt_container.toggleClass('open')
if @question_header.text() == "Hide Prompt" if @question_header.text() == "Hide Prompt"
new_text = "Show Prompt" new_text = gettext("Show Prompt")
Logger.log 'oe_hide_question', {location: @location} Logger.log 'oe_hide_question', {location: @location}
else else
Logger.log 'oe_show_question', {location: @location} Logger.log 'oe_show_question', {location: @location}
new_text = "Hide Prompt" new_text = gettext("Hide Prompt")
@question_header.text(new_text) @question_header.text(new_text)
return false return false
......
## The hinter module passes in a field called ${op}, which determines which ## The hinter module passes in a field called ${op}, which determines which
## sub-function to render. ## sub-function to render.
<%! from django.utils.translation import ugettext as _ %>
<%def name="get_hint()"> <%def name="get_hint()">
% if len(hints) > 0: % if len(hints) > 0:
...@@ -65,12 +66,11 @@ ...@@ -65,12 +66,11 @@
<div class="wizard-view" id="p2"> <div class="wizard-view" id="p2">
% if hints_exist: % if hints_exist:
<p> <p>
Choose the incorrect answer for which you want to write a hint: ${_('Choose the incorrect answer for which you want to write a hint:')}
</p> </p>
% else: % else:
<p> <p>
<em>Optional.</em> Help other students by submitting a hint! Pick one of your previous ${_('<em>Optional.</em> Help other students by submitting a hint! Pick one of your previous answers for which you would like to write a hint:')}
answers for which you would like to write a hint:
</p> </p>
% endif % endif
% for answer in user_submissions: % for answer in user_submissions:
...@@ -87,48 +87,40 @@ ...@@ -87,48 +87,40 @@
<div class="wizard-view" id="p3"> <div class="wizard-view" id="p3">
<p> <p>
Write a hint for other students who get the wrong answer of <span id="blank-answer"></span>. ${_('Write a hint for other students who get the wrong answer of')} <span id="blank-answer"></span>.
</p> </p>
<p>Read about <a class="expand" data-target="goodhint" href="javascript:void(0);">what makes a good hint</a>.</p> <p>${_('Read about <a class="expand" data-target="goodhint" href="javascript:void(0);">what makes a good hint')}</a>.</p>
<textarea cols="50" class="custom-hint" data-answer="${answer}" style="height: 200px"> <textarea cols="50" class="custom-hint" data-answer="${answer}" style="height: 200px">
Write your hint here. Please don't give away the correct answer. ${_('Write your hint here. Please don't give away the correct answer.')}
</textarea> </textarea>
<br /><br /> <br /><br />
<input class="submit-hint" data-answer="${answer}" type="button" value="Submit"> <input class="submit-hint" data-answer="${answer}" type="button" value="Submit">
<div id="goodhint" style="display:none"> <div id="goodhint" style="display:none">
<h4>What makes a good hint?</h4> <h4>${_('What makes a good hint?')}</h4>
<p>It depends on the type of problem you ran into. For stupid errors -- <p>${_('It depends on the type of problem you ran into. For stupid errors -- an arithmetic error or similar -- simply letting the student you'll be helping to check their signs is sufficient.')}</p>
an arithmetic error or similar -- simply letting the student you'll be
helping to check their signs is sufficient.</p>
<p>For deeper errors of understanding, the best hints allow students to <p>${_('For deeper errors of understanding, the best hints allow students to discover a contradiction in how they are thinking about the problem. An example that clearly demonstrates inconsistency or <a href="http://en.wikipedia.org/wiki/Cognitive_dissonance" target="_blank"> cognitive dissonace </a>is ideal, although in most cases, not possible.')}</p>
discover a contradiction in how they are thinking about the
problem. An example that clearly demonstrates inconsistency or
<a href="http://en.wikipedia.org/wiki/Cognitive_dissonance" target="_blank"> cognitive dissonace </a>
is ideal, although in most cases, not possible.</p>
<p> <p>
Good hints either: ${_('Good hints either:')}
<ul> <ul>
<li> Point out the specific misunderstanding your classmate might have </li> <li> ${_('Point out the specific misunderstanding your classmate might have')} </li>
<li> Point to concepts or theories where your classmates might have a <li> ${_('Point to concepts or theories where your classmates might have a misunderstanding')} </li>
misunderstanding </li> <li> ${_('Show simpler, analogous examples.')} </li>
<li> Show simpler, analogous examples. </li> <li> ${_('Provide references to relevant parts of the text')} </li>
<li> Provide references to relevant parts of the text </li>
</ul> </ul>
</p> </p>
<p>Still, remember even a crude hint -- virtually anything short of <p>${_('Still, remember even a crude hint -- virtually anything short of giving away the answer -- is better than no hint.')}</p>
giving away the answer -- is better than no hint.</p>
<p> <p>
<a href="http://www.apa.org/education/k12/misconceptions.aspx?item=2" target="_blank">Learn even more</a> <a href="http://www.apa.org/education/k12/misconceptions.aspx?item=2" target="_blank">${_('Learn even more')}</a>
</p> </p>
</div> </div>
<p class="bottom"> <p class="bottom">
<a href="javascript: void(0);" class="wizard-link" dest="p2"> Back </a> <a href="javascript: void(0);" class="wizard-link" dest="p2"> ${_('Back')} </a>
</p> </p>
</div> </div>
<!-- Close wizard contaner and wizard viewbox. --> <!-- Close wizard contaner and wizard viewbox. -->
...@@ -139,9 +131,9 @@ Write your hint here. Please don't give away the correct answer. ...@@ -139,9 +131,9 @@ Write your hint here. Please don't give away the correct answer.
<%def name="show_votes()"> <%def name="show_votes()">
% if hint_and_votes is UNDEFINED: % if hint_and_votes is UNDEFINED:
Sorry, but you've already voted! ${_('Sorry, but you\'ve already voted!')}
% else: % else:
Thank you for voting! ${_('Thank you for voting!
<br /> <br />
% for hint, votes in hint_and_votes: % for hint, votes in hint_and_votes:
<span style="color:green"> ${votes} votes. </span> <span style="color:green"> ${votes} votes. </span>
......
...@@ -77,7 +77,7 @@ discussion_link = get_discussion_link(course) if course else None ...@@ -77,7 +77,7 @@ discussion_link = get_discussion_link(course) if course else None
<input name="course_id" type="hidden" value="${course.id | h}"> <input name="course_id" type="hidden" value="${course.id | h}">
% endif % endif
<div class="submit"> <div class="submit">
<input name="submit" type="submit" value="Submit"> <input name="submit" type="submit" value="${_('Submit')}">
</div> </div>
</form> </form>
......
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