Skip to content

Commit

Permalink
feat: translate tags in model table
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed Feb 28, 2024
1 parent a9833c5 commit 9895ae6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/src/lib/components/ModelTable/ModelTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
{#if tagData}
{@const {text, cssClasses} = tagData}
<span class={cssClasses}>
{text}
{localItems(languageTag())[text]}
</span>
{/if}
{/each}
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/lib/utils/crud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
}
}
},
Expand Down

0 comments on commit 9895ae6

Please sign in to comment.