From e48cc16d45ceda1ec8fe64b7092b2a1de25329c8 Mon Sep 17 00:00:00 2001 From: lduarte1991 Date: Mon, 9 Jun 2014 14:04:54 -0400 Subject: [PATCH] Annotations Tools: i18n Make stati strings extractable Original changes found in this commit https://github.com/edx/edx-platform/commit/a6bae4d238fdc6a60c8ee9f1b80ca 3512bb085eb Conflicts: common/lib/xmodule/xmodule/textannotation_module.py common/lib/xmodule/xmodule/videoannotation_module.py --- .../lib/xmodule/xmodule/imageannotation_module.py | 15 ++++++++++----- .../lib/xmodule/xmodule/textannotation_module.py | 4 +++- .../lib/xmodule/xmodule/videoannotation_module.py | 4 +++- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/common/lib/xmodule/xmodule/imageannotation_module.py b/common/lib/xmodule/xmodule/imageannotation_module.py index dd01d9ae2e..7a37b35334 100644 --- a/common/lib/xmodule/xmodule/imageannotation_module.py +++ b/common/lib/xmodule/xmodule/imageannotation_module.py @@ -13,10 +13,15 @@ from xblock.fragment import Fragment import textwrap +# Make '_' a no-op so we can scrape strings +_ = lambda text: text + class AnnotatableFields(object): """ Fields for `ImageModule` and `ImageDescriptor`. """ - data = String(help="XML data for the annotation", scope=Scope.content, default=textwrap.dedent("""\ + data = String(help=_("XML data for the annotation"), + scope=Scope.content, + default=textwrap.dedent("""\

@@ -37,14 +42,14 @@ class AnnotatableFields(object): """)) display_name = String( - display_name="Display Name", - help="Display name for this module", + display_name=_("Display Name"), + help=_("Display name for this module"), scope=Scope.settings, default='Image Annotation', ) instructor_tags = String( - display_name="Tags for Assignments", - help="Add tags that automatically highlight in a certain color using the comma-separated form, i.e. imagery:red,parallelism:blue", + display_name=_("Tags for Assignments"), + help=_("Add tags that automatically highlight in a certain color using the comma-separated form, i.e. imagery:red,parallelism:blue"), scope=Scope.settings, default='professor:green,teachingAssistant:blue', ) diff --git a/common/lib/xmodule/xmodule/textannotation_module.py b/common/lib/xmodule/xmodule/textannotation_module.py index 4504ac5b3b..35b1fd8c96 100644 --- a/common/lib/xmodule/xmodule/textannotation_module.py +++ b/common/lib/xmodule/xmodule/textannotation_module.py @@ -17,7 +17,9 @@ _ = lambda text: text class AnnotatableFields(object): """Fields for `TextModule` and `TextDescriptor`.""" - data = String(help=_("XML data for the annotation"), scope=Scope.content, default=textwrap.dedent("""\ + data = String(help=_("XML data for the annotation"), + scope=Scope.content, + default=textwrap.dedent("""\

diff --git a/common/lib/xmodule/xmodule/videoannotation_module.py b/common/lib/xmodule/xmodule/videoannotation_module.py index 03fc2f75e3..6a8584505b 100644 --- a/common/lib/xmodule/xmodule/videoannotation_module.py +++ b/common/lib/xmodule/xmodule/videoannotation_module.py @@ -19,7 +19,9 @@ _ = lambda text: text class AnnotatableFields(object): """ Fields for `VideoModule` and `VideoDescriptor`. """ - data = String(help=_("XML data for the annotation"), scope=Scope.content, default=textwrap.dedent("""\ + data = String(help=_("XML data for the annotation"), + scope=Scope.content, + default=textwrap.dedent("""\