The answer is 2*x^2*y + 5
@@ -49,4 +49,4 @@
-
\ No newline at end of file
+
diff --git a/common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee b/common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee
index 9d58fcacf6..ddb5f1b0f6 100644
--- a/common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee
+++ b/common/lib/xmodule/xmodule/js/spec/capa/display_spec.coffee
@@ -93,7 +93,7 @@ describe 'Problem', ->
@problem.el.data('progress_status', 'foo')
@problem.el.data('progress_detail', '1/1')
@problem.renderProgressState()
- expect(@problem.$('.problem-progress').html()).toEqual "(1/1 points)"
+ expect(@problem.$('.problem-progress').html()).toEqual "(1/1 point)"
describe 'render', ->
beforeEach ->
diff --git a/common/lib/xmodule/xmodule/js/src/capa/display.coffee b/common/lib/xmodule/xmodule/js/src/capa/display.coffee
index db85b5af7f..4a193cc418 100644
--- a/common/lib/xmodule/xmodule/js/src/capa/display.coffee
+++ b/common/lib/xmodule/xmodule/js/src/capa/display.coffee
@@ -39,17 +39,25 @@ class @Problem
renderProgressState: =>
detail = @el.data('progress_detail')
status = @el.data('progress_status')
- # i18n
- progress = "(#{detail} points)"
+
+ # Render 'x/y point(s)' if student has attempted question
+ if status != 'none' and detail? and detail.indexOf('/') > 0
+ a = detail.split('/')
+ earned = parseFloat(a[0])
+ possible = parseFloat(a[1])
+ # This comment needs to be on one line to be properly scraped for the translators. Sry for length.
+ `// Translators: %(earned)s is the number of points earned. %(total)s is the total number of points (examples: 0/1, 1/1, 2/3, 5/10). The total number of points will always be at least 1. We pluralize based on the total number of points (example: 0/1 point; 1/2 points)`
+ progress_template = ngettext('(%(earned)s/%(possible)s point)', '(%(earned)s/%(possible)s points)', possible)
+ progress = interpolate(progress_template, {'earned': earned, 'possible': possible}, true)
+
+ # Render 'x point(s) possible' if student has not yet attempted question
if status == 'none' and detail? and detail.indexOf('/') > 0
a = detail.split('/')
possible = parseFloat(a[1])
- if possible == 1
- # i18n
- progress = "(#{possible} point possible)"
- else
- # i18n
- progress = "(#{possible} points possible)"
+ `// Translators: %(num_points)s is the number of points possible (examples: 1, 3, 10). There will always be at least 1 point possible.`
+ progress_template = ngettext("(%(num_points)s point possible)", "(%(num_points)s points possible)", possible)
+ progress = interpolate(progress_template, {'num_points': possible}, true)
+
@$('.problem-progress').html(progress)
updateProgress: (response) =>
diff --git a/conf/locale/eo/LC_MESSAGES/django.mo b/conf/locale/eo/LC_MESSAGES/django.mo
index a5299c9d92..ada1ef24bd 100644
Binary files a/conf/locale/eo/LC_MESSAGES/django.mo and b/conf/locale/eo/LC_MESSAGES/django.mo differ
diff --git a/conf/locale/eo/LC_MESSAGES/django.po b/conf/locale/eo/LC_MESSAGES/django.po
index da80cab8e6..a5597cd979 100644
--- a/conf/locale/eo/LC_MESSAGES/django.po
+++ b/conf/locale/eo/LC_MESSAGES/django.po
@@ -37,7 +37,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
-"POT-Creation-Date: 2014-02-11 15:31-0500\n"
+"POT-Creation-Date: 2014-02-11 18:20-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
diff --git a/conf/locale/eo/LC_MESSAGES/djangojs.mo b/conf/locale/eo/LC_MESSAGES/djangojs.mo
index f26ad64c99..97dacab201 100644
Binary files a/conf/locale/eo/LC_MESSAGES/djangojs.mo and b/conf/locale/eo/LC_MESSAGES/djangojs.mo differ
diff --git a/conf/locale/eo/LC_MESSAGES/djangojs.po b/conf/locale/eo/LC_MESSAGES/djangojs.po
index 1d4d399502..9c3d87d1c9 100644
--- a/conf/locale/eo/LC_MESSAGES/djangojs.po
+++ b/conf/locale/eo/LC_MESSAGES/djangojs.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1a\n"
"Report-Msgid-Bugs-To: openedx-translation@googlegroups.com\n"
-"POT-Creation-Date: 2014-02-11 15:30-0500\n"
-"PO-Revision-Date: 2014-02-11 20:31:26.169682\n"
+"POT-Creation-Date: 2014-02-11 18:19-0500\n"
+"PO-Revision-Date: 2014-02-11 23:20:19.199916\n"
"Last-Translator: \n"
"Language-Team: openedx-translation \n"
"MIME-Version: 1.0\n"
@@ -60,6 +60,24 @@ msgstr "Çömméntärý Ⱡ#"
msgid "Reply to Annotation"
msgstr "Réplý tö Ànnötätïön Ⱡ'σя#"
+#. Translators: %(earned)s is the number of points earned. %(total)s is the
+#. total number of points (examples: 0/1, 1/1, 2/3, 5/10). The total number of
+#. points will always be at least 1. We pluralize based on the total number of
+#. points (example: 0/1 point; 1/2 points);
+#: common/lib/xmodule/xmodule/js/src/capa/display.js
+msgid "(%(earned)s/%(possible)s point)"
+msgid_plural "(%(earned)s/%(possible)s points)"
+msgstr[0] "(%(earned)s/%(possible)s pöïnt) Ⱡ'#"
+msgstr[1] "(%(earned)s/%(possible)s pöïnts) Ⱡ'σ#"
+
+#. Translators: %(num_points)s is the number of points possible (examples: 1,
+#. 3, 10). There will always be at least 1 point possible.;
+#: common/lib/xmodule/xmodule/js/src/capa/display.js
+msgid "(%(num_points)s point possible)"
+msgid_plural "(%(num_points)s points possible)"
+msgstr[0] "(%(num_points)s pöïnt pössïßlé) Ⱡ'σя#"
+msgstr[1] "(%(num_points)s pöïnts pössïßlé) Ⱡ'σя#"
+
#. Translators: the word Answer here refers to the answer to a problem the
#. student must solve.;
#: common/lib/xmodule/xmodule/js/src/capa/display.js
diff --git a/lms/djangoapps/courseware/features/problems.feature b/lms/djangoapps/courseware/features/problems.feature
index 8e2d937b71..960cfc4a0a 100644
--- a/lms/djangoapps/courseware/features/problems.feature
+++ b/lms/djangoapps/courseware/features/problems.feature
@@ -146,23 +146,23 @@ Feature: LMS.Answer problems
Examples:
| ProblemType | Correctness | Score | Points Possible |
- | drop down | correct | 1/1 points | 1 point possible |
+ | drop down | correct | 1/1 point | 1 point possible |
| drop down | incorrect | 1 point possible | 1 point possible |
- | multiple choice | correct | 1/1 points | 1 point possible |
+ | multiple choice | correct | 1/1 point | 1 point possible |
| multiple choice | incorrect | 1 point possible | 1 point possible |
- | checkbox | correct | 1/1 points | 1 point possible |
+ | checkbox | correct | 1/1 point | 1 point possible |
| checkbox | incorrect | 1 point possible | 1 point possible |
- | radio | correct | 1/1 points | 1 point possible |
+ | radio | correct | 1/1 point | 1 point possible |
| radio | incorrect | 1 point possible | 1 point possible |
- | string | correct | 1/1 points | 1 point possible |
+ | string | correct | 1/1 point | 1 point possible |
| string | incorrect | 1 point possible | 1 point possible |
- | numerical | correct | 1/1 points | 1 point possible |
+ | numerical | correct | 1/1 point | 1 point possible |
| numerical | incorrect | 1 point possible | 1 point possible |
- | formula | correct | 1/1 points | 1 point possible |
+ | formula | correct | 1/1 point | 1 point possible |
| formula | incorrect | 1 point possible | 1 point possible |
| script | correct | 2/2 points | 2 points possible |
| script | incorrect | 2 points possible | 2 points possible |
- | image | correct | 1/1 points | 1 point possible |
+ | image | correct | 1/1 point | 1 point possible |
| image | incorrect | 1 point possible | 1 point possible |
Scenario: I can see my score on a problem to which I submit a blank answer