1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge remote-tracking branch 'upstream/master' into slideshow-zoom

This commit is contained in:
MrTimscampi 2020-04-04 23:11:49 +02:00
commit 01776c4dcc
39 changed files with 539 additions and 236 deletions

View file

@ -292,7 +292,7 @@ define([], function () {
}
if (typeof document !== 'undefined') {
if (('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch) {
if (('ontouchstart' in window) || (navigator.maxTouchPoints > 0)) {
browser.touch = true;
}
}

104
src/scripts/dfnshelper.js Normal file
View file

@ -0,0 +1,104 @@
import { ar, be, bg, ca, cs, da, de, el, enGB, enUS, es, faIR, fi, fr, frCA, he, hi, hr, hu, id, it, kk, ko, lt, ms, nb, nl, pl, ptBR, pt, ro, ru, sk, sl, sv, tr, uk, vi, zhCN, zhTW } from 'date-fns/locale';
import globalize from 'globalize';
export function getLocale() {
switch (globalize.getCurrentLocale()) {
case 'ar':
return ar;
case 'be-by':
return be;
case 'bg-bg':
return bg;
case 'ca':
return ca;
case 'cs':
return cs;
case 'da':
return da;
case 'de':
return de;
case 'el':
return el;
case 'en-gb':
return enGB;
case 'en-us':
return enUS;
case 'es':
return es;
case 'es-ar':
return es;
case 'es-mx':
return es;
case 'fa':
return faIR;
case 'fi':
return fi;
case 'fr':
return fr;
case 'fr-ca':
return frCA;
case 'gsw':
return de;
case 'he':
return he;
case 'hi-in':
return hi;
case 'hr':
return hr;
case 'hu':
return hu;
case 'id':
return id;
case 'it':
return it;
case 'kk':
return kk;
case 'ko':
return ko;
case 'lt-lt':
return lt;
case 'ms':
return ms;
case 'nb':
return nb;
case 'nl':
return nl;
case 'pl':
return pl;
case 'pt-br':
return ptBR;
case 'pt-pt':
return pt;
case 'ro':
return ro;
case 'ru':
return ru;
case 'sk':
return sk;
case 'sl-si':
return sl;
case 'sv':
return sv;
case 'tr':
return tr;
case 'uk':
return uk;
case 'vi':
return vi;
case 'zh-cn':
return zhCN;
case 'zh-hk':
return zhCN;
case 'zh-tw':
return zhTW;
default:
return enUS;
}
}
export const localeWithSuffix = { addSuffix: true, locale: getLocale() };
export default {
getLocale: getLocale,
localeWithSuffix: localeWithSuffix
}

View file

@ -83,7 +83,7 @@ define(["userSettings"], function (userSettings) {
if (html += '<div class="listPaging">', showControls) {
html += '<span style="vertical-align:middle;">';
html += (totalRecordCount ? startIndex + 1 : 0) + "-" + recordsEnd + " of " + totalRecordCount;
html += Globalize.translate("ListPaging", (totalRecordCount ? startIndex + 1 : 0), recordsEnd, totalRecordCount);
html += "</span>";
}

View file

@ -574,6 +574,7 @@ var AppInfo = {};
}
require(["mediaSession", "serverNotifications"]);
require(["date-fns", "date-fns/locale"]);
if (!browser.tv && !browser.xboxOne) {
require(["components/playback/playbackorientation"]);
@ -647,12 +648,12 @@ var AppInfo = {};
inputManager: "scripts/inputManager",
datetime: "scripts/datetime",
globalize: "scripts/globalize",
dfnshelper: "scripts/dfnshelper",
libraryMenu: "scripts/librarymenu",
playlisteditor: componentsPath + "/playlisteditor/playlisteditor",
medialibrarycreator: componentsPath + "/medialibrarycreator/medialibrarycreator",
medialibraryeditor: componentsPath + "/medialibraryeditor/medialibraryeditor",
imageoptionseditor: componentsPath + "/imageoptionseditor/imageoptionseditor",
humanedate: componentsPath + "/humanedate",
apphost: componentsPath + "/apphost",
visibleinviewport: componentsPath + "/visibleinviewport",
qualityoptions: componentsPath + "/qualityoptions",
@ -693,6 +694,7 @@ var AppInfo = {};
"webcomponents",
"material-icons",
"jellyfin-noto",
"date-fns",
"page",
"polyfill",
"classlist-polyfill"