Browse Source

Merge branch 'dev' into subtitle-file-type-control

pull/250/head
Emre Can Minnet 2 years ago committed by GitHub
parent
commit
b04209d9b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/setup/locales/cs/translation.json
  2. 2
      src/setup/locales/de/translation.json
  3. 2
      src/setup/locales/en/translation.json
  4. 2
      src/setup/locales/fr/translation.json
  5. 2
      src/setup/locales/nl/translation.json
  6. 2
      src/setup/locales/zh/translation.json
  7. 18
      src/video/components/actions/TimeAction.tsx

2
src/setup/locales/cs/translation.json

@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
"backToHomeShort": "Zpět",
"seasonAndEpisode": "S{{season}} E{{episode}}",
"timeLeft": "Zbývá {{timeLeft}}",
"finishAt": "Končí ve {{timeFinished}}",
"finishAt": "Končí ve {{timeFinished, datetime}}",
"buttons": {
"episodes": "Epizody",
"source": "Zdroj",

2
src/setup/locales/de/translation.json

@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
"backToHomeShort": "Rückmeldung",
"seasonAndEpisode": "S{{season}} E{{episode}}",
"timeLeft": "{{timeLeft}} bleibt",
"finishAt": "Ende um {{timeFinished}}",
"finishAt": "Ende um {{timeFinished, datetime}}",
"buttons": {
"episodes": "Folgen",
"source": "Quelle",

2
src/setup/locales/en/translation.json

@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
"backToHomeShort": "Back",
"seasonAndEpisode": "S{{season}} E{{episode}}",
"timeLeft": "{{timeLeft}} left",
"finishAt": "Finish at {{timeFinished}}",
"finishAt": "Finish at {{timeFinished, datetime}}",
"buttons": {
"episodes": "Episodes",
"source": "Source",

2
src/setup/locales/fr/translation.json

@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
"backToHomeShort": "Retour",
"seasonAndEpisode": "S{{season}} E{{episode}}",
"timeLeft": "{{timeLeft}} restant",
"finishAt": "Terminer à {{timeFinished}}",
"finishAt": "Terminer à {{timeFinished, datetime}}",
"buttons": {
"episodes": "Épisodes",
"source": "Source",

2
src/setup/locales/nl/translation.json

@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
"backToHomeShort": "Terug",
"seasonAndEpisode": "S{{season}} A{{episode}}",
"timeLeft": "Nog {{timeLeft}}",
"finishAt": "Afgelopen om {{timeFinished}}",
"finishAt": "Afgelopen om {{timeFinished, datetime}}",
"buttons": {
"episodes": "Afleveringen",
"source": "Bron",

2
src/setup/locales/zh/translation.json

@ -58,7 +58,7 @@ @@ -58,7 +58,7 @@
"backToHomeShort": "返回",
"seasonAndEpisode": "第{{season}}季 第{{episode}}集",
"timeLeft": "还剩余 {{timeLeft}}",
"finishAt": "在 {{timeFinished}} 结束",
"finishAt": "在 {{timeFinished, datetime}} 结束",
"buttons": {
"episodes": "分集",
"source": "视频源",

18
src/video/components/actions/TimeAction.tsx

@ -55,20 +55,20 @@ export function TimeAction(props: Props) { @@ -55,20 +55,20 @@ export function TimeAction(props: Props) {
hasHours
);
const duration = formatSeconds(videoTime.duration, hasHours);
const timeLeft = formatSeconds(
const remaining = formatSeconds(
(videoTime.duration - videoTime.time) / mediaPlaying.playbackSpeed,
hasHours
);
const timeFinished = new Date(
new Date().getTime() +
(videoTime.duration * 1000) / mediaPlaying.playbackSpeed
).toLocaleTimeString("en-US", {
hour: "numeric",
minute: "numeric",
hour12: true,
});
((videoTime.duration - videoTime.time) * 1000) /
mediaPlaying.playbackSpeed
);
const formattedTimeFinished = ` - ${t("videoPlayer.finishAt", {
timeFinished,
formatParams: {
timeFinished: { hour: "numeric", minute: "numeric" },
},
})}`;
let formattedTime: string;
@ -77,10 +77,10 @@ export function TimeAction(props: Props) { @@ -77,10 +77,10 @@ export function TimeAction(props: Props) {
formattedTime = `${currentTime} ${props.noDuration ? "" : `/ ${duration}`}`;
} else if (timeFormat === VideoPlayerTimeFormat.REMAINING && !isMobile) {
formattedTime = `${t("videoPlayer.timeLeft", {
timeLeft,
timeLeft: remaining,
})}${videoTime.time === videoTime.duration ? "" : formattedTimeFinished} `;
} else if (timeFormat === VideoPlayerTimeFormat.REMAINING && isMobile) {
formattedTime = `-${timeLeft}`;
formattedTime = `-${remaining}`;
} else {
formattedTime = "";
}

Loading…
Cancel
Save