Skip to content

Commit

Permalink
fix(AU-2128): Let 'en' be selected as transcript by default when yout…
Browse files Browse the repository at this point in the history
…ube video
  • Loading branch information
Rodra committed Jul 12, 2024
1 parent 57fd671 commit 04d07df
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions xmodule/video_block/transcripts_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -866,8 +866,11 @@ def get_default_transcript_language(self, transcripts, dest_lang=None):
"""
sub, other_lang = transcripts["sub"], transcripts["transcripts"]

if dest_lang and dest_lang in other_lang.keys():
transcript_language = dest_lang
if dest_lang:
if dest_lang in other_lang.keys():
transcript_language = dest_lang
elif dest_lang == 'en' and (other_lang or (other_lang and sub)):
transcript_language = 'en'
elif self.transcript_language in other_lang:
transcript_language = self.transcript_language
elif sub:
Expand Down

0 comments on commit 04d07df

Please sign in to comment.