Skip to content

Commit

Permalink
make data model name bold using Trans
Browse files Browse the repository at this point in the history
  • Loading branch information
standeren committed Jul 5, 2024
1 parent d3b425e commit b8252c7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -46,7 +46,13 @@ export function DeleteWrapper({ selectedOption }: DeleteWrapperProps) {
</StudioButton>
}
>
<p>{t('schema_editor.delete_model_confirm', { schemaName })}</p>
<p>
<Trans
i18nKey={'schema_editor.delete_model_confirm'}
values={{ schemaName }}
components={{ bold: <strong /> }}
/>
</p>
</AltinnConfirmDialog>
);
}
2 changes: 1 addition & 1 deletion frontend/language/src/nb.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 <bold>{{schemaName}}</bold>?",
"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",
Expand Down

0 comments on commit b8252c7

Please sign in to comment.