Commit e1e47793 by Gregory Martin

change help strings

parent 28e3b1cb
......@@ -39,7 +39,7 @@ class AnnotatableFields(object):
)
display_name = String(
display_name=_("Display Name"),
help=_("Display name for this module"),
help=_("The display name for this component."),
scope=Scope.settings,
default=_('Annotation'),
)
......
......@@ -92,7 +92,7 @@ class CapaFields(object):
"""
display_name = String(
display_name=_("Display Name"),
help=_("This name appears in the horizontal navigation at the top of the page."),
help=_("The display name for this component."),
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
......
......@@ -27,7 +27,7 @@ class ConditionalFields(object):
has_children = True
display_name = String(
display_name=_("Display Name"),
help=_("This name appears in the horizontal navigation at the top of the page."),
help=_("The display name for this component."),
scope=Scope.settings,
default=_('Conditional')
)
......
......@@ -38,7 +38,7 @@ class HtmlBlock(object):
"""
display_name = String(
display_name=_("Display Name"),
help=_("This name appears in the horizontal navigation at the top of the page."),
help=_("The display name for this component."),
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
......@@ -329,7 +329,7 @@ class HtmlDescriptor(HtmlBlock, XmlDescriptor, EditingDescriptor): # pylint: di
class AboutFields(object):
display_name = String(
help=_("Display name for this module"),
help=_("The display name for this component."),
scope=Scope.settings,
default="overview",
)
......@@ -364,7 +364,7 @@ class StaticTabFields(object):
"""
display_name = String(
display_name=_("Display Name"),
help=_("This name appears in the horizontal navigation at the top of the page."),
help=_("The display name for this component."),
scope=Scope.settings,
default="Empty",
)
......
......@@ -45,7 +45,7 @@ class AnnotatableFields(object):
"""))
display_name = String(
display_name=_("Display Name"),
help=_("Display name for this module"),
help=_("The display name for this component."),
scope=Scope.settings,
default=_('Image Annotation'),
)
......
......@@ -60,7 +60,7 @@ class LibraryContentFields(object):
# to locate input elements - keep synchronized
display_name = String(
display_name=_("Display Name"),
help=_("Display name for this module"),
help=_("The display name for this component."),
default="Randomized Content Block",
scope=Scope.settings,
)
......
......@@ -25,7 +25,7 @@ class LibraryRoot(XBlock):
resources_dir = None
display_name = String(
help=_("Enter the name of the library as it should appear in Studio."),
help=_("The display name for this component."),
default="Library",
display_name=_("Library Display Name"),
scope=Scope.settings
......
......@@ -109,7 +109,7 @@ class LTIFields(object):
display_name = String(
display_name=_("Display Name"),
help=_(
"Enter the name that students see for this component. "
"The display name for this component. "
"Analytics reports may also use the display name to identify this component."
),
scope=Scope.settings,
......
......@@ -23,20 +23,43 @@ from xmodule.xml_module import XmlDescriptor
from xblock.fields import Scope, String, Dict, Boolean, List
log = logging.getLogger(__name__)
_ = lambda text: text
class PollFields(object):
# Name of poll to use in links to this poll
display_name = String(help="Display name for this module", scope=Scope.settings)
voted = Boolean(help="Whether this student has voted on the poll", scope=Scope.user_state, default=False)
poll_answer = String(help="Student answer", scope=Scope.user_state, default='')
poll_answers = Dict(help="Poll answers from all students", scope=Scope.user_state_summary)
display_name = String(
help=_("The display name for this component."),
scope=Scope.settings
)
voted = Boolean(
help=_("Whether this student has voted on the poll"),
scope=Scope.user_state,
default=False
)
poll_answer = String(
help=_("Student answer"),
scope=Scope.user_state,
default=''
)
poll_answers = Dict(
help=_("Poll answers from all students"),
scope=Scope.user_state_summary
)
# List of answers, in the form {'id': 'some id', 'text': 'the answer text'}
answers = List(help="Poll answers from xml", scope=Scope.content, default=[])
question = String(help="Poll question", scope=Scope.content, default='')
answers = List(
help=_("Poll answers from xml"),
scope=Scope.content,
default=[]
)
question = String(
help=_("Poll question"),
scope=Scope.content,
default=''
)
class PollModule(PollFields, XModule):
......
......@@ -58,7 +58,7 @@ class SplitTestFields(object):
display_name = String(
display_name=_("Display Name"),
help=_("This name is used for organizing your course content, but is not shown to students."),
help=_("The display name for this component. (Not shown to learners)"),
scope=Scope.settings,
default=_("Content Experiment")
)
......
......@@ -37,8 +37,12 @@ class TestFields(object):
# Will not be returned by editable_metadata_fields because is not Scope.settings.
student_answers = Dict(scope=Scope.user_state)
# Will be returned, and can override the inherited value from XModule.
display_name = String(scope=Scope.settings, default='local default', display_name='Local Display Name',
help='local help')
display_name = String(
scope=Scope.settings,
default='local default',
display_name='Local Display Name',
help='local help'
)
# Used for testing select type, effect of to_json method
string_select = CrazyJsonString(
scope=Scope.settings,
......
......@@ -34,7 +34,7 @@ class AnnotatableFields(object):
"""))
display_name = String(
display_name=_("Display Name"),
help=_("Display name for this module"),
help=_("The display name for this component."),
scope=Scope.settings,
default=_('Text Annotation'),
)
......
......@@ -14,7 +14,7 @@ _ = lambda text: text
class VideoFields(object):
"""Fields for `VideoModule` and `VideoDescriptor`."""
display_name = String(
help=_("The name students see. This name appears in the course ribbon and as a header for the video."),
help=_("The display name for this component."),
display_name=_("Component Display Name"),
default="Video",
scope=Scope.settings
......
......@@ -34,7 +34,7 @@ class AnnotatableFields(object):
"""))
display_name = String(
display_name=_("Display Name"),
help=_("Display name for this module"),
help=_("The display name for this component."),
scope=Scope.settings,
default=_('Video Annotation'),
)
......
......@@ -38,7 +38,7 @@ class WordCloudFields(object):
"""XFields for word cloud."""
display_name = String(
display_name=_("Display Name"),
help=_("The label for this word cloud on the course page."),
help=_("The display name for this component."),
scope=Scope.settings,
default="Word cloud"
)
......
......@@ -66,6 +66,11 @@ STUDIO_VIEW = 'studio_view'
PREVIEW_VIEWS = [STUDENT_VIEW, AUTHOR_VIEW]
# Make '_' a no-op so we can scrape strings. Using lambda instead of
# `django.utils.translation.ugettext_noop` because Django cannot be imported in this file
_ = lambda text: text
class OpaqueKeyReader(IdReader):
"""
IdReader for :class:`DefinitionKey` and :class:`UsageKey`s.
......@@ -256,8 +261,8 @@ class XModuleFields(object):
Common fields for XModules.
"""
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=_("The display name for this component."),
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
......
......@@ -39,7 +39,7 @@ class DiscussionXBlock(XBlock, StudioEditableXBlockMixin, XmlParserMixin):
discussion_id = String(scope=Scope.settings, default=UNIQUE_ID)
display_name = String(
display_name=_("Display Name"),
help=_("Display name for this component"),
help=_("The display name for this component."),
default="Discussion",
scope=Scope.settings
)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment