Skip to content

Commit 66d540b

Browse files
authored
Merge branch 'main' into feature/bump-versions
2 parents 6de2a77 + 06ba9b8 commit 66d540b

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Entity/BaseScheduledCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,10 +326,10 @@ public function getNextRunDate(bool $checkExecuteImmediately = true): ?DateTime
326326
return (new CronExpressionLib($this->getCronExpression()))->getNextRunDate();
327327
}
328328

329-
public function getCronExpressionTranslated(): string
329+
public function getCronExpressionTranslated(string $locale = 'en', bool $timeFormat24hours = false): string
330330
{
331331
try {
332-
return CronTranslator::translate($this->getCronExpression());
332+
return CronTranslator::translate($this->getCronExpression(), $locale, $timeFormat24hours);
333333
} catch (\Exception $e) {
334334
return 'error: could not translate cron expression';
335335
}

Entity/ScheduledCommandInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function setNotes(string $notes): static;
8686

8787
public function getNextRunDate(bool $checkExecuteImmediately = true): ?DateTime;
8888

89-
public function getCronExpressionTranslated(): string;
89+
public function getCronExpressionTranslated(string $locale = 'en', bool $timeFormat24hours = false): string;
9090

9191
public function __toString(): string;
9292
}

Resources/views/List/index.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
{{ command.command }} {{ command.arguments }}
5656
</td>
5757
<td>
58-
<span title="{{ command.getCronExpressionTranslated() }}">{{ command.cronExpression }}</span>
58+
<span title="{{ command.getCronExpressionTranslated(app.request.locale) }}">{{ command.cronExpression }}</span>
5959
</td>
6060
<td>
6161
{{ command.logFile }}

0 commit comments

Comments
 (0)