diff --git a/frontend/app-development/features/dataModelling/SchemaEditorWithToolbar/TopToolbar/DeleteWrapper.test.tsx b/frontend/app-development/features/dataModelling/SchemaEditorWithToolbar/TopToolbar/DeleteWrapper.test.tsx index 37efb4b75e6..b7ab0f52612 100644 --- a/frontend/app-development/features/dataModelling/SchemaEditorWithToolbar/TopToolbar/DeleteWrapper.test.tsx +++ b/frontend/app-development/features/dataModelling/SchemaEditorWithToolbar/TopToolbar/DeleteWrapper.test.tsx @@ -22,9 +22,7 @@ const user = userEvent.setup(); const deleteText = textMock('schema_editor.delete_data_model'); const continueText = textMock('schema_editor.confirm_deletion'); const cancelText = textMock('general.cancel'); -const confirmText = textMock('schema_editor.delete_model_confirm', { - schemaName: dataModel1NameMock, -}); +const confirmText = textMock('schema_editor.delete_model_confirm'); const selectedOption = convertMetadataToOption(jsonMetadata1Mock); const defaultProps: DeleteWrapperProps = { selectedOption }; diff --git a/frontend/app-development/features/dataModelling/SchemaEditorWithToolbar/TopToolbar/DeleteWrapper.tsx b/frontend/app-development/features/dataModelling/SchemaEditorWithToolbar/TopToolbar/DeleteWrapper.tsx index c1e9f48d254..3329951cf59 100644 --- a/frontend/app-development/features/dataModelling/SchemaEditorWithToolbar/TopToolbar/DeleteWrapper.tsx +++ b/frontend/app-development/features/dataModelling/SchemaEditorWithToolbar/TopToolbar/DeleteWrapper.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { useTranslation } from 'react-i18next'; +import { Trans, useTranslation } from 'react-i18next'; import { StudioButton } from '@studio/components'; import { TrashIcon } from '@studio/icons'; import { useDeleteDataModelMutation } from '../../../../hooks/mutations'; @@ -46,7 +46,13 @@ export function DeleteWrapper({ selectedOption }: DeleteWrapperProps) { } > -

{t('schema_editor.delete_model_confirm', { schemaName })}

+

+ }} + /> +

); } diff --git a/frontend/language/src/nb.json b/frontend/language/src/nb.json index d3cfe6bd320..e5ad5b06d8e 100644 --- a/frontend/language/src/nb.json +++ b/frontend/language/src/nb.json @@ -1315,7 +1315,7 @@ "schema_editor.delete": "Slett", "schema_editor.delete_data_model": "Slett datamodell", "schema_editor.delete_field": "Slett felt", - "schema_editor.delete_model_confirm": "Er du sikker på at du vil slette {{schemaName}}?", + "schema_editor.delete_model_confirm": "Er du sikker på at du vil slette datamodellen {{schemaName}}?", "schema_editor.depth_error": "Det er ikke mulig å plassere gruppen her fordi det vil føre til at skjemaet får for mange nivåer.", "schema_editor.description": "Tekst", "schema_editor.descriptive_fields": "Beskrivende felter",