Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore: files changed app/src/components/settings/panels/cron/CoreJobList.tsx

Steven Enamakel740051715982
diff --git a/app/src/components/settings/panels/cron/CoreJobList.tsx b/app/src/components/settings/panels/cron/CoreJobList.tsx
index af82354d55..f494e230d5 100644
--- a/app/src/components/settings/panels/cron/CoreJobList.tsx
+++ b/app/src/components/settings/panels/cron/CoreJobList.tsx
@@ -195,16 +195,27 @@ const CoreJobList = ({
</div>
{runs.map(run => {
const finishedAt = new Date(run.finished_at).toLocaleString();
- const [beforeTime, afterTime] = t('settings.cron.jobs.runFinishedAt')
- .replace('{time}', '')
- .split('');
+ // Split on the placeholders (rather than assuming
+ // "{status} at {time}" order) so a locale that reorders
+ // the phrase still renders correctly.
+ const parts = t('settings.cron.jobs.runFinishedAt').split(
+ /(\{status\}|\{time\})/g
+ );
return (
<div key={run.id} className="text-xs text-content-secondary">
- {beforeTime.replace('{status}', '')}
- <span className="font-medium text-content-secondary">{run.status}</span>
- {beforeTime.includes('{status}') ? '' : null}
- {afterTime.replace('{time}', '')}
- {finishedAt}
+ {parts.map((part, index) => {
+ if (part === '{status}') {
+ return (
+ <span key={index} className="font-medium text-content-secondary">
+ {run.status}
+ </span>
+ );
+ }
+ if (part === '{time}') {
+ return <span key={index}>{finishedAt}</span>;
+ }
+ return part;
+ })}
</div>
);
})}