From 54dc912c839684fa02ede0208193ae50bf6fd54a Mon Sep 17 00:00:00 2001 From: mickr777 Date: Fri, 15 Sep 2023 14:13:54 +1000 Subject: [PATCH] Revert some test Changes --- .../getMetadataAndWorkflowFromImageBlob.ts | 5 ++-- .../src/features/nodes/util/parseSchema.ts | 26 ++++++++----------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/invokeai/frontend/web/src/features/nodes/util/getMetadataAndWorkflowFromImageBlob.ts b/invokeai/frontend/web/src/features/nodes/util/getMetadataAndWorkflowFromImageBlob.ts index 6f850e7d29..b46a701757 100644 --- a/invokeai/frontend/web/src/features/nodes/util/getMetadataAndWorkflowFromImageBlob.ts +++ b/invokeai/frontend/web/src/features/nodes/util/getMetadataAndWorkflowFromImageBlob.ts @@ -7,7 +7,6 @@ import { zWorkflow, } from 'features/nodes/types/types'; import { get } from 'lodash-es'; -import i18n from 'i18next'; export const getMetadataAndWorkflowFromImageBlob = async ( image: Blob @@ -24,7 +23,7 @@ export const getMetadataAndWorkflowFromImageBlob = async ( } else { logger('system').error( { error: parseify(metadataResult.error) }, - i18n.t('nodes.problemReadingMetadata') + 'Problem reading metadata from image' ); } } @@ -37,7 +36,7 @@ export const getMetadataAndWorkflowFromImageBlob = async ( } else { logger('system').error( { error: parseify(workflowResult.error) }, - i18n.t('nodes.problemReadingWorkflow') + 'Problem reading workflow from image' ); } } diff --git a/invokeai/frontend/web/src/features/nodes/util/parseSchema.ts b/invokeai/frontend/web/src/features/nodes/util/parseSchema.ts index 55ca593827..8615a12c46 100644 --- a/invokeai/frontend/web/src/features/nodes/util/parseSchema.ts +++ b/invokeai/frontend/web/src/features/nodes/util/parseSchema.ts @@ -15,7 +15,6 @@ import { isInvocationSchemaObject, } from '../types/types'; import { buildInputFieldTemplate, getFieldType } from './fieldTemplateBuilders'; -import i18n from 'i18next'; const RESERVED_INPUT_FIELD_NAMES = ['id', 'type', 'metadata']; const RESERVED_OUTPUT_FIELD_NAMES = ['type']; @@ -98,7 +97,7 @@ export const parseSchema = ( if (isReservedInputField(type, propertyName)) { logger('nodes').trace( { node: type, fieldName: propertyName, field: parseify(property) }, - i18n.t('nodes.skippedReservedInput') + 'Skipped reserved input field' ); return inputsAccumulator; } @@ -106,7 +105,7 @@ export const parseSchema = ( if (!isInvocationFieldSchema(property)) { logger('nodes').warn( { node: type, propertyName, property: parseify(property) }, - i18n.t('nodes.unhandledInputProperty') + 'Unhandled input property' ); return inputsAccumulator; } @@ -121,7 +120,7 @@ export const parseSchema = ( fieldType, field: parseify(property), }, - i18n.t('nodes.skippingUnknownInputType') + 'Skipping unknown input field type' ); return inputsAccumulator; } @@ -134,7 +133,7 @@ export const parseSchema = ( fieldType, field: parseify(property), }, - i18n.t('nodes.skippingReservedFieldType') + 'Skipping reserved field type' ); return inputsAccumulator; } @@ -154,7 +153,7 @@ export const parseSchema = ( fieldType, field: parseify(property), }, - i18n.t('nodes.skippingInputNoTemplate') + 'Skipping input field with no template' ); return inputsAccumulator; } @@ -170,24 +169,21 @@ export const parseSchema = ( if (!outputSchemaName) { logger('nodes').warn( { outputRefObject: parseify(schema.output) }, - i18n.t('nodes.noOutputSchemaName') + 'No output schema name found in ref object' ); return invocationsAccumulator; } const outputSchema = openAPI.components?.schemas?.[outputSchemaName]; if (!outputSchema) { - logger('nodes').warn( - { outputSchemaName }, - i18n.t('nodes.outputSchemaNotFound') - ); + logger('nodes').warn({ outputSchemaName }, 'Output schema not found'); return invocationsAccumulator; } if (!isInvocationOutputSchemaObject(outputSchema)) { logger('nodes').error( { outputSchema: parseify(outputSchema) }, - i18n.t('nodes.invalidOutputSchema') + 'Invalid output schema' ); return invocationsAccumulator; } @@ -200,7 +196,7 @@ export const parseSchema = ( if (!isAllowedOutputField(type, propertyName)) { logger('nodes').trace( { type, propertyName, property: parseify(property) }, - i18n.t('nodes.skippedReservedOutput') + 'Skipped reserved output field' ); return outputsAccumulator; } @@ -208,7 +204,7 @@ export const parseSchema = ( if (!isInvocationFieldSchema(property)) { logger('nodes').warn( { type, propertyName, property: parseify(property) }, - i18n.t('nodes.unhandledOutputProperty') + 'Unhandled output property' ); return outputsAccumulator; } @@ -218,7 +214,7 @@ export const parseSchema = ( if (!isFieldType(fieldType)) { logger('nodes').warn( { fieldName: propertyName, fieldType, field: parseify(property) }, - i18n.t('nodes.skippingUnknownOutputType') + 'Skipping unknown output field type' ); return outputsAccumulator; }