@@ -19,26 +19,29 @@ from xblock.core import XBlock
...
@@ -19,26 +19,29 @@ from xblock.core import XBlock
log=logging.getLogger("edx.courseware")
log=logging.getLogger("edx.courseware")
# Make '_' a no-op so we can scrape strings
_=lambdatext:text
classHtmlFields(object):
classHtmlFields(object):
display_name=String(
display_name=String(
display_name="Display Name",
display_name=_("Display Name"),
help="This name appears in the horizontal navigation at the top of the page.",
help=_("This name appears in the horizontal navigation at the top of the page."),
scope=Scope.settings,
scope=Scope.settings,
# it'd be nice to have a useful default but it screws up other things; so,
# it'd be nice to have a useful default but it screws up other things; so,
# use display_name_with_default for those
# use display_name_with_default for those
default="Text"
default="Text"
)
)
data=String(help="Html contents to display for this module",default=u"",scope=Scope.content)
data=String(help=_("Html contents to display for this module"),default=u"",scope=Scope.content)
source_code=String(help="Source code for LaTeX documents. This feature is not well-supported.",scope=Scope.settings)
source_code=String(help=_("Source code for LaTeX documents. This feature is not well-supported."),scope=Scope.settings)
use_latex_compiler=Boolean(
use_latex_compiler=Boolean(
help="Enable LaTeX templates?",
help=_("Enable LaTeX templates?"),
default=False,
default=False,
scope=Scope.settings
scope=Scope.settings
)
)
editor=String(
editor=String(
help="Select Visual to enter content and have the editor automatically create the HTML. Select Raw to edit HTML directly. If you change this setting, you must save the component and then re-open it for editing.",
help=_("Select Visual to enter content and have the editor automatically create the HTML. Select Raw to edit HTML directly. If you change this setting, you must save the component and then re-open it for editing."),
display_name="Editor",
display_name=_("Editor"),
default="visual",
default="visual",
values=[
values=[
{"display_name":"Visual","value":"visual"},
{"display_name":"Visual","value":"visual"},
...
@@ -234,12 +237,12 @@ class HtmlDescriptor(HtmlFields, XmlDescriptor, EditingDescriptor):
...
@@ -234,12 +237,12 @@ class HtmlDescriptor(HtmlFields, XmlDescriptor, EditingDescriptor):
classAboutFields(object):
classAboutFields(object):
display_name=String(
display_name=String(
help="Display name for this module",
help=_("Display name for this module"),
scope=Scope.settings,
scope=Scope.settings,
default="overview",
default="overview",
)
)
data=String(
data=String(
help="Html contents to display for this module",
help=_("Html contents to display for this module"),
default=u"",
default=u"",
scope=Scope.content
scope=Scope.content
)
)
...
@@ -268,8 +271,8 @@ class StaticTabFields(object):
...
@@ -268,8 +271,8 @@ class StaticTabFields(object):
The overrides for Static Tabs
The overrides for Static Tabs
"""
"""
display_name=String(
display_name=String(
display_name="Display Name",
display_name=_("Display Name"),
help="This name appears in the horizontal navigation at the top of the page.",
help=_("This name appears in the horizontal navigation at the top of the page."),
scope=Scope.settings,
scope=Scope.settings,
default="Empty",
default="Empty",
)
)
...
@@ -278,7 +281,7 @@ class StaticTabFields(object):
...
@@ -278,7 +281,7 @@ class StaticTabFields(object):
<p>Add the content you want students to see on this page.</p>
<p>Add the content you want students to see on this page.</p>
"""),
"""),
scope=Scope.content,
scope=Scope.content,
help="HTML for the additional pages"
help=_("HTML for the additional pages")
)
)
...
@@ -305,12 +308,12 @@ class CourseInfoFields(object):
...
@@ -305,12 +308,12 @@ class CourseInfoFields(object):
Field overrides
Field overrides
"""
"""
items=List(
items=List(
help="List of course update items",
help=_("List of course update items"),
default=[],
default=[],
scope=Scope.content
scope=Scope.content
)
)
data=String(
data=String(
help="Html contents to display for this module",
help=_("Html contents to display for this module"),
@@ -10,10 +10,13 @@ from xmodule.annotator_token import retrieve_token
...
@@ -10,10 +10,13 @@ from xmodule.annotator_token import retrieve_token
importtextwrap
importtextwrap
# Make '_' a no-op so we can scrape strings
_=lambdatext:text
classAnnotatableFields(object):
classAnnotatableFields(object):
"""Fields for `TextModule` and `TextDescriptor`."""
"""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("""\
<annotatable>
<annotatable>
<instructions>
<instructions>
<p>
<p>
...
@@ -26,25 +29,25 @@ class AnnotatableFields(object):
...
@@ -26,25 +29,25 @@ class AnnotatableFields(object):
</annotatable>
</annotatable>
"""))
"""))
display_name=String(
display_name=String(
display_name="Display Name",
display_name=_("Display Name"),
help="Display name for this module",
help=_("Display name for this module"),
scope=Scope.settings,
scope=Scope.settings,
default='Text Annotation',
default='Text Annotation',
)
)
instructor_tags=String(
instructor_tags=String(
display_name="Tags for Assignments",
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",
help=_("Add tags that automatically highlight in a certain color using the comma-separated form, i.e. imagery:red,parallelism:blue"),
scope=Scope.settings,
scope=Scope.settings,
default='imagery:red,parallelism:blue',
default='imagery:red,parallelism:blue',
)
)
source=String(
source=String(
display_name="Source/Citation",
display_name=_("Source/Citation"),
help="Optional for citing source of any material used. Automatic citation can be done using <a href=\"http://easybib.com\">EasyBib</a>",
help=_("Optional for citing source of any material used. Automatic citation can be done using <a href=\"http://easybib.com\">EasyBib</a>"),
scope=Scope.settings,
scope=Scope.settings,
default='None',
default='None',
)
)
annotation_storage_url=String(help="Location of Annotation backend",scope=Scope.settings,default="http://your_annotation_storage.com",display_name="Url for Annotation Storage")
annotation_storage_url=String(help=_("Location of Annotation backend"),scope=Scope.settings,default="http://your_annotation_storage.com",display_name=_("Url for Annotation Storage"))
annotation_token_secret=String(help="Secret string for annotation storage",scope=Scope.settings,default="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",display_name="Secret Token String for Annotation")
annotation_token_secret=String(help=_("Secret string for annotation storage"),scope=Scope.settings,default="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",display_name=_("Secret Token String for Annotation"))
@@ -11,10 +11,13 @@ from xmodule.annotator_token import retrieve_token
...
@@ -11,10 +11,13 @@ from xmodule.annotator_token import retrieve_token
importtextwrap
importtextwrap
# Make '_' a no-op so we can scrape strings
_=lambdatext:text
classAnnotatableFields(object):
classAnnotatableFields(object):
""" Fields for `VideoModule` and `VideoDescriptor`. """
""" 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("""\
<annotatable>
<annotatable>
<instructions>
<instructions>
<p>
<p>
...
@@ -24,15 +27,15 @@ class AnnotatableFields(object):
...
@@ -24,15 +27,15 @@ class AnnotatableFields(object):
</annotatable>
</annotatable>
"""))
"""))
display_name=String(
display_name=String(
display_name="Display Name",
display_name=_("Display Name"),
help="Display name for this module",
help=_("Display name for this module"),
scope=Scope.settings,
scope=Scope.settings,
default='Video Annotation',
default='Video Annotation',
)
)
sourceurl=String(help="The external source URL for the video.",display_name="Source URL",scope=Scope.settings,default="http://video-js.zencoder.com/oceans-clip.mp4")
sourceurl=String(help=_("The external source URL for the video."),display_name=_("Source URL"),scope=Scope.settings,default="http://video-js.zencoder.com/oceans-clip.mp4")
annotation_storage_url=String(help="Location of Annotation backend",scope=Scope.settings,default="http://your_annotation_storage.com",display_name="Url for Annotation Storage")
annotation_storage_url=String(help=_("Location of Annotation backend"),scope=Scope.settings,default="http://your_annotation_storage.com",display_name=_("Url for Annotation Storage"))
annotation_token_secret=String(help="Secret string for annotation storage",scope=Scope.settings,default="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",display_name="Secret Token String for Annotation")
annotation_token_secret=String(help=_("Secret string for annotation storage"),scope=Scope.settings,default="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",display_name=_("Secret Token String for Annotation"))