mirror of
https://github.com/BreizhHardware/Jellystat.git
synced 2026-01-18 16:27:20 +01:00
Added translations for hard coded items added in sessions. Improved music session card.
This commit is contained in:
@@ -17,7 +17,9 @@
|
||||
"LIBRARY_OVERVIEW": "Library Overview"
|
||||
},
|
||||
"SESSIONS": {
|
||||
"NO_SESSIONS": "No Active Sessions Found"
|
||||
"NO_SESSIONS": "No Active Sessions Found",
|
||||
"DIRECT_PLAY": "Direct Play",
|
||||
"TRANSCODE": "Transcode"
|
||||
},
|
||||
"STAT_CARDS": {
|
||||
"MOST_VIEWED_MOVIES": "MOST VIEWED MOVIES",
|
||||
@@ -301,5 +303,6 @@
|
||||
"LONGITUDE": "Longitude",
|
||||
"TIMEZONE": "Timezone",
|
||||
"POSTCODE": "Postcode",
|
||||
"X_ROWS_SELECTED": "{ROWS} Rows Selected"
|
||||
"X_ROWS_SELECTED": "{ROWS} Rows Selected",
|
||||
"SUBTITLES": "Subtitles"
|
||||
}
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
"LIBRARY_OVERVIEW": "Vue d'ensemble des médiathèques"
|
||||
},
|
||||
"SESSIONS": {
|
||||
"NO_SESSIONS": "Aucune lecture en cours n'a été trouvée"
|
||||
"NO_SESSIONS": "Aucune lecture en cours n'a été trouvée",
|
||||
"DIRECT_PLAY": "",
|
||||
"TRANSCODE": ""
|
||||
},
|
||||
"STAT_CARDS": {
|
||||
"MOST_VIEWED_MOVIES": "FILMS LES PLUS VUS",
|
||||
@@ -301,5 +303,6 @@
|
||||
"LONGITUDE": "Longitude",
|
||||
"TIMEZONE": "Fuseau horaire",
|
||||
"POSTCODE": "Code postal",
|
||||
"X_ROWS_SELECTED": "{ROWS} Ligne(s) sélectionnée(s)"
|
||||
"X_ROWS_SELECTED": "{ROWS} Ligne(s) sélectionnée(s)",
|
||||
"SUBTITLES": ""
|
||||
}
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
"LIBRARY_OVERVIEW": "媒体库总览"
|
||||
},
|
||||
"SESSIONS": {
|
||||
"NO_SESSIONS": "未找到活动会话"
|
||||
"NO_SESSIONS": "未找到活动会话",
|
||||
"DIRECT_PLAY": "",
|
||||
"TRANSCODE": ""
|
||||
},
|
||||
"STAT_CARDS": {
|
||||
"MOST_VIEWED_MOVIES": "最多观看电影",
|
||||
@@ -301,5 +303,6 @@
|
||||
"LONGITUDE": "经度",
|
||||
"TIMEZONE": "时区",
|
||||
"POSTCODE": "邮编",
|
||||
"X_ROWS_SELECTED": "已选中 {ROWS} 行"
|
||||
"X_ROWS_SELECTED": "已选中 {ROWS} 行",
|
||||
"SUBTITLES": ""
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import SessionCard from "./session-card";
|
||||
|
||||
import Loading from "../general/loading";
|
||||
import { Trans } from "react-i18next";
|
||||
import i18next from "i18next";
|
||||
import socket from "../../../socket";
|
||||
|
||||
function convertBitrate(bitrate) {
|
||||
@@ -62,10 +63,11 @@ function Sessions() {
|
||||
return "";
|
||||
}
|
||||
|
||||
let transcodeType = "Direct Stream";
|
||||
|
||||
let transcodeType = i18next.t("SESSIONS.DIRECT_PLAY");
|
||||
let transcodeVideoCodec = "";
|
||||
if (row.TranscodingInfo && !row.TranscodingInfo.IsVideoDirect){
|
||||
transcodeType = "Transcode";
|
||||
transcodeType = i18next.t("SESSIONS.TRANSCODE");
|
||||
transcodeVideoCodec = ` -> ${row.TranscodingInfo.VideoCodec.toUpperCase()}`;
|
||||
}
|
||||
let bitRate = convertBitrate(
|
||||
@@ -75,7 +77,7 @@ function Sessions() {
|
||||
|
||||
const originalVideoCodec = videoStream.Codec.toUpperCase();
|
||||
|
||||
return `Video: ${transcodeType} (${originalVideoCodec}${transcodeVideoCodec} - ${bitRate})`;
|
||||
return `${i18next.t("VIDEO")}: ${transcodeType} (${originalVideoCodec}${transcodeVideoCodec} - ${bitRate})`;
|
||||
}
|
||||
|
||||
const getAudioStream = (row) => {
|
||||
@@ -85,10 +87,10 @@ function Sessions() {
|
||||
return "";
|
||||
}
|
||||
|
||||
let transcodeType = "Direct Stream";
|
||||
let transcodeType = i18next.t("SESSIONS.DIRECT_PLAY");
|
||||
let transcodeCodec = "";
|
||||
if (row.TranscodingInfo && !row.TranscodingInfo.IsAudioDirect){
|
||||
transcodeType = "Transcode";
|
||||
transcodeType = i18next.t("SESSIONS.TRANSCODE");
|
||||
transcodeCodec = ` -> ${row.TranscodingInfo.AudioCodec.toUpperCase()}`;
|
||||
}
|
||||
|
||||
@@ -109,8 +111,8 @@ function Sessions() {
|
||||
originalCodec = row.NowPlayingItem.MediaStreams[streamIndex].Codec.toUpperCase();
|
||||
}
|
||||
|
||||
return originalCodec != "" ? `Audio: ${transcodeType} (${originalCodec}${transcodeCodec}${bitRate})`
|
||||
: `Audio: ${transcodeType}`;
|
||||
return originalCodec != "" ? `${i18next.t("AUDIO")}: ${transcodeType} (${originalCodec}${transcodeCodec}${bitRate})`
|
||||
: `${i18next.t("AUDIO")}: ${transcodeType}`;
|
||||
}
|
||||
|
||||
const getSubtitleStream = (row) => {
|
||||
@@ -127,7 +129,7 @@ function Sessions() {
|
||||
}
|
||||
|
||||
if (row.NowPlayingItem.MediaStreams && row.NowPlayingItem.MediaStreams.length) {
|
||||
result = `Subtitles: ${row.NowPlayingItem.MediaStreams[subStreamIndex].DisplayTitle}`;
|
||||
result = `${i18next.t("SUBTITLES")}: ${row.NowPlayingItem.MediaStreams[subStreamIndex].DisplayTitle}`;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user