From dac62703450f030af957559c728722bcb0d6f0e4 Mon Sep 17 00:00:00 2001 From: Sarina Canelake Date: Tue, 22 Apr 2014 22:37:56 -0400 Subject: [PATCH] Fix i18n of video player string --- common/lib/xmodule/xmodule/video_module/video_xfields.py | 8 ++++++-- lms/templates/video.html | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/common/lib/xmodule/xmodule/video_module/video_xfields.py b/common/lib/xmodule/xmodule/video_module/video_xfields.py index f70e5e2841f4..32aace782ff7 100644 --- a/common/lib/xmodule/xmodule/video_module/video_xfields.py +++ b/common/lib/xmodule/xmodule/video_module/video_xfields.py @@ -7,6 +7,9 @@ from xmodule.fields import RelativeTime +# Make '_' a no-op so we can scrape strings +_ = lambda text: text + class VideoFields(object): """Fields for `VideoModule` and `VideoDescriptor`.""" @@ -121,8 +124,9 @@ class VideoFields(object): help="Transcript file format to download by user.", scope=Scope.preferences, values=[ - {"display_name": "SubRip (.srt) file", "value": "srt"}, - {"display_name": "Text (.txt) file", "value": "txt"} + # Translators: This is a type of file used for captioning in the video player. + {"display_name": _("SubRip (.srt) file"), "value": "srt"}, + {"display_name": _("Text (.txt) file"), "value": "txt"} ], default='srt', ) diff --git a/lms/templates/video.html b/lms/templates/video.html index 9dfaa7244314..bbf35475dfc5 100644 --- a/lms/templates/video.html +++ b/lms/templates/video.html @@ -125,8 +125,8 @@ % else:
  • % endif - - ${_('{file_format}'.format(file_format=item['display_name']))} + + ${_(item['display_name'])}
  • % endfor