| 1 | import type { Translator } from "./i18n"; |
| 2 | |
| 3 | export function completionVerdictLabel(verdict: string, t: Translator): string { |
| 4 | switch (verdict.trim().toLowerCase()) { |
| 5 | case "complete": return t("task.state.succeeded"); |
| 6 | case "partial": return t("completion.verdictPartial"); |
| 7 | case "blocked": return t("completion.verdictBlocked"); |
| 8 | case "continue": return t("notice.decisionRecoveryContinue"); |
| 9 | default: return t("projectTree.status.waitingConfirmation"); |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | export function completionReviewLabel(review: string, t: Translator): string { |
| 14 | switch (review.trim().toLowerCase()) { |
| 15 | case "none": return t("common.none"); |
| 16 | case "passed": return t("task.state.succeeded"); |
| 17 | case "warned": return t("diag.warnings"); |
| 18 | case "failed": return t("task.state.failed"); |
| 19 | case "unavailable": return t("caps.toolUnavailable"); |
| 20 | default: return t("projectTree.status.waitingConfirmation"); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | export function completionGapLabel(gap: string, t: Translator): string { |
| 25 | switch (gap.trim().toLowerCase()) { |
| 26 | case "suppressed": |
| 27 | case "suppressed_requirement": return t("tool.shell.verificationNotRun"); |
| 28 | case "stale_check": return t("completion.gapStaleCheck"); |
| 29 | default: return t("context.other"); |
| 30 | } |
| 31 | } |
| 32 |