<% if captions %>
<div class="description-widget description-show-transcript-widget">
    <h4><%=HTML.escape(translate(locale, "video_description_toggle_transcript_widget_label"))%></h4>
    <% if transcript %>
        <% hide_transcripts_param = env.params.query.dup %>
        <% hide_transcripts_param.delete_all("show_transcripts") %>

        <a class="pure-button pure-button-secondary" href="/watch?<%= hide_transcripts_param %>"><%=HTML.escape(translate(locale, "video_description_toggle_transcript_widget_button_label_hide"))%></a>
    <% else %>
        <a class="pure-button pure-button-secondary" href="/watch?<%= env.params.query %>&show_transcripts=1"><%=HTML.escape(translate(locale, "video_description_toggle_transcript_widget_button_label_show"))%></a>
    <% end %>
</div>
<% end %>
