From ce873ce6895b414d76d2b22eccd3dce63407e7f6 Mon Sep 17 00:00:00 2001 From: Erling Hauan Date: Wed, 30 Oct 2024 09:09:17 +0100 Subject: [PATCH] Reuse established text keys --- frontend/language/src/nb.json | 3 --- .../EditOptions/hooks/useCodeListEditorTexts.ts | 16 +++++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/frontend/language/src/nb.json b/frontend/language/src/nb.json index ef44bc95285..4f4e4ffc274 100644 --- a/frontend/language/src/nb.json +++ b/frontend/language/src/nb.json @@ -1633,9 +1633,6 @@ "ux_editor.options.tab_codelist": "Velg kodeliste", "ux_editor.options.tab_manual": "Sett opp egne alternativer", "ux_editor.options.tab_referenceId": "Angi referanse-ID", - "ux_editor.options_text_description": "Beskrivelse", - "ux_editor.options_text_help_text": "Hjelpetekst", - "ux_editor.options_text_label": "Ledetekst", "ux_editor.page": "Side", "ux_editor.page_config_pdf_abort_converting_page_to_pdf": "Avbryt å gjøre om siden til PDF", "ux_editor.page_config_pdf_card_heading": "Siden skal være en PDF", diff --git a/frontend/packages/ux-editor/src/components/config/editModal/EditOptions/hooks/useCodeListEditorTexts.ts b/frontend/packages/ux-editor/src/components/config/editModal/EditOptions/hooks/useCodeListEditorTexts.ts index 9181873749f..32a11d09249 100644 --- a/frontend/packages/ux-editor/src/components/config/editModal/EditOptions/hooks/useCodeListEditorTexts.ts +++ b/frontend/packages/ux-editor/src/components/config/editModal/EditOptions/hooks/useCodeListEditorTexts.ts @@ -7,16 +7,18 @@ export const useCodeListEditorTexts = () => { add: t('ux_editor.modal_new_option'), codeList: t('ux_editor.modal_add_options_codelist'), delete: t('general.delete'), - deleteItem: (number) => t('ux_editor.modal_properties_code_list_delete_item', { number }), + deleteItem: (number: number) => + t('ux_editor.modal_properties_code_list_delete_item', { number }), description: t('general.description'), emptyCodeList: t('ux_editor.modal_properties_code_list_empty'), - helpText: t('ux_editor.options_text_help_text'), - itemDescription: (number) => + helpText: t('ux_editor.modal_properties_textResourceBindings_help'), + itemDescription: (number: number) => t('ux_editor.modal_properties_code_list_item_description', { number }), - itemHelpText: (number) => t('ux_editor.modal_properties_code_list_item_helpText', { number }), - itemLabel: (number) => t('ux_editor.modal_properties_code_list_item_label', { number }), - itemValue: (number) => t('ux_editor.modal_properties_code_list_item_value', { number }), - label: t('ux_editor.options_text_label'), + itemHelpText: (number: number) => + t('ux_editor.modal_properties_code_list_item_helpText', { number }), + itemLabel: (number: number) => t('ux_editor.modal_properties_code_list_item_label', { number }), + itemValue: (number: number) => t('ux_editor.modal_properties_code_list_item_value', { number }), + label: t('ux_editor.modal_properties_textResourceBindings_title'), value: t('general.value'), }; };