diff --git a/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte b/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte index 8d4845c42..3e94cd211 100644 --- a/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte +++ b/frontend/src/lib/components/Breadcrumbs/Breadcrumbs.svelte @@ -9,13 +9,7 @@ let crumbs: Array<{ label: string; href: string; icon?: string }> = []; - const disableWorkhopLink = [ - 'workshop1', - 'workshop2', - 'workshop3', - 'workshop4', - 'workshop5', - ] // Disable workshops links in breadcrumb + const disableWorkhopLink = ['workshop1', 'workshop2', 'workshop3', 'workshop4', 'workshop5']; // Disable workshops links in breadcrumb $: { // Remove zero-length tokens. diff --git a/frontend/src/lib/components/DetailView/DetailView.svelte b/frontend/src/lib/components/DetailView/DetailView.svelte index 4a2f12545..95303fcc8 100644 --- a/frontend/src/lib/components/DetailView/DetailView.svelte +++ b/frontend/src/lib/components/DetailView/DetailView.svelte @@ -345,7 +345,7 @@ {value} {:else if ISO_8601_REGEX.test(value) && (key === 'created_at' || key === 'updated_at' || key === 'expiry_date' || key === 'accepted_at' || key === 'rejected_at' || key === 'revoked_at' || key === 'eta')} {formatDateOrDateTime(value, languageTag())} - {:else if m[toCamelCase((value.str || value.name) ?? value)]} + {:else if m[toCamelCase(value.str || value.name)]} {safeTranslate((value.str || value.name) ?? value)} {:else} {(value.str || value.name) ?? value} diff --git a/frontend/src/lib/utils/crud.ts b/frontend/src/lib/utils/crud.ts index 18be4059a..fc57fe0a5 100644 --- a/frontend/src/lib/utils/crud.ts +++ b/frontend/src/lib/utils/crud.ts @@ -653,7 +653,7 @@ export const URL_MODEL_MAP: ModelMap = { { field: 'risk-origin' }, { field: 'motivation', valueType: 'number' }, { field: 'resources', valueType: 'number' }, - { field: 'activity', valueType: 'number' }, + { field: 'activity', valueType: 'number' } ] }, stakeholders: { diff --git a/frontend/src/lib/utils/i18n.ts b/frontend/src/lib/utils/i18n.ts index ad8357744..4cdc174d2 100644 --- a/frontend/src/lib/utils/i18n.ts +++ b/frontend/src/lib/utils/i18n.ts @@ -14,6 +14,9 @@ export function unsafeTranslate(key: string, params = {}, options = {}): string if (Object.hasOwn(m, toCamelCase(key))) { return m[toCamelCase(key)](params, options); } + if (typeof key === 'boolean') { + return key ? '✅' : '❌'; + } } /**