Skip to content

Commit f4d4e00

Browse files
authored
Merge pull request #391
fix(19310): Improve Data Hub translations * fix(19310): fix translations for the datahub nodes * fix(19310): fix translations for the toolbox
1 parent b78726a commit f4d4e00

File tree

4 files changed

+23
-9
lines changed

4 files changed

+23
-9
lines changed

hivemq-edge/src/frontend/src/extensions/datahub/components/controls/ToolboxNodes.spec.cy.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe('Toolbox', () => {
1313
cy.getByAriaLabel('Policy controls').find('[role="group"]').as('policyControlsGroups')
1414

1515
cy.get('@policyControlsGroups').should('have.length', 4)
16-
cy.get('@policyControlsGroups').eq(0).should('contain.text', 'Pipeline')
16+
cy.get('@policyControlsGroups').eq(0).should('contain.text', 'Edge Integration')
1717
cy.get('@policyControlsGroups').eq(1).should('contain.text', 'Data Policy')
1818
cy.get('@policyControlsGroups').eq(2).should('contain.text', 'Behavior Policy')
1919
cy.get('@policyControlsGroups').eq(3).should('contain.text', 'Operation')

hivemq-edge/src/frontend/src/extensions/datahub/components/controls/ToolboxNodes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ export const ToolboxNodes: FC<DesignerToolBoxProps> = () => {
2323
aria-label={t('workspace.toolbox.aria-label') as string}
2424
backgroundColor="var(--chakra-colors-chakra-body-bg)"
2525
>
26-
<ButtonGroup variant="outline" size="sm" aria-labelledby="group-pipeline">
26+
<ButtonGroup variant="outline" size="sm" aria-labelledby="group-integrations">
2727
<VStack alignItems="flex-start">
28-
<Text id="group-pipeline">{t('workspace.toolbox.group.pipeline')}</Text>
28+
<Text id="group-integrations">{t('workspace.toolbox.group.integration.edge')}</Text>
2929
<HStack>
3030
<Tool nodeType={DataHubNodeType.TOPIC_FILTER} isDisabled={isDraftEmpty || !isEditEnabled} />
3131
<Tool nodeType={DataHubNodeType.CLIENT_FILTER} isDisabled={isDraftEmpty || !isEditEnabled} />

hivemq-edge/src/frontend/src/extensions/datahub/designer/operation/OperationNode.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,20 @@ export const OperationNode: FC<NodeProps<OperationData>> = (props) => {
2525
<NodeWrapper route={`node/${DataHubNodeType.OPERATION}/${id}`} {...props}>
2626
<VStack>
2727
<HStack w="100%" justifyContent="space-around">
28-
{isSerialiser && <Text fontSize="xs">{OperationData.Handle.SCHEMA}</Text>}
28+
{isSerialiser && (
29+
<Text fontSize="xs">{t('workspace.handles.operation', { context: OperationData.Handle.SCHEMA })}</Text>
30+
)}
2931
{isTransform && (
3032
<>
31-
<Text fontSize="xs">{OperationData.Handle.DESERIALISER}</Text>
32-
<Text fontSize="xs">{OperationData.Handle.FUNCTION}</Text>
33-
<Text fontSize="xs">{OperationData.Handle.SERIALISER}</Text>
33+
<Text fontSize="xs">
34+
{t('workspace.handles.operation', { context: OperationData.Handle.DESERIALISER })}
35+
</Text>
36+
<Text fontSize="xs">
37+
{t('workspace.handles.operation', { context: OperationData.Handle.FUNCTION })}
38+
</Text>
39+
<Text fontSize="xs">
40+
{t('workspace.handles.operation', { context: OperationData.Handle.SERIALISER })}
41+
</Text>
3442
</>
3543
)}
3644
</HStack>

hivemq-edge/src/frontend/src/extensions/datahub/locales/en/datahub.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,9 @@
127127
"goPublish": "Go to Publish"
128128
},
129129
"group": {
130-
"pipeline": "Pipeline",
130+
"integration": {
131+
"edge": "Edge Integration"
132+
},
131133
"dataPolicy": "Data Policy",
132134
"behaviorPolicy": "Behavior Policy",
133135
"operation": "Operation"
@@ -157,7 +159,11 @@
157159
"validation_onSuccess": "onSuccess",
158160
"validation_onError": "onError",
159161
"behavior_serial.will": "onWill",
160-
"behavior_serial.publish": "onPublish"
162+
"behavior_serial.publish": "onPublish",
163+
"operation_deserialiser": "deserializer",
164+
"operation_serialiser": "serializer",
165+
"operation_function": "functions",
166+
"operation_schema": "schemas"
161167
},
162168
"panel": {
163169
"submit": "Submit"

0 commit comments

Comments
 (0)