- {#if items[$pageTitle]}
- {items[$pageTitle]}
+ {#if localItems(languageTag())[$pageTitle]}
+ {localItems(languageTag())[$pageTitle]}
{:else}
{$pageTitle}
{/if}
diff --git a/frontend/src/routes/(app)/[model=urlmodel]/+page.svelte b/frontend/src/routes/(app)/[model=urlmodel]/+page.svelte
index de77be9c7..cf46c91a0 100644
--- a/frontend/src/routes/(app)/[model=urlmodel]/+page.svelte
+++ b/frontend/src/routes/(app)/[model=urlmodel]/+page.svelte
@@ -12,7 +12,7 @@
import { superForm } from 'sveltekit-superforms/client';
import type { PageData } from './$types';
import * as m from '$paraglide/messages';
- import { localItems, getDeterminant } from '$lib/utils/locales';
+ import { localItems, capitalizeFirstLetter } from '$lib/utils/locales';
import { languageTag } from '$paraglide/runtime';
export let data: PageData;
@@ -77,7 +77,7 @@
type: 'component',
component: modalComponent,
// Data
- title: `New ${data.model.verboseName}`
+ title: localItems(languageTag())['add' + capitalizeFirstLetter(data.model.localName)]
};
modalStore.trigger(modal);
}
@@ -95,9 +95,8 @@
data-testid="add-button"
on:click={modalCreateForm}
>
- {m.addButton({determinant:getDeterminant(languageTag(), "undefined", data.model), model: localItems(languageTag())[data.model.localName].toLowerCase()})}
-
+ {localItems(languageTag())['add' + capitalizeFirstLetter(data.model.localName)]}
+
{:else if data.URLModel === 'risk-matrices'}
{m.importMatrices()}
{#each Object.entries(data.data).filter(([key, _]) => !['id', 'is_published'].includes(key)) as [key, value]}
-
- {localItems(languageTag())[toCamelCase(key.toLowerCase())]}
+
+ {localItems(languageTag())[toCamelCase(key)]}
- -
+
-
{#if value}
{#if Array.isArray(value)}
{#if Object.keys(value).length > 0}
{#each value as val}
- -
+
-
{#if val.str && val.id}
{@const itemHref = `/${
URL_MODEL_MAP[data.urlModel]['foreignKeyFields']?.find(
@@ -226,7 +234,7 @@
{m.edit()}{m.edit()}
{/if}
@@ -248,16 +256,12 @@
{#if tabSet === index}
- {#if model.info.localFrGender === 'f'}
- {m.associatedObject({model: localItems(languageTag())[model.info.localNamePlural].toLowerCase(), e: 'e'})}
- {:else}
- {m.associatedObject({model: localItems(languageTag())[model.info.localNamePlural].toLowerCase(), e: ''})}
- {/if}
+ {localItems(languageTag())['associated' + capitalizeFirstLetter(model.info.localNamePlural)]}
{localItems(languageTag())['add' + capitalizeFirstLetter(model.info.localName)]}
{#if model.table}
diff --git a/frontend/src/routes/(app)/analytics/+page.svelte b/frontend/src/routes/(app)/analytics/+page.svelte
index 827f2747e..cbdcb9cf9 100644
--- a/frontend/src/routes/(app)/analytics/+page.svelte
+++ b/frontend/src/routes/(app)/analytics/+page.svelte
@@ -39,7 +39,9 @@
let dropdown_selected_values: any;
for (const item in security_measure_status.labels) {
- security_measure_status.labels[item] = localItems(languageTag())[security_measure_status.localLables[item]];
+ security_measure_status.labels[item] = localItems(languageTag())[
+ security_measure_status.localLables[item]
+ ];
}
onMount(async () => {
@@ -293,9 +295,9 @@
{#if counters.Project > 1}
- {m.assignedObjects({number: counters.Project, object: m.projects()})}
+ {m.assignedProjects({ number: counters.Project, s: 's' })}
{:else}
- {m.assignedObjects({number: counters.Project, object: m.project()})}
+ {m.assignedProjects({ number: counters.Project, s: '' })}
{/if}
@@ -524,7 +526,7 @@ c0.27-0.268,0.707-0.268,0.979,0l7.908,7.83c0.27,0.268,0.27,0.701,0,0.969c-0.271,
- {m.noPendingObject({object:m.securityMeasure().toLowerCase(), e:'e'})}.
+
+ {m.noPendingSecurityMeasure()}.
+
|
{/if}