Merge pull request #7970 from edx/shr/bug/TNL-2038-Remove-table-of-contents-transcript-languages
Remove "table of contents" from transcript upload languages
This commit is contained in:
@@ -179,8 +179,6 @@ class VideoModule(VideoFields, VideoTranscriptsMixin, VideoStudentViewHandlers,
|
||||
|
||||
# OrderedDict for easy testing of rendered context in tests
|
||||
sorted_languages = sorted(languages.items(), key=itemgetter(1))
|
||||
if 'table' in other_lang:
|
||||
sorted_languages.insert(0, ('table', 'Table of Contents'))
|
||||
|
||||
sorted_languages = OrderedDict(sorted_languages)
|
||||
return track_url, transcript_language, sorted_languages
|
||||
@@ -442,7 +440,6 @@ class VideoDescriptor(VideoFields, VideoTranscriptsMixin, VideoStudioViewHandler
|
||||
|
||||
languages = [{'label': label, 'code': lang} for lang, label in settings.ALL_LANGUAGES if lang != u'en']
|
||||
languages.sort(key=lambda l: l['label'])
|
||||
languages.insert(0, {'label': 'Table of Contents', 'code': 'table'})
|
||||
editable_fields['transcripts']['languages'] = languages
|
||||
editable_fields['transcripts']['type'] = 'VideoTranslations'
|
||||
editable_fields['transcripts']['urlRoot'] = self.runtime.handler_url(self, 'studio_transcript', 'translation').rstrip('/?')
|
||||
|
||||
@@ -464,7 +464,7 @@ class VideoEditorTest(CMSVideoBaseTest):
|
||||
|
||||
def test_table_of_contents(self):
|
||||
"""
|
||||
Scenario: User can see table of content at the first position
|
||||
Scenario: User can see Abkhazian (ab) language option at the first position
|
||||
Given I have created a Video component
|
||||
And I edit the component
|
||||
And I open tab "Advanced"
|
||||
@@ -482,13 +482,13 @@ class VideoEditorTest(CMSVideoBaseTest):
|
||||
self.edit_component()
|
||||
self.open_advanced_tab()
|
||||
self.video.upload_translation('uk_transcripts.srt', 'uk')
|
||||
self.video.upload_translation('chinese_transcripts.srt', 'table')
|
||||
self.video.upload_translation('chinese_transcripts.srt', 'ab')
|
||||
self.save_unit_settings()
|
||||
self.assertTrue(self.video.is_captions_visible())
|
||||
unicode_text = "好 各位同学".decode('utf-8')
|
||||
self.assertIn(unicode_text, self.video.captions_text)
|
||||
self.assertEqual(self.video.caption_languages.keys(), [u'table', u'uk'])
|
||||
self.assertEqual(self.video.caption_languages.keys()[0], 'table')
|
||||
self.assertEqual(self.video.caption_languages.keys(), [u'ab', u'uk'])
|
||||
self.assertEqual(self.video.caption_languages.keys()[0], 'ab')
|
||||
|
||||
def test_upload_transcript_with_BOM(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user