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 (#35116)
  • Loading branch information
Rodra authored Jul 15, 2024
1 parent e02a22f commit 69b4f69
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 (not 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 69b4f69

Please sign in to comment.