Commit fa0e958b by srpearce

Merge pull request #3650 from edx/sylvia/docs/DOC-206

Sylvia/docs/doc 206
parents dbb87e26 c1ef41fe
...@@ -17,16 +17,16 @@ TEST_ROOT = settings.COMMON_TEST_DATA_ROOT ...@@ -17,16 +17,16 @@ TEST_ROOT = settings.COMMON_TEST_DATA_ROOT
DELAY = 0.5 DELAY = 0.5
ERROR_MESSAGES = { ERROR_MESSAGES = {
'url_format': u'Incorrect url format.', 'url_format': u'Incorrect URL format.',
'file_type': u'Link types should be unique.', 'file_type': u'Video file types must be unique.',
} }
STATUSES = { STATUSES = {
'found': u'Timed Transcript Found', 'found': u'Timed Transcript Found',
'not found': u'No Timed Transcript', 'not found': u'No Timed Transcript',
'replace': u'Timed Transcript Conflict', 'replace': u'Timed Transcript Conflict',
'uploaded_successfully': u'Timed Transcript uploaded successfully', 'uploaded_successfully': u'Timed Transcript Uploaded Successfully',
'use existing': u'Timed Transcript Not Updated', 'use existing': u'Confirm Timed Transcript',
} }
SELECTORS = { SELECTORS = {
...@@ -39,11 +39,11 @@ SELECTORS = { ...@@ -39,11 +39,11 @@ SELECTORS = {
# button type , button css selector, button message # button type , button css selector, button message
TRANSCRIPTS_BUTTONS = { TRANSCRIPTS_BUTTONS = {
'import': ('.setting-import', 'Import from YouTube'), 'import': ('.setting-import', 'Import YouTube Transcript'),
'download_to_edit': ('.setting-download', 'Download to Edit'), 'download_to_edit': ('.setting-download', 'Download Transcript for Editing'),
'disabled_download_to_edit': ('.setting-download.is-disabled', 'Download to Edit'), 'disabled_download_to_edit': ('.setting-download.is-disabled', 'Download Transcript for Editing'),
'upload_new_timed_transcripts': ('.setting-upload', 'Upload New Timed Transcript'), 'upload_new_timed_transcripts': ('.setting-upload', 'Upload New Timed Transcript'),
'replace': ('.setting-replace', 'Yes, Replace EdX Timed Transcript with YouTube Timed Transcript'), 'replace': ('.setting-replace', 'Yes, replace the edX transcript with the YouTube transcript'),
'choose': ('.setting-choose', 'Timed Transcript from {}'), 'choose': ('.setting-choose', 'Timed Transcript from {}'),
'use_existing': ('.setting-use-existing', 'Use Existing Timed Transcript'), 'use_existing': ('.setting-use-existing', 'Use Existing Timed Transcript'),
} }
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
</div> </div>
<p class="transcripts-message"> <p class="transcripts-message">
<%= gettext("The timed transcript for the first HTML5 source does not appear to be the same as the timed transcript for the second HTML5 source.") %> <%= gettext("The timed transcript for the first video file does not appear to be the same as the timed transcript for the second video file.") %>
<strong> <strong>
<%= gettext("Which one would you like to use?") %> <%= gettext("Which timed transcript would you like to use?") %>
</strong> </strong>
</p> </p>
......
<div class="transcripts-message-status"><i class="icon-ok"></i><%= gettext("Timed Transcript Found") %></div> <div class="transcripts-message-status"><i class="icon-ok"></i><%= gettext("Timed Transcript Found") %></div>
<p class="transcripts-message"> <p class="transcripts-message">
<%= gettext("We have a timed transcript on edX for this video. You can upload a new .srt file to replace it or download to edit.") %> <%= gettext("EdX has a timed transcript for this video. If you want to edit this transcript, you can download, edit, and re-upload the existing transcript. If you want to replace this transcript, upload a new .srt transcript file.") %>
</p> </p>
<div class="transcripts-file-uploader"></div> <div class="transcripts-file-uploader"></div>
<p class="transcripts-error-message is-invisible"> <p class="transcripts-error-message is-invisible">
<%= gettext("Error.") %> <%= gettext("Error.") %>
</p> </p>
<div class="wrapper-transcripts-buttons"> <div class="wrapper-transcripts-buttons">
<button class="action setting-upload" type="button" name="setting-upload" value="<%= gettext("Upload New Timed Transcript") %>" data-tooltip="<%= gettext("Upload New Timed Transcript") %>"> <button class="action setting-upload" type="button" name="setting-upload" value="<%= gettext("Upload New Transcript") %>" data-tooltip="<%= gettext("Upload New .srt Transcript") %>">
<span><%= gettext("Upload New Timed Transcript") %></span> <span><%= gettext("Upload New Transcript") %></span>
</button> </button>
<a class="action setting-download" href="/transcripts/download?locator=<%= component_locator %>&subs_id=<%= subs_id %>" data-tooltip="<%= gettext("Download to Edit") %>"> <a class="action setting-download" href="/transcripts/download?locator=<%= component_locator %>&subs_id=<%= subs_id %>" data-tooltip="<%= gettext("Download Transcript for Editing") %>">
<span><%= gettext("Download to Edit") %></span> <span><%= gettext("Download Transcript for Editing") %></span>
</a> </a>
</div> </div>
<div class="transcripts-message-status status-error"><i class="icon-remove"></i><%= gettext("No Timed Transcript") %></div> <div class="transcripts-message-status status-error"><i class="icon-remove"></i><%= gettext("No EdX Timed Transcript") %></div>
<p class="transcripts-message"> <p class="transcripts-message">
<%= gettext("We don\'t have a timed transcript for this video on edX, but we found a transcript for this video on YouTube. Would you like to import it to edX?") %> <%= gettext("EdX doesn\'t have a timed transcript for this video in Studio, but we found a transcript on YouTube. You can import the YouTube transcript or upload your own .srt transcript file.") %>
</p> </p>
<div class="transcripts-file-uploader"></div> <div class="transcripts-file-uploader"></div>
<p class="transcripts-error-message is-invisible"> <p class="transcripts-error-message is-invisible">
<%= gettext("Error.") %> <%= gettext("Error.") %>
</p> </p>
<div class="wrapper-transcripts-buttons"> <div class="wrapper-transcripts-buttons">
<button class="action setting-upload" type="button" name="setting-upload" value="<%= gettext("Upload New Timed Transcript") %>" data-tooltip="<%= gettext("Upload New Timed Transcript") %>"> <button class="action setting-import" type="button" name="setting-import" value="<%= gettext("Import YouTube Transcript") %>" data-tooltip="<%= gettext("Import YouTube Transcript") %>">
<span><%= gettext("Upload New Timed Transcript") %></span> <span><%= gettext("Import YouTube Transcript") %></span>
</button> </button>
<button class="action setting-import" type="button" name="setting-import" value="<%= gettext("Import from YouTube") %>" data-tooltip="<%= gettext("Import from YouTube") %>"> <button class="action setting-upload" type="button" name="setting-upload" value="<%= gettext("Upload New Transcript") %>" data-tooltip="<%= gettext("Upload New .srt Transcript") %>">
<span><%= gettext("Import from YouTube") %></span> <span><%= gettext("Upload New Transcript") %></span>
</button> </button>
</div> </div>
<div class="transcripts-message-status status-error"><i class="icon-remove"></i><%= gettext("No Timed Transcript") %></div> <div class="transcripts-message-status status-error"><i class="icon-remove"></i><%= gettext("No Timed Transcript") %></div>
<p class="transcripts-message"> <p class="transcripts-message">
<%= gettext("We don\'t have a timed transcript for this video. Please upload a .srt file:") %> <%= gettext("EdX doesn\'t have a timed transcript for this video. Please upload an .srt file.") %>
</p> </p>
<div class="transcripts-file-uploader"></div> <div class="transcripts-file-uploader"></div>
<p class="transcripts-error-message is-invisible"> <p class="transcripts-error-message is-invisible">
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<button class="action setting-upload" type="button" name="setting-upload" value="<%= gettext("Upload New Timed Transcript") %>" data-tooltip="<%= gettext("Upload New Timed Transcript") %>"> <button class="action setting-upload" type="button" name="setting-upload" value="<%= gettext("Upload New Timed Transcript") %>" data-tooltip="<%= gettext("Upload New Timed Transcript") %>">
<%= gettext("Upload New Timed Transcript") %> <%= gettext("Upload New Timed Transcript") %>
</button> </button>
<a class="action setting-download is-disabled" href="javascropt: void(0);" data-tooltip="<%= gettext("Download to Edit") %>"> <a class="action setting-download is-disabled" href="javascropt: void(0);" data-tooltip="<%= gettext("Download Transcript for Editing") %>">
<%= gettext("Download to Edit") %> <%= gettext("Download Transcript for Editing") %>
</a> </a>
</div> </div>
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
</div> </div>
<p class="transcripts-message"> <p class="transcripts-message">
<%= gettext("The timed transcript file on YouTube does not appear to be the same as the timed transcript file on edX.") %> <%= gettext("The timed transcript for this video on edX is out of date, but YouTube has a current timed transcript for this video.") %>
<strong> <strong>
<%= gettext("Would you like to replace the edX timed transcript with the ones from YouTube?") %> <%= gettext("Do you want to replace the edX transcript with the YouTube transcript?") %>
</strong> </strong>
</p> </p>
...@@ -19,11 +19,11 @@ ...@@ -19,11 +19,11 @@
class="action setting-replace" class="action setting-replace"
type="button" type="button"
name="setting-replace" name="setting-replace"
value="<%= gettext("Yes, Replace EdX Timed Transcript with YouTube Timed Transcript") %>" value="<%= gettext("Yes, replace the edX transcript with the YouTube transcript") %>"
data-tooltip="<%= gettext("Yes, Replace EdX Timed Transcript with YouTube Timed Transcript") %>" data-tooltip="<%= gettext("Yes, replace the edX transcript with the YouTube transcript") %>"
> >
<span> <span>
<%= gettext("Yes, Replace EdX Timed Transcript with YouTube Timed Transcript") %> <%= gettext("Yes, replace the edX transcript with the YouTube transcript") %>
</span> </span>
</button> </button>
</div> </div>
<div class="transcripts-message-status"><i class="icon-ok"></i><%= gettext("Timed Transcript uploaded successfully") %></div> <div class="transcripts-message-status"><i class="icon-ok"></i><%= gettext("Timed Transcript Uploaded Successfully") %></div>
<p class="transcripts-message"> <p class="transcripts-message">
<%= gettext("We have a timed transcript on edX for this video. You can upload a new .srt file to replace it or download to edit.") %> <%= gettext("EdX has a timed transcript for this video. If you want to replace this transcript, upload a new .srt transcript file. If you want to edit this transcript, you can download, edit, and re-upload the existing transcript.") %>
</p> </p>
<div class="transcripts-file-uploader"></div> <div class="transcripts-file-uploader"></div>
<p class="transcripts-error-message is-invisible"> <p class="transcripts-error-message is-invisible">
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<button class="action setting-upload" type="button" name="setting-upload" value="<%= gettext("Upload New Timed Transcript") %>" data-tooltip="<%= gettext("Upload New Timed Transcript") %>"> <button class="action setting-upload" type="button" name="setting-upload" value="<%= gettext("Upload New Timed Transcript") %>" data-tooltip="<%= gettext("Upload New Timed Transcript") %>">
<span><%= gettext("Upload New Timed Transcript") %></span> <span><%= gettext("Upload New Timed Transcript") %></span>
</button> </button>
<a class="action setting-download" href="/transcripts/download?locator=<%= component_locator %>&subs_id=<%= subs_id %>" data-tooltip="<%= gettext("Download to Edit") %>"> <a class="action setting-download" href="/transcripts/download?locator=<%= component_locator %>&subs_id=<%= subs_id %>" data-tooltip="<%= gettext("Download Transcript for Editing") %>">
<span><%= gettext("Download to Edit") %></span> <span><%= gettext("Download Transcript for Editing") %></span>
</a> </a>
</div> </div>
<div class="transcripts-message-status status-error"> <div class="transcripts-message-status status-error">
<i class="icon-remove"></i> <i class="icon-remove"></i>
<%= gettext("Timed Transcript Not Updated") %> <%= gettext("Confirm Timed Transcript") %>
</div> </div>
<p class="transcripts-message"> <p class="transcripts-message">
<%= gettext("You changed a video source, but did not update the timed transcript file. Do you want to upload new timed transcript?") %> <%= gettext("You changed a video URL, but did not change the timed transcript file. Do you want to use the current timed transcript or upload a new .srt transcript file?") %>
</p> </p>
<div class="transcripts-file-uploader"></div> <div class="transcripts-file-uploader"></div>
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
class="action setting-use-existing" class="action setting-use-existing"
type="button" type="button"
name="setting-use-existing" name="setting-use-existing"
value="<%= gettext("Use Existing Timed Transcript") %>" value="<%= gettext("Use Current Timed Transcript") %>"
data-tooltip="<%= gettext("Use Existing Timed Transcript") %>" data-tooltip="<%= gettext("Use Current Timed Transcript") %>"
> >
<span> <span>
<%= gettext("Use Existing Timed Transcript") %> <%= gettext("Use Current Timed Transcript") %>
</span> </span>
</button> </button>
<button <button
......
...@@ -5,10 +5,10 @@ ...@@ -5,10 +5,10 @@
<div class="tip videolist-url-tip setting-help"><%= model.get('help') %></div> <div class="tip videolist-url-tip setting-help"><%= model.get('help') %></div>
<div class="wrapper-videolist-urls"> <div class="wrapper-videolist-urls">
<a href="#" class="collapse-action collapse-setting"> <a href="#" class="collapse-action collapse-setting">
<i class="icon-plus"></i><%= gettext("Add more video sources") %> <span class="sr"><%= model.get('display_name')%></span> <i class="icon-plus"></i><%= gettext("Add URLs for additional versions") %> <span class="sr"><%= model.get('display_name')%></span>
</a> </a>
<div class="videolist-extra-videos"> <div class="videolist-extra-videos">
<span class="tip videolist-extra-videos-tip setting-help"><%= gettext('To be sure all students can view the video, we recommend providing alternate versions of the same video: mp4, webm and youtube (if available).') %></span> <span class="tip videolist-extra-videos-tip setting-help"><%= gettext('To be sure all students can access the video, we recommend providing both an .mp4 and a .webm version of your video. Click below to add a URL for another version. These URLs cannot be YouTube URLs. The first listed video that\'s compatible with the student\'s computer will play.') %></span>
<ol class="videolist-settings"> <ol class="videolist-settings">
<li class="videolist-settings-item"> <li class="videolist-settings-item">
<input type="text" class="input" value="<%= model.get('value')[1] %>"> <input type="text" class="input" value="<%= model.get('value')[1] %>">
...@@ -22,6 +22,6 @@ ...@@ -22,6 +22,6 @@
</div> </div>
</div> </div>
<div class="transcripts-status is-invisible"> <div class="transcripts-status is-invisible">
<label class="label setting-label transcripts-label"><%= gettext("Timed Transcript") %></label> <label class="label setting-label transcripts-label"><%= gettext("Default Timed Transcript") %></label>
<div class="wrapper-transcripts-message"></div> <div class="wrapper-transcripts-message"></div>
</div> </div>
...@@ -357,8 +357,8 @@ class VideoDescriptor(VideoFields, VideoStudioViewHandlers, TabsEditingDescripto ...@@ -357,8 +357,8 @@ class VideoDescriptor(VideoFields, VideoStudioViewHandlers, TabsEditingDescripto
_ = self.runtime.service(self, "i18n").ugettext _ = self.runtime.service(self, "i18n").ugettext
video_url.update({ video_url.update({
'help': _('A YouTube URL or a link to a file hosted anywhere on the web.'), 'help': _('The URL for your video. This can be a YouTube URL or a link to an .mp4, .ogg, or .webm video file hosted elsewhere on the Internet.'),
'display_name': 'Video URL', 'display_name': 'Default Video URL',
'field_name': 'video_url', 'field_name': 'video_url',
'type': 'VideoList', 'type': 'VideoList',
'default_value': [get_youtube_link(youtube_id_1_0['default_value'])] 'default_value': [get_youtube_link(youtube_id_1_0['default_value'])]
......
...@@ -14,7 +14,7 @@ _ = lambda text: text ...@@ -14,7 +14,7 @@ _ = lambda text: text
class VideoFields(object): class VideoFields(object):
"""Fields for `VideoModule` and `VideoDescriptor`.""" """Fields for `VideoModule` and `VideoDescriptor`."""
display_name = String( display_name = String(
display_name="Display Name", help="Display name for this module.", display_name="Component Display Name", help="The name students see. This name appears in the course ribbon and as a header for the video.",
default="Video", default="Video",
scope=Scope.settings scope=Scope.settings
) )
...@@ -27,38 +27,38 @@ class VideoFields(object): ...@@ -27,38 +27,38 @@ class VideoFields(object):
# TODO: This should be moved to Scope.content, but this will # TODO: This should be moved to Scope.content, but this will
# require data migration to support the old video module. # require data migration to support the old video module.
youtube_id_1_0 = String( youtube_id_1_0 = String(
help="This is the Youtube ID reference for the normal speed video.", help="Optional, for older browsers: the YouTube ID for the normal speed video.",
display_name="Youtube ID", display_name="YouTube ID",
scope=Scope.settings, scope=Scope.settings,
default="OEoXaMPEzfM" default="OEoXaMPEzfM"
) )
youtube_id_0_75 = String( youtube_id_0_75 = String(
help="Optional, for older browsers: the Youtube ID for the .75x speed video.", help="Optional, for older browsers: the YouTube ID for the .75x speed video.",
display_name="Youtube ID for .75x speed", display_name="YouTube ID for .75x speed",
scope=Scope.settings, scope=Scope.settings,
default="" default=""
) )
youtube_id_1_25 = String( youtube_id_1_25 = String(
help="Optional, for older browsers: the Youtube ID for the 1.25x speed video.", help="Optional, for older browsers: the YouTube ID for the 1.25x speed video.",
display_name="Youtube ID for 1.25x speed", display_name="YouTube ID for 1.25x speed",
scope=Scope.settings, scope=Scope.settings,
default="" default=""
) )
youtube_id_1_5 = String( youtube_id_1_5 = String(
help="Optional, for older browsers: the Youtube ID for the 1.5x speed video.", help="Optional, for older browsers: the YouTube ID for the 1.5x speed video.",
display_name="Youtube ID for 1.5x speed", display_name="YouTube ID for 1.5x speed",
scope=Scope.settings, scope=Scope.settings,
default="" default=""
) )
start_time = RelativeTime( # datetime.timedelta object start_time = RelativeTime( # datetime.timedelta object
help="Start time for the video (HH:MM:SS). Max value is 23:59:59.", help="Time you want the video to start if you don't want the entire video to play. Formatted as HH:MM:SS. The maximum value is 23:59:59.",
display_name="Start Time", display_name="Video Start Time",
scope=Scope.settings, scope=Scope.settings,
default=datetime.timedelta(seconds=0) default=datetime.timedelta(seconds=0)
) )
end_time = RelativeTime( # datetime.timedelta object end_time = RelativeTime( # datetime.timedelta object
help="End time for the video (HH:MM:SS). Max value is 23:59:59.", help="Time you want the video to stop if you don't want the entire video to play. Formatted as HH:MM:SS. The maximum value is 23:59:59.",
display_name="End Time", display_name="Video Stop Time",
scope=Scope.settings, scope=Scope.settings,
default=datetime.timedelta(seconds=0) default=datetime.timedelta(seconds=0)
) )
...@@ -73,44 +73,44 @@ class VideoFields(object): ...@@ -73,44 +73,44 @@ class VideoFields(object):
default="" default=""
) )
download_video = Boolean( download_video = Boolean(
help="Show a link beneath the video to allow students to download the video. Note: You must add at least one video source below.", help="Allow students to download versions of this video in different formats if they cannot use the edX video player or do not have access to YouTube. You must add at least one non-YouTube URL in the Video File URLs field.",
display_name="Video Download Allowed", display_name="Video Download Allowed",
scope=Scope.settings, scope=Scope.settings,
default=False default=False
) )
html5_sources = List( html5_sources = List(
help="A list of filenames to be used with HTML5 video. The first supported filetype will be displayed.", help="The URL or URLs where you’ve posted non-YouTube versions of the video. Each URL must end in .mpeg, .mp4, .ogg, or .webm and cannot be a YouTube URL. Students will be able to view the first listed video that's compatible with the student's computer. To allow students to download these videos, set Video Download Allowed to True.",
display_name="Video Sources", display_name="Video File URLs",
scope=Scope.settings, scope=Scope.settings,
) )
track = String( track = String(
help="The external URL to download the timed transcript track. This appears as a link beneath the video.", help="By default, students can download an .srt or .txt transcript when you set Download Transcript Allowed to True. If you want to provide a downloadable transcript in a different format, we recommend that you upload a handout by using the Upload a Handout field. If this isn't possible, you can post a transcript file on the Files & Uploads page or on the Internet, and then add the URL for the transcript here. Students see a link to download that transcript below the video.",
display_name="Download Transcript", display_name="Downloadable Transcript URL",
scope=Scope.settings, scope=Scope.settings,
default='' default=''
) )
download_track = Boolean( download_track = Boolean(
help="Show a link beneath the video to allow students to download the transcript. Note: You must add a link to the HTML5 Transcript field above.", help="Allow students to download the timed transcript. A link to download the file appears below the video. By default, the transcript is an .srt or .txt file. If you want to provide the transcript for download in a different format, upload a file by using the Upload Handout field.",
display_name="Transcript Download Allowed", display_name="Download Transcript Allowed",
scope=Scope.settings, scope=Scope.settings,
default=False default=False
) )
sub = String( sub = String(
help="The name of the timed transcript track (for non-Youtube videos).", help="The default transcript for the video, from the Default Timed Transcript field on the Basic tab. This transcript should be in English. You don't have to change this setting.",
display_name="Transcript (primary)", display_name="Default Timed Transcript",
scope=Scope.settings, scope=Scope.settings,
default="" default=""
) )
show_captions = Boolean( show_captions = Boolean(
help="This controls whether or not captions are shown by default.", help="Specify whether the transcripts appear with the video by default.",
display_name="Transcript Display", display_name="Show Transcript",
scope=Scope.settings, scope=Scope.settings,
default=True default=True
) )
# Data format: {'de': 'german_translation', 'uk': 'ukrainian_translation'} # Data format: {'de': 'german_translation', 'uk': 'ukrainian_translation'}
transcripts = Dict( transcripts = Dict(
help="Add additional transcripts in other languages.", help="Add transcripts in different languages. Click below to specify a language and upload an .srt transcript file for that language.",
display_name="Transcript Translations", display_name="Transcript Languages",
scope=Scope.settings, scope=Scope.settings,
default={} default={}
) )
...@@ -131,16 +131,16 @@ class VideoFields(object): ...@@ -131,16 +131,16 @@ class VideoFields(object):
default='srt', default='srt',
) )
speed = Float( speed = Float(
help="The last speed that was explicitly set by user for the video.", help="The last speed that the user specified for the video.",
scope=Scope.user_state, scope=Scope.user_state,
) )
global_speed = Float( global_speed = Float(
help="Default speed in cases when speed wasn't explicitly for specific video.", help="The default speed for the video.",
scope=Scope.preferences, scope=Scope.preferences,
default=1.0 default=1.0
) )
youtube_is_available = Boolean( youtube_is_available = Boolean(
help="The availaibility of YouTube API for the user.", help="Specify whether YouTube is available for the user.",
scope=Scope.user_info, scope=Scope.user_info,
default=True default=True
) )
......
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