videos: move 'Caption' and associated global/functions to a separate file

This commit is contained in:
Samantaz Fox
2022-05-23 22:37:58 +02:00
parent 9baaef412f
commit cd03fa06ae
5 changed files with 177 additions and 164 deletions

View File

@@ -89,7 +89,7 @@
<label for="captions[0]"><%= translate(locale, "preferences_captions_label") %></label>
<% preferences.captions.each_with_index do |caption, index| %>
<select class="pure-u-1-6" name="captions[<%= index %>]" id="captions[<%= index %>]">
<% CAPTION_LANGUAGES.each do |option| %>
<% Invidious::Videos::Caption::LANGUAGES.each do |option| %>
<option value="<%= option %>" <% if preferences.captions[index] == option %> selected <% end %>><%= translate(locale, option.blank? ? "none" : option) %></option>
<% end %>
</select>