mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #960 from ferferga/translate-everything
Translate missing items - Part 1
This commit is contained in:
commit
521068558f
28 changed files with 229 additions and 155 deletions
104
src/scripts/dfnshelper.js
Normal file
104
src/scripts/dfnshelper.js
Normal 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
|
||||
}
|
|
@ -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>";
|
||||
}
|
||||
|
||||
|
|
|
@ -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"
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue