From 1c29b3bd8573913deb915e4d5c67b86ec1daff8b Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Sun, 19 May 2024 23:24:16 +1000 Subject: [PATCH] feat(ui): updated field type translations --- invokeai/frontend/web/public/locales/en.json | 5 +++-- .../web/src/features/nodes/hooks/usePrettyFieldType.ts | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json index 5dd411c544..1d41a1de63 100644 --- a/invokeai/frontend/web/public/locales/en.json +++ b/invokeai/frontend/web/public/locales/en.json @@ -780,8 +780,9 @@ "missingFieldTemplate": "Missing field template", "nodePack": "Node pack", "collection": "Collection", - "collectionFieldType": "{{name}} Collection", - "collectionOrScalarFieldType": "{{name}} Collection|Scalar", + "singleFieldType": "{{name}} (Single)", + "collectionFieldType": "{{name}} (Collection)", + "collectionOrScalarFieldType": "{{name}} (Single or Collection)", "colorCodeEdges": "Color-Code Edges", "colorCodeEdgesHelp": "Color-code edges according to their connected fields", "connectionWouldCreateCycle": "Connection would create a cycle", diff --git a/invokeai/frontend/web/src/features/nodes/hooks/usePrettyFieldType.ts b/invokeai/frontend/web/src/features/nodes/hooks/usePrettyFieldType.ts index 2600eae078..7f531c3dba 100644 --- a/invokeai/frontend/web/src/features/nodes/hooks/usePrettyFieldType.ts +++ b/invokeai/frontend/web/src/features/nodes/hooks/usePrettyFieldType.ts @@ -16,7 +16,7 @@ export const useFieldTypeName = (fieldType?: FieldType): string => { if (isSingleOrCollection(fieldType)) { return t('nodes.collectionOrScalarFieldType', { name }); } - return name; + return t('nodes.singleFieldType', { name }); }, [fieldType, t]); return name;