Commit aaa719f9 by Will Daly

Add missing i18n strings

Add i18n to Travis build
parent dd3d9015
......@@ -7,6 +7,7 @@ before_script:
- "pip install coveralls"
script:
- "./scripts/test.sh"
- "./scripts/i18n.sh"
- "python setup.py install"
after_success:
coveralls
......@@ -121,15 +121,7 @@ To extract strings and compile messages:
.. code:: bash
python manage.py makemessages --all
python manage.py makemessages --all -d djangojs
python manage.py compilemessages
Generate dummy strings for testing:
.. code:: bash
i18n_tool dummy
./scripts/i18n.sh
License
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1a\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-05 06:31-0400\n"
"POT-Creation-Date: 2014-06-05 13:11-0400\n"
"PO-Revision-Date: 2014-06-04 15:41-0400\n"
"Last-Translator: \n"
"Language-Team: openedx-translation <openedx-translation@googlegroups.com>\n"
......@@ -35,22 +35,29 @@ msgid "Status of Your Response"
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:277
#: apps/openassessment/xblock/static/js/src/oa_response.js:200
msgid ""
"If you leave this page without saving or submitting your response, you'll "
"lose any work you've done on the response."
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:274
msgid "This response has not been saved."
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:295
#: apps/openassessment/xblock/static/js/src/oa_response.js:292
msgid "Saving..."
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:313
#: apps/openassessment/xblock/static/js/src/oa_response.js:310
msgid "This response has been saved but not submitted."
msgstr ""
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:316
#: apps/openassessment/xblock/static/js/src/oa_response.js:313
msgid "Error"
msgstr ""
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1a\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-05 06:31-0400\n"
"POT-Creation-Date: 2014-06-05 13:11-0400\n"
"PO-Revision-Date: 2014-06-04 15:41-0400\n"
"Last-Translator: \n"
"Language-Team: openedx-translation <openedx-translation@googlegroups.com>\n"
......@@ -37,22 +37,32 @@ msgid "Status of Your Response"
msgstr "Stätüs öf Ýöür Réspönsé Ⱡ'σяє#"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:277
#: apps/openassessment/xblock/static/js/src/oa_response.js:200
msgid ""
"If you leave this page without saving or submitting your response, you'll "
"lose any work you've done on the response."
msgstr ""
"Ìf ýöü léävé thïs pägé wïthöüt sävïng ör süßmïttïng ýöür réspönsé, ýöü'll "
"lösé äný wörk ýöü'vé döné ön thé réspönsé. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, "
"¢σηѕє¢т#"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:274
msgid "This response has not been saved."
msgstr "Thïs réspönsé häs nöt ßéén sävéd. Ⱡ'σяєм ι#"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:295
#: apps/openassessment/xblock/static/js/src/oa_response.js:292
msgid "Saving..."
msgstr "Sävïng... #"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:313
#: apps/openassessment/xblock/static/js/src/oa_response.js:310
msgid "This response has been saved but not submitted."
msgstr "Thïs réspönsé häs ßéén sävéd ßüt nöt süßmïttéd. Ⱡ'σяєм ιρѕυм #"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:316
#: apps/openassessment/xblock/static/js/src/oa_response.js:313
msgid "Error"
msgstr "Érrör Ⱡ'σяєм ι#"
......
......@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1a\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2014-06-05 06:31-0400\n"
"POT-Creation-Date: 2014-06-05 12:44-0400\n"
"PO-Revision-Date: 2014-06-04 15:41-0400\n"
"Last-Translator: \n"
"Language-Team: openedx-translation <openedx-translation@googlegroups.com>\n"
......@@ -37,22 +37,31 @@ msgid "Status of Your Response"
msgstr "Sʇɐʇns øɟ Ɏønɹ Ɍǝsdønsǝ"
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:277
#: apps/openassessment/xblock/static/js/src/oa_response.js:200
msgid ""
"If you leave this page without saving or submitting your response, you'll "
"lose any work you've done on the response."
msgstr ""
"Ɨɟ ʎøn lǝɐʌǝ ʇɥᴉs dɐƃǝ ʍᴉʇɥønʇ sɐʌᴉnƃ øɹ snbɯᴉʇʇᴉnƃ ʎønɹ ɹǝsdønsǝ, ʎøn'll "
"løsǝ ɐnʎ ʍøɹʞ ʎøn'ʌǝ dønǝ øn ʇɥǝ ɹǝsdønsǝ."
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:274
msgid "This response has not been saved."
msgstr "Ŧɥᴉs ɹǝsdønsǝ ɥɐs nøʇ bǝǝn sɐʌǝd."
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:295
#: apps/openassessment/xblock/static/js/src/oa_response.js:292
msgid "Saving..."
msgstr "Sɐʌᴉnƃ..."
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:313
#: apps/openassessment/xblock/static/js/src/oa_response.js:310
msgid "This response has been saved but not submitted."
msgstr "Ŧɥᴉs ɹǝsdønsǝ ɥɐs bǝǝn sɐʌǝd bnʇ nøʇ snbɯᴉʇʇǝd."
#: apps/openassessment/xblock/static/js/openassessment.min.js:1
#: apps/openassessment/xblock/static/js/src/oa_response.js:316
#: apps/openassessment/xblock/static/js/src/oa_response.js:313
msgid "Error"
msgstr "Ɇɹɹøɹ"
......
......@@ -11,18 +11,12 @@
<span class="wrapper--copy">
<span class="step__label">{% trans "Assess Peers" %}</span>
{% if peer_start %}
<span class="step__deadline">{% trans "available" %}
<span class="date">
{{ peer_start|utc|date:"N j, Y H:i e" }}
(in {{ peer_start|timeuntil }})
</span>
<span class="step__deadline">
{% blocktrans with start_date=peer_start|utc|date:"N j, Y H:i e" time_until=peer_start|timeuntil %}available <span class="date">{{ start_date }} (in {{ time_until }})</span>{% endblocktrans %}
</span>
{% elif peer_due %}
<span class="step__deadline">{% trans "due" %}
<span class="date">
{{ peer_due|utc|date:"N j, Y H:i e" }}
(in {{ peer_due|timeuntil }})
</span>
<span class="step__deadline">
{% blocktrans with due_date=peer_due|utc|date:"N j, Y H:i e" time_until=peer_due|timeuntil %}due <span class="date">{{ due_date }} (in {{ time_until }})</span>{% endblocktrans %}
</span>
{% endif %}
</span>
......@@ -33,9 +27,7 @@
<span class="step__status__label">{% trans "This step's status" %}:</span>
<span class="step__status__value">
<span class="copy">
{% trans "In Progress" %}
(<span class="step__status__value--completed">{{ graded }}</span> of
<span class="step__status__value--required">{{ must_grade }}</span>)
{% blocktrans with graded=graded must_grade=must_grade%}In Progress (<span class="step__status__value--completed">{{ graded }}</span> of <span class="step__status__value--required">{{ must_grade }}</span>){% endblocktrans %}
</span>
</span>
</span>
......@@ -55,10 +47,7 @@
<article class="peer-assessment" id="peer-assessment--001">
<div class="peer-assessment__display">
<header class="peer-assessment__display__header">
<h3 class="peer-assessment__display__title">{% trans "Assessment #" %}
<span class="peer-assessment__number--current">{{ review_num }}</span> of
<span class="peer-assessment__number--required">{{ must_grade }}</span>
</h3>
{% blocktrans with review_num=review_num must_grade=must_grade%}<h3 class="peer-assessment__display__title">Assessment # <span class="peer-assessment__number--current">{{ review_num }}</span> of <span class="peer-assessment__number--required">{{ must_grade }}</span></h3>{% endblocktrans %}
</header>
<div class="peer-assessment__display__response">
......
......@@ -11,9 +11,7 @@
<span class="step__status__value">
<span class="copy">
<i class="ico icon-warning-sign"></i>
{% trans "Incomplete" %}
(<span class="step__status__value--completed">{{ graded }}</span> of
<span class="step__status__value--required">{{ must_grade }}</span>)
{% blocktrans with graded=graded must_grade=must_grade %}Incomplete (<span class="step__status__value--completed">{{ graded }}</span> of <span class="step__status__value--required">{{ must_grade }}</span>){% endblocktrans %}
</span>
</span>
</span>
......
......@@ -11,9 +11,7 @@
<span class="step__status__value">
<i class="ico icon-ok"></i>
<span class="copy">
{% trans "Complete" %}
(<span class="step__status__value--completed">{{ graded }}</span> of
<span class="step__status__value--required">{{ must_grade }}</span>)
{% blocktrans with graded=graded must_grade=must_grade %}Complete (<span class="step__status__value--completed">{{ graded }}</span> of <span class="step__status__value--required">{{ must_grade }}</span>){% endblocktrans %}
</span>
</span>
</span>
......
......@@ -11,8 +11,7 @@
<span class="step__status__value">
<i class="ico icon-ok"></i>
<span class="copy">
{% trans "Complete" %}
(<span class="step__status__value--completed">{{ graded }}</span>)
{% blocktrans with graded=graded %}Complete (<span class="step__status__value--completed">{{ graded }}</span>){% endblocktrans %}
</span>
</span>
</span>
......
......@@ -11,8 +11,7 @@
<span class="step__status__value">
<i class="ico icon-ok"></i>
<span class="copy">
Complete
(<span class="step__status__value--completed">{{ graded }}</span>)
{% blocktrans with graded=graded %} Complete (<span class="step__status__value--completed">{{ graded }}</span>){% endblocktrans %}
</span>
</span>
</span>
......
......@@ -10,9 +10,7 @@
<span class="step__status__label">{% trans "This step's status" %}:</span>
<span class="step__status__value">
<span class="copy">
{% trans "In Progress" %}
(<span class="step__status__value--completed">{{ graded }}</span> of
<span class="step__status__value--required">{{ must_grade }}</span>)
{% blocktrans with graded=graded must_grade=must_grade %}In Progress (<span class="step__status__value--completed">{{ graded }}</span> of <span class="step__status__value--required">{{ must_grade }}</span>){% endblocktrans %}
</span>
</span>
</span>
......
......@@ -11,18 +11,12 @@
<span class="wrapper--copy">
<span class="step__label">{% trans "Your Response" %}</span>
{% if submission_start %}
<span class="step__deadline">available
<span class="date">
{{ submission_start|utc|date:"N j, Y H:i e" }}
(in {{ submission_start|timeuntil }})
</span>
<span class="step__deadline">
{% blocktrans with start_date=submission_start|utc|date:"N j, Y H:i e" time_until=submission_start|timeuntil %}available <span class="date">{{ start_date }} (in {{ time_until }})</span>{% endblocktrans %}
</span>
{% elif submission_due %}
<span class="step__deadline">due
<span class="date">
{{ submission_due|utc|date:"N j, Y H:i e" }}
(in {{ submission_due|timeuntil }})
</span>
<span class="step__deadline">
{% blocktrans with due_date=submission_due|utc|date:"N j, Y H:i e" time_until=submission_due|timeuntil %}due <span class="date"> {{ due_date }} (in {{ time_until }})</span>{% endblocktrans %}
</span>
{% endif %}
</span>
......@@ -75,7 +69,7 @@
<ul class="list list--actions">
<li class="list--actions__item">
<button type="submit" id="submission__save" class="action action--save submission__save is--disabled">Save Your Progress</button>
<button type="submit" id="submission__save" class="action action--save submission__save is--disabled">{% trans "Save Your Progress" %}</button>
<div id="response__save_status" class="response__submission__status">
<h3 class="response__submission__status__title">
......
......@@ -21,7 +21,7 @@
<div class="step__message message message--complete">
<h3 class="message__title">{% trans "Your Response Has Been Submitted" %}</h3>
<div class="message__content">{% trans "You'll receive your grade after some of your peers have assessed your response and you complete the <a data-behavior=\"ui-scroll\" href=\"#openassessment__peer-assessment\">peer assessment</a> and <a data-behavior=\"ui-scroll\" href=\"#openassessment__self-assessment\">self assessment</a> steps" %}.</div>
<div class="message__content">{% blocktrans %}You'll receive your grade after some of your peers have assessed your response and you complete the <a data-behavior=\"ui-scroll\" href=\"#openassessment__peer-assessment\">peer assessment</a> and <a data-behavior=\"ui-scroll\" href=\"#openassessment__self-assessment\">self assessment</a> steps{% endblocktrans %}.</div>
</div>
<div class="step__content">
......
{% extends "openassessmentblock/response/oa_response.html" %}
{% load i18n %}
{% block list_item %}
<li id="openassessment__response" class="openassessment__steps__step step--response is--empty is--unavailable is--collapsed">
......@@ -6,9 +7,9 @@
{% block title %}
<span class="step__status">
<span class="step__status__label">This step's status:</span>
<span class="step__status__label">{% trans "This step's status" %}:</span>
<span class="step__status__value">
<span class="copy">Not Available</span>
<span class="copy">{% trans "Not Available" %}</span>
</span>
</span>
{% endblock %}
......
......@@ -11,18 +11,12 @@
<span class="wrapper--copy">
<span class="step__label">{% trans "Assess Your Response" %}</span>
{% if self_start %}
<span class="step__deadline">{% trans "available" %}
<span class="date">
{{ self_start|utc|date:"N j, Y H:i e" }}
(in {{ self_start|timeuntil }})
</span>
<span class="step__deadline">
{% blocktrans with start_date=self_start|utc|date:"N j, Y H:i e" time_until=self_start|timeuntil %}available <span class="date">{{ start_date }} (in {{ time_until }})</span>{% endblocktrans %}
</span>
{% elif self_due %}
<span class="step__deadline">due
<span class="date">
{{ self_due|utc|date:"N j, Y H:i e" }}
(in {{ self_due|timeuntil }})
</span>
<span class="step__deadline">
{% blocktrans with due_date=self_due|utc|date:"N j, Y H:i e" time_until=self_due|timeuntil %}due <span class="date">{{ due_date }}</span> (in {{ time_until }}){% endblocktrans %}
</span>
{% endif %}
</span>
......
......@@ -11,17 +11,12 @@
<span class="wrapper--copy">
<span class="step__label">{% trans "Learn to Assess Responses" %}</span>
{% if training_start %}
<span class="step__deadline">{% trans "available" %}
<span class="date">
{{ training_start|utc|date:"N j, Y H:i e" }}
(in {{ training_start|timeuntil }})
<span class="step__deadline">
{% blocktrans with start_date=training_start|utc|date:"N j, Y H:i e" time_until=training_start|timeuntil %}available <span class="date"> {{ start_date }} (in {{ time_until }}) </span>{% endblocktrans %}
</span>
</span>
{% elif training_due %}
<span class="step__deadline">due
<span class="date">
{{ training_due|utc|date:"N j, Y H:i e" }}
(in {{ training_due|timeuntil }})
<span class="step__deadline">
{% blocktrans with due_date=training_due|utc|date:"N j, Y H:i e" time_until=training_due|timeuntil %}due <span class="date">{{ due_date }}</span> (in {{ time_until }}){% endblocktrans %}
</span>
</span>
{% endif %}
......@@ -64,9 +59,8 @@
<div class="step__content">
<article class="student-training__display" id="student-training">
<header class="student-training__display__header">
<h3 class="student-training__display__title">{% trans "Training Assessment #" %}
<span class="student-training__number--current">{{ training_num_current }}</span> of
<span class="student-training__number--required">{{ training_num_available }}</span>
<h3 class="student-training__display__title">
{% blocktrans with training_num_current=training_num_current training_num_available=training_num_available %}Training Assessment #<span class="student-training__number--current">{{ training_num_current }}</span> of <span class="student-training__number--required">{{ training_num_available }}</span>{% endblocktrans %}
</h3>
</header>
......
......@@ -179,17 +179,17 @@ class PeerAssessmentMixin(object):
context_dict["review_num"] = count + 1
if continue_grading:
context_dict["submit_button_text"] = (
context_dict["submit_button_text"] = _(
"Submit your assessment & review another response"
)
elif assessment["must_grade"] - count == 1:
context_dict["submit_button_text"] = (
context_dict["submit_button_text"] = _(
"Submit your assessment & move onto next step"
)
else:
context_dict["submit_button_text"] = (
"Submit your assessment & move to response #{}"
).format(count + 2)
context_dict["submit_button_text"] = _(
"Submit your assessment & move to response #{response_number}"
).format(response_number=(count + 2))
# Once a student has completed a problem, it stays complete,
# so this condition needs to be first.
......
......@@ -197,10 +197,7 @@ OpenAssessment.ResponseView.prototype = {
else {
if (enabled) {
window.onbeforeunload = function() {
return (
"If you leave this page without saving or submitting your response, " +
"you'll lose any work you've done on the response."
);
return gettext("If you leave this page without saving or submitting your response, you'll lose any work you've done on the response.");
};
}
else {
......
#!/usr/bin/env bash
cd `dirname $BASH_SOURCE` && cd ..
python manage.py makemessages --all
python manage.py makemessages --all -d djangojs
i18n_tool dummy
python manage.py compilemessages
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