diff --git a/mscr-ui/public/locales/en/common.json b/mscr-ui/public/locales/en/common.json index 80fc3e2f0..d01bc0333 100644 --- a/mscr-ui/public/locales/en/common.json +++ b/mscr-ui/public/locales/en/common.json @@ -194,6 +194,17 @@ "library": "", "library-variant": "", "link-opens-new-window-external": "", + "loading-circle-label": "", + "mapping-modal": { + "add-mapping": "Add mapping", + "edit-mapping": "Edit mapping", + "exact-match": "Exact match", + "mapping-operation": "Mapping operation", + "no-notes-set": "No notes set. Add free form notes here.", + "notes": "Notes", + "operation-not-selected": "Operation not selected", + "predicate": "Predicate" + }, "mappings-accordion": { "clear": "Clear", "filter-from-mappings": "Filter from mappings", diff --git a/mscr-ui/public/locales/fi/common.json b/mscr-ui/public/locales/fi/common.json index 25658155b..6e7818c5c 100644 --- a/mscr-ui/public/locales/fi/common.json +++ b/mscr-ui/public/locales/fi/common.json @@ -194,6 +194,17 @@ "library": "", "library-variant": "", "link-opens-new-window-external": "", + "loading-circle-label": "", + "mapping-modal": { + "add-mapping": "", + "edit-mapping": "", + "exact-match": "", + "mapping-operation": "", + "no-notes-set": "", + "notes": "", + "operation-not-selected": "", + "predicate": "" + }, "mappings-accordion": { "clear": "", "filter-from-mappings": "", diff --git a/mscr-ui/public/locales/sv/common.json b/mscr-ui/public/locales/sv/common.json index 145cbc0b8..ff56e8e1d 100644 --- a/mscr-ui/public/locales/sv/common.json +++ b/mscr-ui/public/locales/sv/common.json @@ -194,6 +194,17 @@ "library": "", "library-variant": "", "link-opens-new-window-external": "", + "loading-circle-label": "", + "mapping-modal": { + "add-mapping": "", + "edit-mapping": "", + "exact-match": "", + "mapping-operation": "", + "no-notes-set": "", + "notes": "", + "operation-not-selected": "", + "predicate": "" + }, "mappings-accordion": { "clear": "", "filter-from-mappings": "", diff --git a/mscr-ui/src/modules/crosswalk-editor/tabs/node-mappings/index.tsx b/mscr-ui/src/modules/crosswalk-editor/tabs/node-mappings/index.tsx index 38f07fb93..1d2be298c 100644 --- a/mscr-ui/src/modules/crosswalk-editor/tabs/node-mappings/index.tsx +++ b/mscr-ui/src/modules/crosswalk-editor/tabs/node-mappings/index.tsx @@ -14,10 +14,15 @@ import { ModalTitle, } from 'suomifi-ui-components'; import NodeListingAccordion from "@app/modules/crosswalk-editor/tabs/node-mappings/node-listing-accordion"; -import {MidColumnWrapper} from "@app/modules/crosswalk-editor/tabs/node-mappings/node-mappings.styles"; +import { + MidColumnWrapper, + StyledModal, + StyledModalContent +} from '@app/modules/crosswalk-editor/tabs/node-mappings/node-mappings.styles'; import {cloneDeep} from 'lodash'; import {useRef} from 'react'; import {highlightOperation} from "@app/modules/crosswalk-editor/mappings-accordion"; +import { useTranslation } from 'next-i18next'; interface mappingOperationValue { operationId: string; @@ -36,6 +41,7 @@ export default function NodeMappings(props: { highlightOperation: highlightOperation | undefined; }) { const EXACT_MATCH_DROPDOWN_DEFAULT = 'http://www.w3.org/2004/02/skos/core#exactMatch'; + const { t } = useTranslation('common'); let sourceSelectionInit = ''; let targetSelectionInit = ''; @@ -505,111 +511,118 @@ export default function NodeMappings(props: { return ( <> - closeModal()} - className="row bg-white edit-mapping-modal" > - - {props.isPatchMappingOperation ? 'Edit mapping' : 'Add mapping'} + + {props.isPatchMappingOperation ? t('mapping-modal.edit-mapping') : t('mapping-modal.add-mapping')} {false && isErrorBarVisible && setIsErrorBarVisible(false)} mappingNodes={mappingNodes} mappingFunctions={props.mappingFunctions}> }
-
+
{/* SOURCE OPERATIONS */}
- - +
{/* MID COLUMN */} -
- -
updateMappingOperationSelection(newValue)} + +
+ updateMappingOperationSelection(newValue)} > - {mappingFunctions?.map((rt) => ( + {mappingFunctions?.map((rt : {uri: string; name: string}) => ( {rt.name} ))} -
- {generateMappingOperationFields(mappingOperationSelection ? mappingOperationSelection : props.nodeSelections[0]?.processing?.id)} - -
-
- { - setPredicateValue(newValue) - } - } - > - {predicateValues.map((rt) => ( - - {rt.name} - - ))} - - -
-