Commit 7a513820 by Sarina Canelake

Merge pull request #3438 from edx/sarina/fix-video-i18n

Don't scrape unnecessary strings for i18n
parents e4c5eb4d dac62703
...@@ -7,6 +7,9 @@ from xblock.fields import Scope, String, Float, Boolean, List, Dict ...@@ -7,6 +7,9 @@ from xblock.fields import Scope, String, Float, Boolean, List, Dict
from xmodule.fields import RelativeTime from xmodule.fields import RelativeTime
# Make '_' a no-op so we can scrape strings
_ = lambda text: text
class VideoFields(object): class VideoFields(object):
"""Fields for `VideoModule` and `VideoDescriptor`.""" """Fields for `VideoModule` and `VideoDescriptor`."""
...@@ -121,8 +124,9 @@ class VideoFields(object): ...@@ -121,8 +124,9 @@ class VideoFields(object):
help="Transcript file format to download by user.", help="Transcript file format to download by user.",
scope=Scope.preferences, scope=Scope.preferences,
values=[ values=[
{"display_name": "SubRip (.srt) file", "value": "srt"}, # Translators: This is a type of file used for captioning in the video player.
{"display_name": "Text (.txt) file", "value": "txt"} {"display_name": _("SubRip (.srt) file"), "value": "srt"},
{"display_name": _("Text (.txt) file"), "value": "txt"}
], ],
default='srt', default='srt',
) )
......
...@@ -125,8 +125,8 @@ ...@@ -125,8 +125,8 @@
% else: % else:
<li class="a11y-menu-item"> <li class="a11y-menu-item">
% endif % endif
<a class="a11y-menu-item-link" href="#${item['value']}" title="${_('{file_format}'.format(file_format=item['display_name']))}" data-value="${item['value']}"> <a class="a11y-menu-item-link" href="#${item['value']}" title="${_(item['display_name'])}" data-value="${item['value']}">
${_('{file_format}'.format(file_format=item['display_name']))} ${_(item['display_name'])}
</a> </a>
</li> </li>
% endfor % endfor
......
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