diff --git a/lib/Alchemy/Phrasea/WorkerManager/Worker/SubtitleWorker.php b/lib/Alchemy/Phrasea/WorkerManager/Worker/SubtitleWorker.php index 042b5c7c1d..1fe2ad9f8d 100644 --- a/lib/Alchemy/Phrasea/WorkerManager/Worker/SubtitleWorker.php +++ b/lib/Alchemy/Phrasea/WorkerManager/Worker/SubtitleWorker.php @@ -243,7 +243,11 @@ public function process(array $payload) $this->getEventsManager()->notify( $payload['authenticatedUserId'], 'eventsmanager_notify_subtitle', - json_encode([]), + json_encode([ + 'translateMessage' => 'notification:: subtitle "%langues%" generated for "%title%" !', + 'langues' => implode(', ', array_keys($payload['languageDestination'])), + 'title' => htmlentities($record->get_title()) + ]), false ); diff --git a/lib/classes/eventsmanager/notify/subtitle.php b/lib/classes/eventsmanager/notify/subtitle.php index 47b0128fb7..8fd9e1a3df 100644 --- a/lib/classes/eventsmanager/notify/subtitle.php +++ b/lib/classes/eventsmanager/notify/subtitle.php @@ -30,7 +30,7 @@ public function icon_url() */ public function datas(array $data, $unread) { - $text = $this->app->trans('notification:: subtitle generation finished'); + $text = $this->app->trans($data['translateMessage'], ['%title%' => $data['title'], '%langues%' => $data['langues']]); return [ 'text' => $text, diff --git a/templates/web/prod/actions/Tools/videoEditor.html.twig b/templates/web/prod/actions/Tools/videoEditor.html.twig index c6a53eea7a..7144a8b1f5 100644 --- a/templates/web/prod/actions/Tools/videoEditor.html.twig +++ b/templates/web/prod/actions/Tools/videoEditor.html.twig @@ -361,7 +361,6 @@ $('#submit-subtitle-request').on('click', function (e) { e.preventDefault(); - console.log("auto-subtitle process"); var destination = {}; $.each($('input[name=subtitle_language_destination]'), function(k, input){ @@ -382,8 +381,9 @@ subtitle_destination: JSON.stringify(destination), }, success: function success(data) { - console.log(data); $('#request-status').removeClass('hide'); + + $('#submit-subtitle-request').hide(); } }); });