mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-03 13:44:33 -04:00
Front: MediaInfo: Show 'Default' only if there is more than 1 track + add missing translations
This commit is contained in:
parent
4332bfee9b
commit
b98df08f44
@ -39,14 +39,16 @@ const MediaInfoTable = ({
|
|||||||
if (trackTable.length == 0) {
|
if (trackTable.length == 0) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
const singleTrack = trackTable.length == 1
|
||||||
return trackTable.reduce(
|
return trackTable.reduce(
|
||||||
(collected, audioTrack, index) => ({
|
(collected, audioTrack, index) => ({
|
||||||
...collected,
|
...collected,
|
||||||
// If there is only one track, we do not need to show an index
|
// If there is only one track, we do not need to show an index
|
||||||
[trackTable.length == 1 ? t(s) : `${t(s)} ${index + 1}`]: [
|
[singleTrack ? t(s) : `${t(s)} ${index + 1}`]: [
|
||||||
audioTrack.displayName,
|
audioTrack.displayName,
|
||||||
audioTrack.isDefault ? t("Default") : undefined,
|
// Only show it if there is more than one track
|
||||||
audioTrack.isForced ? t("Forced") : undefined,
|
(audioTrack.isDefault && !singleTrack) ? t("mediainfo.default") : undefined,
|
||||||
|
audioTrack.isForced ? t("mediainfo.forced") : undefined,
|
||||||
audioTrack.codec,
|
audioTrack.codec,
|
||||||
]
|
]
|
||||||
.filter((x) => x !== undefined)
|
.filter((x) => x !== undefined)
|
||||||
|
@ -181,6 +181,8 @@
|
|||||||
"container": "Container",
|
"container": "Container",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
"subtitles": "Subtitles"
|
"subtitles": "Subtitles",
|
||||||
|
"forced": "Forced",
|
||||||
|
"default": "Default"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -181,6 +181,8 @@
|
|||||||
"container": "Conteneur",
|
"container": "Conteneur",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
"subtitles": "Sous titres"
|
"subtitles": "Sous titres",
|
||||||
|
"forced": "Forcé",
|
||||||
|
"default": "Par Défaut"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user