mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
~ convert subtitlesettings to class
~ use base import name instead of relative file path ~ fix "new" calling Signed-off-by: Christoph Potas <christoph286@googlemail.com>
This commit is contained in:
parent
257ce4974e
commit
6f0843cc6d
5 changed files with 97 additions and 46 deletions
24
src/components/settingshelper.js
Normal file
24
src/components/settingshelper.js
Normal file
|
@ -0,0 +1,24 @@
|
|||
import globalize from 'globalize';
|
||||
/**
|
||||
* Helper for handling settings
|
||||
* @module components/settingsHelper
|
||||
*/
|
||||
export function populateLanguages(select, languages) {
|
||||
|
||||
let html = "";
|
||||
|
||||
html += "<option value=''>" + globalize.translate('AnyLanguage') + "</option>";
|
||||
|
||||
for (let i = 0, length = languages.length; i < length; i++) {
|
||||
|
||||
const culture = languages[i];
|
||||
|
||||
html += "<option value='" + culture.ThreeLetterISOLanguageName + "'>" + culture.DisplayName + "</option>";
|
||||
}
|
||||
|
||||
select.innerHTML = html;
|
||||
}
|
||||
|
||||
export default {
|
||||
populateLanguages: populateLanguages
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue