From cfb3da6592f2de23cb1a7ac420f19fc77fa338aa Mon Sep 17 00:00:00 2001 From: Yassine Doghri Date: Thu, 20 Jan 2022 15:37:54 +0000 Subject: [PATCH] fix: keep subtitle line breaks when parsing srt file to json update job duration label for video clips list --- app/Libraries/TranscriptParser.php | 3 +++ modules/Admin/Language/en/VideoClip.php | 2 +- modules/Admin/Language/fr/VideoClip.php | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Libraries/TranscriptParser.php b/app/Libraries/TranscriptParser.php index 66c07b6e..8eaa1e87 100644 --- a/app/Libraries/TranscriptParser.php +++ b/app/Libraries/TranscriptParser.php @@ -68,6 +68,9 @@ class TranscriptParser $subs[] = $sub; } else { + if ($subText !== '') { + $subText .= PHP_EOL . $line; + } $subText .= $line; } break; diff --git a/modules/Admin/Language/en/VideoClip.php b/modules/Admin/Language/en/VideoClip.php index 1f764431..8e804f22 100644 --- a/modules/Admin/Language/en/VideoClip.php +++ b/modules/Admin/Language/en/VideoClip.php @@ -25,7 +25,7 @@ return [ 'passed_hint' => 'Clip was generated successfully!', ], 'clip' => 'Clip', - 'duration' => 'Duration', + 'duration' => 'Job duration', ], 'title' => 'Video clip: {videoClipLabel}', 'download_clip' => 'Download clip', diff --git a/modules/Admin/Language/fr/VideoClip.php b/modules/Admin/Language/fr/VideoClip.php index e2e1b79d..a0646869 100644 --- a/modules/Admin/Language/fr/VideoClip.php +++ b/modules/Admin/Language/fr/VideoClip.php @@ -25,7 +25,7 @@ return [ 'passed_hint' => 'L’extrait a été généré avec succès !', ], 'clip' => 'Extrait', - 'duration' => 'Durée', + 'duration' => 'Durée de traitement', ], 'title' => 'Extrait vidéo : {videoClipLabel}', 'download_clip' => 'Télécharger l’extrait',