From b9326ecb35b3d46ba7d20d36ce014ee2a0da4ffe Mon Sep 17 00:00:00 2001 From: knallcharge <1715912+knallcharge@users.noreply.github.com> Date: Fri, 6 Feb 2026 13:33:40 +0100 Subject: [PATCH 1/4] Enhance getCronExpressionTranslated with locale and time format --- Entity/BaseScheduledCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Entity/BaseScheduledCommand.php b/Entity/BaseScheduledCommand.php index 683413f..a8965a2 100644 --- a/Entity/BaseScheduledCommand.php +++ b/Entity/BaseScheduledCommand.php @@ -326,10 +326,10 @@ public function getNextRunDate(bool $checkExecuteImmediately = true): ?DateTime return (new CronExpressionLib($this->getCronExpression()))->getNextRunDate(); } - public function getCronExpressionTranslated(): string + public function getCronExpressionTranslated(string $locale = 'en', bool $timeFormat24hours = false): string { try { - return CronTranslator::translate($this->getCronExpression()); + return CronTranslator::translate($this->getCronExpression(), $locale, $timeFormat24hours); } catch (\Exception $e) { return 'error: could not translate cron expression'; } From e94c09794a6b796d09d4cc7005ecb4c1b260037b Mon Sep 17 00:00:00 2001 From: knallcharge <1715912+knallcharge@users.noreply.github.com> Date: Fri, 6 Feb 2026 13:35:02 +0100 Subject: [PATCH 2/4] Update cron expression translation with locale --- Resources/views/List/index.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Resources/views/List/index.html.twig b/Resources/views/List/index.html.twig index ae73ae0..554c1eb 100644 --- a/Resources/views/List/index.html.twig +++ b/Resources/views/List/index.html.twig @@ -55,7 +55,7 @@ {{ command.command }} {{ command.arguments }} - {{ command.cronExpression }} + {{ command.cronExpression }} {{ command.logFile }} From 39c500a7b04ad8e976004c2393d91a0e7b6cd9f8 Mon Sep 17 00:00:00 2001 From: knallcharge <1715912+knallcharge@users.noreply.github.com> Date: Fri, 6 Feb 2026 13:35:20 +0100 Subject: [PATCH 3/4] Update cron-translator dependency version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c3e6e46..aa6efd3 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "doctrine/persistence": "^3.4.1 || ^4.1", "dragonmantank/cron-expression": "^3.6", "knplabs/knp-time-bundle": "^2.4", - "lorisleiva/cron-translator": "^0.4.6", + "lorisleiva/cron-translator": "^0.5.0", "symfony/asset": "^7.4 || ^8.0", "symfony/config": "^7.4 || ^8.0", "symfony/console": "^7.4 || ^8.0", From d6e39477aeb5aeec227af39596e106fc1fa68a2c Mon Sep 17 00:00:00 2001 From: knallcharge <1715912+knallcharge@users.noreply.github.com> Date: Fri, 6 Feb 2026 13:45:23 +0100 Subject: [PATCH 4/4] Update getCronExpressionTranslated method signature --- Entity/ScheduledCommandInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Entity/ScheduledCommandInterface.php b/Entity/ScheduledCommandInterface.php index 5fc022c..0522462 100644 --- a/Entity/ScheduledCommandInterface.php +++ b/Entity/ScheduledCommandInterface.php @@ -86,7 +86,7 @@ public function setNotes(string $notes): static; public function getNextRunDate(bool $checkExecuteImmediately = true): ?DateTime; - public function getCronExpressionTranslated(): string; + public function getCronExpressionTranslated(string $locale = 'en', bool $timeFormat24hours = false): string; public function __toString(): string; }