mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Apply suggestions
This commit is contained in:
parent
60329961b5
commit
05e26e6588
9 changed files with 12 additions and 9 deletions
|
@ -109,7 +109,7 @@ define(['dom', 'loading', 'apphost', 'dialogHelper', 'connectionManager', 'image
|
||||||
html += '<span style="margin-right: 10px;">';
|
html += '<span style="margin-right: 10px;">';
|
||||||
|
|
||||||
var startAtDisplay = totalRecordCount ? startIndex + 1 : 0;
|
var startAtDisplay = totalRecordCount ? startIndex + 1 : 0;
|
||||||
html += globalize.translate("ListPaging", startAtDisplay + '-' + recordsEnd, totalRecordCount);
|
html += globalize.translate("ListPaging", startAtDisplay, recordsEnd, totalRecordCount);
|
||||||
|
|
||||||
html += '</span>';
|
html += '</span>';
|
||||||
|
|
||||||
|
|
|
@ -471,7 +471,7 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
|
||||||
// how dates are returned by the server when the session is active and show something like 'Active now', instead of past/future sentences
|
// how dates are returned by the server when the session is active and show something like 'Active now', instead of past/future sentences
|
||||||
if (!nowPlayingItem) {
|
if (!nowPlayingItem) {
|
||||||
return {
|
return {
|
||||||
html: globalize.translate("LastSeen", datefns.formatDistanceToNow(Date.parse(session.LastActivityDate), { addSuffix: true, locale: dfnshelper.getLocale() })),
|
html: globalize.translate("LastSeen", datefns.formatDistanceToNow(Date.parse(session.LastActivityDate), dfnshelper.localeWithSuffix)),
|
||||||
image: imgUrl
|
image: imgUrl
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,8 +66,10 @@ define(["jQuery", "loading", "events", "globalize", "serverNotifications", "date
|
||||||
var html = "";
|
var html = "";
|
||||||
if (task.State === "Idle") {
|
if (task.State === "Idle") {
|
||||||
if (task.LastExecutionResult) {
|
if (task.LastExecutionResult) {
|
||||||
html += globalize.translate("LabelScheduledTaskLastRan", datefns.formatDistanceToNow(Date.parse(task.LastExecutionResult.EndTimeUtc), { addSuffix: true, locale: dfnshelper.getLocale() }),
|
var endtime = Date.parse(task.LastExecutionResult.EndTimeUtc);
|
||||||
datefns.formatDistance(Date.parse(task.LastExecutionResult.StartTimeUtc), Date.parse(task.LastExecutionResult.EndTimeUtc), { addSuffix: false, locale: dfnshelper.getLocale() }));
|
var starttime = Date.parse(task.LastExecutionResult.StartTimeUtc);
|
||||||
|
html += globalize.translate("LabelScheduledTaskLastRan", datefns.formatDistanceToNow(endtime, dfnshelper.localeWithSuffix),
|
||||||
|
datefns.formatDistance(starttime, endtime, dfnshelper.localeWithSuffix));
|
||||||
if (task.LastExecutionResult.Status === "Failed") {
|
if (task.LastExecutionResult.Status === "Failed") {
|
||||||
html += " <span style='color:#FF0000;'>(" + globalize.translate("LabelFailed") + ")</span>";
|
html += " <span style='color:#FF0000;'>(" + globalize.translate("LabelFailed") + ")</span>";
|
||||||
} else if (task.LastExecutionResult.Status === "Cancelled") {
|
} else if (task.LastExecutionResult.Status === "Cancelled") {
|
||||||
|
|
|
@ -103,7 +103,7 @@ define(["loading", "dom", "libraryMenu", "globalize", "scripts/imagehelper", "da
|
||||||
|
|
||||||
if (device.LastUserName) {
|
if (device.LastUserName) {
|
||||||
deviceHtml += device.LastUserName;
|
deviceHtml += device.LastUserName;
|
||||||
deviceHtml += ", " + datefns.formatDistanceToNow(Date.parse(device.DateLastActivity), { addSuffix: true, locale: dfnshelper.getLocale() });
|
deviceHtml += ", " + datefns.formatDistanceToNow(Date.parse(device.DateLastActivity), dfnshelper.localeWithSuffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
deviceHtml += " ";
|
deviceHtml += " ";
|
||||||
|
|
|
@ -129,7 +129,7 @@ define(["loading", "dom", "globalize", "date-fns", "dfnshelper", "paper-icon-but
|
||||||
// how dates are returned by the server when the session is active and show something like 'Active now', instead of past/future sentences
|
// how dates are returned by the server when the session is active and show something like 'Active now', instead of past/future sentences
|
||||||
function getLastSeenText(lastActivityDate) {
|
function getLastSeenText(lastActivityDate) {
|
||||||
if (lastActivityDate) {
|
if (lastActivityDate) {
|
||||||
return globalize.translate("LastSeen", datefns.formatDistanceToNow(Date.parse(lastActivityDate), { addSuffix: true, locale: dfnshelper.getLocale() }));
|
return globalize.translate("LastSeen", datefns.formatDistanceToNow(Date.parse(lastActivityDate), dfnshelper.localeWithSuffix));
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -95,3 +95,4 @@ export function getLocale() {
|
||||||
return enUS;
|
return enUS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
export const localeWithSuffix = { addSuffix: true, locale: getLocale() };
|
||||||
|
|
|
@ -83,7 +83,7 @@ define(["userSettings"], function (userSettings) {
|
||||||
|
|
||||||
if (html += '<div class="listPaging">', showControls) {
|
if (html += '<div class="listPaging">', showControls) {
|
||||||
html += '<span style="vertical-align:middle;">';
|
html += '<span style="vertical-align:middle;">';
|
||||||
html += Globalize.translate("ListPaging", (totalRecordCount ? startIndex + 1 : 0) + "-" + recordsEnd, totalRecordCount);
|
html += Globalize.translate("ListPaging", (totalRecordCount ? startIndex + 1 : 0), recordsEnd, totalRecordCount);
|
||||||
html += "</span>";
|
html += "</span>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1483,7 +1483,7 @@
|
||||||
"Yesterday": "Yesterday",
|
"Yesterday": "Yesterday",
|
||||||
"PathNotFound": "The path could not be found. Please ensure the path is valid and try again.",
|
"PathNotFound": "The path could not be found. Please ensure the path is valid and try again.",
|
||||||
"WriteAccessRequired": "Jellyfin Server requires write access to this folder. Please ensure write access and try again.",
|
"WriteAccessRequired": "Jellyfin Server requires write access to this folder. Please ensure write access and try again.",
|
||||||
"ListPaging": "{0} of {1}",
|
"ListPaging": "{0}-{1} of {2}",
|
||||||
"PersonRole": "as {0}",
|
"PersonRole": "as {0}",
|
||||||
"LastSeen": "Last seen {0}",
|
"LastSeen": "Last seen {0}",
|
||||||
"DailyAt": "Daily at {0}",
|
"DailyAt": "Daily at {0}",
|
||||||
|
|
|
@ -1480,7 +1480,7 @@
|
||||||
"PreferEmbeddedEpisodeInfosOverFileNamesHelp": "Usar la información de episodio de los metadatos embebidos si está disponible.",
|
"PreferEmbeddedEpisodeInfosOverFileNamesHelp": "Usar la información de episodio de los metadatos embebidos si está disponible.",
|
||||||
"PathNotFound": "No se encontró la ruta especificada. Asegúrate de que existe e inténtalo de nuevo.",
|
"PathNotFound": "No se encontró la ruta especificada. Asegúrate de que existe e inténtalo de nuevo.",
|
||||||
"WriteAccessRequired": "Jellyfin requiere de permisos de escritura en esta carpeta. Asegúrate de que existe este permiso e inténtalo de nuevo.",
|
"WriteAccessRequired": "Jellyfin requiere de permisos de escritura en esta carpeta. Asegúrate de que existe este permiso e inténtalo de nuevo.",
|
||||||
"ListPaging": "{0} de {1}",
|
"ListPaging": "{0}-{1} de {2}",
|
||||||
"PersonRole": "como {0}",
|
"PersonRole": "como {0}",
|
||||||
"LastSeen": "Última vez {0}",
|
"LastSeen": "Última vez {0}",
|
||||||
"DailyAt": "Diariamente a las {0}",
|
"DailyAt": "Diariamente a las {0}",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue