Skip to content

Commit

Permalink
feat: add mimssing translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Mohamed-Hacene committed May 16, 2024
1 parent bf774d7 commit 419a406
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 3 additions & 1 deletion frontend/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -520,5 +520,7 @@
"noStatus": "No status",
"actionPlanHelpText": "Separated by status and sorted by eta",
"matchingRequirements": "Matching requirements",
"asZIP": "as ZIP"
"asZIP": "as ZIP",
"incoming": "Incoming",
"outdated": "Outdated"
}
8 changes: 7 additions & 1 deletion frontend/src/lib/components/ModelTable/ModelTable.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,13 @@
{value.str ?? '-'}
{/if}
{:else if value && value.hexcolor}
<p class="flex w-fit min-w-24 justify-center px-2 py-1 rounded-md ml-2 whitespace-nowrap" style="background-color: {value.hexcolor}">{value.name ?? value.str ?? '-'}</p>
<p class="flex w-fit min-w-24 justify-center px-2 py-1 rounded-md ml-2 whitespace-nowrap" style="background-color: {value.hexcolor}">
{#if localItems(languageTag())[toCamelCase(value.name ?? value.str ?? '-')]}
{localItems(languageTag())[toCamelCase(value.name ?? value.str ?? '-')]}
{:else}
{value.name ?? value.str ?? '-'}
{/if}
</p>
{:else if ISO_8601_REGEX.test(value)}
{formatDateOrDateTime(value, languageTag())}
{:else}
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/lib/utils/locales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,10 @@ export function localItems(languageTag: string): LocalItems {
}),
actionPlan: m.actionPlan({ languageTag: languageTag }),
matchingRequirements: m.matchingRequirements({ languageTag: languageTag }),
remediationPlan: m.remediationPlan({ languageTag: languageTag })
remediationPlan: m.remediationPlan({ languageTag: languageTag }),
incoming: m.incoming({ languageTag: languageTag }),
today: m.today({ languageTag: languageTag }),
outdated: m.outdated({ languageTag: languageTag }),
};
return LOCAL_ITEMS;
}

0 comments on commit 419a406

Please sign in to comment.