@@ -19,26 +19,29 @@ from xblock.core import XBlock
log=logging.getLogger("edx.courseware")
# Make '_' a no-op so we can scrape strings
_=lambdatext:text
classHtmlFields(object):
display_name=String(
display_name="Display Name",
help="This name appears in the horizontal navigation at the top of the page.",
display_name=_("Display Name"),
help=_("This name appears in the horizontal navigation at the top of the page."),
scope=Scope.settings,
# it'd be nice to have a useful default but it screws up other things; so,
# use display_name_with_default for those
default="Text"
)
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)
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)
use_latex_compiler=Boolean(
help="Enable LaTeX templates?",
help=_("Enable LaTeX templates?"),
default=False,
scope=Scope.settings
)
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.",
display_name="Editor",
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"),
default="visual",
values=[
{"display_name":"Visual","value":"visual"},
...
...
@@ -234,12 +237,12 @@ class HtmlDescriptor(HtmlFields, XmlDescriptor, EditingDescriptor):
classAboutFields(object):
display_name=String(
help="Display name for this module",
help=_("Display name for this module"),
scope=Scope.settings,
default="overview",
)
data=String(
help="Html contents to display for this module",
help=_("Html contents to display for this module"),
default=u"",
scope=Scope.content
)
...
...
@@ -268,8 +271,8 @@ class StaticTabFields(object):
The overrides for Static Tabs
"""
display_name=String(
display_name="Display Name",
help="This name appears in the horizontal navigation at the top of the page.",
display_name=_("Display Name"),
help=_("This name appears in the horizontal navigation at the top of the page."),
scope=Scope.settings,
default="Empty",
)
...
...
@@ -278,7 +281,7 @@ class StaticTabFields(object):
<p>Add the content you want students to see on this page.</p>
"""),
scope=Scope.content,
help="HTML for the additional pages"
help=_("HTML for the additional pages")
)
...
...
@@ -305,12 +308,12 @@ class CourseInfoFields(object):
Field overrides
"""
items=List(
help="List of course update items",
help=_("List of course update items"),
default=[],
scope=Scope.content
)
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
importtextwrap
# Make '_' a no-op so we can scrape strings
_=lambdatext:text
classAnnotatableFields(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("""\
<annotatable>
<instructions>
<p>
...
...
@@ -26,25 +29,25 @@ class AnnotatableFields(object):
</annotatable>
"""))
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='Text 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='imagery:red,parallelism:blue',
)
source=String(
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>",
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>"),
scope=Scope.settings,
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_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_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"))
@@ -11,10 +11,13 @@ from xmodule.annotator_token import retrieve_token
importtextwrap
# Make '_' a no-op so we can scrape strings
_=lambdatext:text
classAnnotatableFields(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("""\
<annotatable>
<instructions>
<p>
...
...
@@ -24,15 +27,15 @@ class AnnotatableFields(object):
</annotatable>
"""))
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='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")
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")
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_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"))