mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
7ebc536076
commit
a1af156757
65 changed files with 2335 additions and 262 deletions
|
@ -99,16 +99,24 @@ define(['connectionManager', 'userSettings', 'events'], function (connectionMana
|
|||
return translations.dictionaries[getCurrentLocale()];
|
||||
}
|
||||
|
||||
function loadTranslations(options) {
|
||||
function register(options) {
|
||||
|
||||
allTranslations[options.name] = {
|
||||
translations: options.translations,
|
||||
translations: options.strings || options.translations,
|
||||
dictionaries: {}
|
||||
};
|
||||
}
|
||||
|
||||
function loadStrings(options) {
|
||||
|
||||
var locale = getCurrentLocale();
|
||||
|
||||
return ensureTranslation(allTranslations[options.name], locale);
|
||||
if (typeof options === 'string') {
|
||||
return ensureTranslation(allTranslations[options], locale);
|
||||
} else {
|
||||
register(options);
|
||||
return ensureTranslation(allTranslations[options.name], locale);
|
||||
}
|
||||
}
|
||||
|
||||
var cacheParam = new Date().getTime();
|
||||
|
@ -246,8 +254,9 @@ define(['connectionManager', 'userSettings', 'events'], function (connectionMana
|
|||
translate: translate,
|
||||
translateDocument: translateHtml,
|
||||
translateHtml: translateHtml,
|
||||
loadStrings: loadTranslations,
|
||||
loadStrings: loadStrings,
|
||||
defaultModule: defaultModule,
|
||||
getCurrentLocale: getCurrentLocale
|
||||
getCurrentLocale: getCurrentLocale,
|
||||
register: register
|
||||
};
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue