From 9895ae690cfc261c880fa5b1905704eb8265b604 Mon Sep 17 00:00:00 2001 From: Mohamed-Hacene Date: Wed, 28 Feb 2024 20:00:41 +0100 Subject: [PATCH] feat: translate tags in model table --- .../src/lib/components/ModelTable/ModelTable.svelte | 2 +- frontend/src/lib/utils/crud.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/lib/components/ModelTable/ModelTable.svelte b/frontend/src/lib/components/ModelTable/ModelTable.svelte index 56af1af8e..ce4607256 100644 --- a/frontend/src/lib/components/ModelTable/ModelTable.svelte +++ b/frontend/src/lib/components/ModelTable/ModelTable.svelte @@ -193,7 +193,7 @@ {#if tagData} {@const {text, cssClasses} = tagData} - {text} + {localItems(languageTag())[text]} {/if} {/each} diff --git a/frontend/src/lib/utils/crud.ts b/frontend/src/lib/utils/crud.ts index 29a2b7206..9c9edd27b 100644 --- a/frontend/src/lib/utils/crud.ts +++ b/frontend/src/lib/utils/crud.ts @@ -400,11 +400,11 @@ export const FIELD_COLORED_TAG_MAP: FieldColoredTagMap = { name: { key: 'treatment', values: { - Open: { text: 'Open', cssClasses: 'badge bg-green-300' }, - Mitigate: { text: 'Mitigate', cssClasses: 'badge bg-lime-200' }, - Accept: { text: 'Accept', cssClasses: 'badge bg-green-200' }, - Avoid: { text: 'Avoid', cssClasses: 'badge bg-red-200' }, - Transfer: { text: 'Transfer', cssClasses: 'badge bg-yellow-300' } + Open: { text: 'open', cssClasses: 'badge bg-green-300' }, + Mitigate: { text: 'mitigate', cssClasses: 'badge bg-lime-200' }, + Accept: { text: 'accept', cssClasses: 'badge bg-green-200' }, + Avoid: { text: 'avoid', cssClasses: 'badge bg-red-200' }, + Transfer: { text: 'transfer', cssClasses: 'badge bg-yellow-300' } } } },