i18n: More extractable & localizable strings in xmodules
This commit is contained in:
@@ -38,7 +38,7 @@ class AnnotatableFields(object):
|
|||||||
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='Annotation',
|
default=_('Annotation'),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ class CombinedOpenEndedFields(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."),
|
||||||
default="Open Response Assessment",
|
default=_("Open Response Assessment"),
|
||||||
scope=Scope.settings
|
scope=Scope.settings
|
||||||
)
|
)
|
||||||
current_task_number = Integer(
|
current_task_number = Integer(
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ class HtmlFields(object):
|
|||||||
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)
|
||||||
@@ -44,8 +44,8 @@ class HtmlFields(object):
|
|||||||
display_name=_("Editor"),
|
display_name=_("Editor"),
|
||||||
default="visual",
|
default="visual",
|
||||||
values=[
|
values=[
|
||||||
{"display_name": "Visual", "value": "visual"},
|
{"display_name": _("Visual"), "value": "visual"},
|
||||||
{"display_name": "Raw", "value": "raw"}
|
{"display_name": _("Raw"), "value": "raw"}
|
||||||
],
|
],
|
||||||
scope=Scope.settings
|
scope=Scope.settings
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ from xmodule.annotator_token import retrieve_token
|
|||||||
|
|
||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
|
# Make '_' a no-op so we can scrape strings
|
||||||
|
_ = lambda text: text
|
||||||
|
|
||||||
|
|
||||||
class AnnotatableFields(object):
|
class AnnotatableFields(object):
|
||||||
""" Fields for `ImageModule` and `ImageDescriptor`. """
|
""" Fields for `ImageModule` and `ImageDescriptor`. """
|
||||||
@@ -36,28 +39,28 @@ 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='Image Annotation',
|
default=_('Image 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='professor:green,teachingAssistant:blue',
|
default='professor:green,teachingAssistant:blue',
|
||||||
)
|
)
|
||||||
annotation_storage_url = String(
|
annotation_storage_url = String(
|
||||||
help="Location of Annotation backend",
|
help=_("Location of Annotation backend"),
|
||||||
scope=Scope.settings,
|
scope=Scope.settings,
|
||||||
default="http://your_annotation_storage.com",
|
default="http://your_annotation_storage.com",
|
||||||
display_name="Url for Annotation Storage"
|
display_name=_("Url for Annotation Storage")
|
||||||
)
|
)
|
||||||
annotation_token_secret = String(
|
annotation_token_secret = String(
|
||||||
help="Secret string for annotation storage",
|
help=_("Secret string for annotation storage"),
|
||||||
scope=Scope.settings,
|
scope=Scope.settings,
|
||||||
default="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
default="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
||||||
display_name="Secret Token String for Annotation"
|
display_name=_("Secret Token String for Annotation")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class PeerGradingFields(object):
|
|||||||
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="Peer Grading Interface"
|
default=_("Peer Grading Interface")
|
||||||
)
|
)
|
||||||
data = String(
|
data = String(
|
||||||
help=_("Html contents to display for this module"),
|
help=_("Html contents to display for this module"),
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class AnnotatableFields(object):
|
|||||||
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"),
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class AnnotatableFields(object):
|
|||||||
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")
|
||||||
poster_url = String(help=_("Poster Image URL"), display_name=_("Poster URL"), scope=Scope.settings, default="")
|
poster_url = String(help=_("Poster Image URL"), display_name=_("Poster URL"), scope=Scope.settings, default="")
|
||||||
|
|||||||
Reference in New Issue
Block a user