diff --git a/cms/djangoapps/contentstore/courseware_index.py b/cms/djangoapps/contentstore/courseware_index.py index 9d8742f302..e030d6844b 100644 --- a/cms/djangoapps/contentstore/courseware_index.py +++ b/cms/djangoapps/contentstore/courseware_index.py @@ -159,7 +159,7 @@ class CoursewareSearchIndexer(object): error_list.append(_('General indexing error occurred')) if error_list: - raise SearchIndexingError(_('Error(s) present during indexing'), error_list) + raise SearchIndexingError('Error(s) present during indexing', error_list) return indexed_count["count"] diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index 10f2bfed56..a50cbc2e16 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -813,8 +813,14 @@ def create_xblock_info(xblock, data=None, metadata=None, include_ancestor_info=F if parent_xblock is None: parent_xblock = get_parent_xblock(xblock) - explanatory_message = _('Students must score {score}% or higher to access course materials.').format( - score=int(parent_xblock.entrance_exam_minimum_score_pct * 100)) + # Translators: The {pct_sign} here represents the percent sign, i.e., '%' + # in many languages. This is used to avoid Transifex's misinterpreting of + # '% o'. The percent sign is also translatable as a standalone string. + explanatory_message = _('Students must score {score}{pct_sign} or higher to access course materials.').format( + score=int(parent_xblock.entrance_exam_minimum_score_pct * 100), + # Translators: This is the percent sign. It will be used to represent + # a percent value out of 100, e.g. "58%" means "58/100". + pct_sign=_('%')) xblock_info = { "id": unicode(xblock.location), diff --git a/cms/static/js/models/settings/course_details.js b/cms/static/js/models/settings/course_details.js index 0b2124975a..c3bff857fd 100644 --- a/cms/static/js/models/settings/course_details.js +++ b/cms/static/js/models/settings/course_details.js @@ -53,8 +53,7 @@ var CourseDetails = Backbone.Model.extend({ max: 100 }; if(!ValidationHelpers.validateIntegerRange(newattrs.entrance_exam_minimum_score_pct, range)){ - errors.entrance_exam_minimum_score_pct = gettext("Please enter an integer between " - + range.min +" and "+ range.max +"."); + errors.entrance_exam_minimum_score_pct = interpolate(gettext("Please enter an integer between %(min)s and %(max)s."), range, true); } } if (!_.isEmpty(errors)) return errors; diff --git a/cms/templates/activation_invalid.html b/cms/templates/activation_invalid.html index 07265f3077..60a7954a56 100644 --- a/cms/templates/activation_invalid.html +++ b/cms/templates/activation_invalid.html @@ -17,7 +17,7 @@

${_("Your account activation is invalid")}

-

${_("We're sorry. Something went wrong with your activation. Check to make sure the URL you went to was correct — e-mail programs will sometimes split it into two lines.")}

+

${_("We're sorry. Something went wrong with your activation. Check to make sure the URL you went to was correct, as e-mail programs will sometimes split it into two lines.")}

${_("If you still have issues, contact {platform_name} Support. In the meantime, you can also return to {link_start}the {studio_name} homepage.{link_end}").format( platform_name=settings.PLATFORM_NAME, studio_name=settings.STUDIO_NAME, link_start='', link_end="" diff --git a/cms/templates/js/checklist.underscore b/cms/templates/js/checklist.underscore index 2dd3eab2ea..1bf9653173 100644 --- a/cms/templates/js/checklist.underscore +++ b/cms/templates/js/checklist.underscore @@ -7,7 +7,17 @@ <% } %> id="<%= 'course-checklist' + checklistIndex %>"> - <%= _.template(gettext("{number}% of checklists completed"), {number: '' + percentChecked + ''}, {interpolate: /\{(.+?)\}/g}) %> + <%= _.template( + // Translators: The {pct_sign} here represents the percent sign, i.e., '%' + // in many languages. This is used to avoid Transifex's misinterpreting of + // '% o'. The percent sign is also translatable as a standalone string. + gettext("{number}{pct_sign} of checklists completed"), + // Translators: This is the percent sign. It will be used to represent a + // percent value out of 100, e.g. "58%" means "58/100". + {number: '' + percentChecked + '', pct_sign: gettext('%')}, + {interpolate: /\{(.+?)\}/g} + ) + %>

diff --git a/cms/templates/js/mock/mock-container-page.underscore b/cms/templates/js/mock/mock-container-page.underscore index 0abcc3f9cd..6a4474d6bd 100644 --- a/cms/templates/js/mock/mock-container-page.underscore +++ b/cms/templates/js/mock/mock-container-page.underscore @@ -67,12 +67,12 @@
-

${_("Unit Location")}

+

Unit Location

Unit Location ID

${unit.location.name} - Tip: ${_("Use this ID when you create links to this unit from other course content. You enter the ID in the URL field.")} + Tip: Use this ID when you create links to this unit from other course content. You enter the ID in the URL field.

diff --git a/cms/templates/js/mock/mock-index-page.underscore b/cms/templates/js/mock/mock-index-page.underscore index 737234ff8d..441b0fb14f 100644 --- a/cms/templates/js/mock/mock-index-page.underscore +++ b/cms/templates/js/mock/mock-index-page.underscore @@ -209,8 +209,8 @@
diff --git a/cms/templates/js/mock/mock-settings-page.underscore b/cms/templates/js/mock/mock-settings-page.underscore index 1dd28b53b9..41a00463b0 100644 --- a/cms/templates/js/mock/mock-settings-page.underscore +++ b/cms/templates/js/mock/mock-settings-page.underscore @@ -74,17 +74,17 @@ Course that students must complete before beginning this course -

${_("Entrance Exam")}

+

Entrance Exam

- +
-

${_("To create your course entrance exam, go to the ")}${_("Course Outline")}${_(". An Entrance Exam section will be created automatically.")}

-

-

${_(" %")}

-

${_("The minimum score a student must receive to pass the entrance exam.")}

+

To create your course entrance exam, go to the Course Outline. An Entrance Exam section will be created automatically.

+

+

%

+

The minimum score a student must receive to pass the entrance exam.

diff --git a/cms/templates/js/mock/mock-xmodule-editor.underscore b/cms/templates/js/mock/mock-xmodule-editor.underscore index 8fa46133d6..371fad7808 100644 --- a/cms/templates/js/mock/mock-xmodule-editor.underscore +++ b/cms/templates/js/mock/mock-xmodule-editor.underscore @@ -18,8 +18,8 @@
\t \t - \t
<%= model.get('help') %> diff --git a/cms/templates/js/mock/mock-xmodule-settings-only-editor.underscore b/cms/templates/js/mock/mock-xmodule-settings-only-editor.underscore index e699550f36..325cc06e10 100644 --- a/cms/templates/js/mock/mock-xmodule-settings-only-editor.underscore +++ b/cms/templates/js/mock/mock-xmodule-settings-only-editor.underscore @@ -14,8 +14,8 @@
\t \t - \t
<%= model.get('help') %> diff --git a/cms/templates/js/video/transcripts/messages/transcripts-choose.underscore b/cms/templates/js/video/transcripts/messages/transcripts-choose.underscore index 964e5243f2..9869c40e38 100644 --- a/cms/templates/js/video/transcripts/messages/transcripts-choose.underscore +++ b/cms/templates/js/video/transcripts/messages/transcripts-choose.underscore @@ -18,7 +18,7 @@ <% _.each(html5_list, function(value, index) { var type = grouped_list[value][0].type, file_name = value + ((type) ? ('.' + type) : ''), - message = gettext("Timed Transcript from ") + file_name; + message = interpolate(gettext("Timed Transcript from %(filename)s"), { filename: file_name }, true); %>