More Translations and Fixes

This commit is contained in:
mickr777 2023-09-15 13:43:32 +10:00
parent a1ef079d1f
commit 7481251127
26 changed files with 199 additions and 167 deletions

View File

@ -721,7 +721,6 @@
"noFieldType": "No field type", "noFieldType": "No field type",
"noImageFoundState": "No initial image found in state", "noImageFoundState": "No initial image found in state",
"noMatchingNodes": "No matching nodes", "noMatchingNodes": "No matching nodes",
"noModelFoundState": "No model found in state",
"noNodeSelected": "No node selected", "noNodeSelected": "No node selected",
"noOpacity": "Node Opacity", "noOpacity": "Node Opacity",
"noOutputRecorded": "No outputs recorded", "noOutputRecorded": "No outputs recorded",
@ -964,8 +963,14 @@
"useSlidersForAll": "Use Sliders For All Options" "useSlidersForAll": "Use Sliders For All Options"
}, },
"toast": { "toast": {
"addedToBoard": "Added to board",
"baseModelChangedCleared": "Base model changed, cleared",
"canceled": "Processing Canceled", "canceled": "Processing Canceled",
"canvasCopiedClipboard": "Canvas Copied to Clipboard",
"canvasDownloaded": "Canvas Downloaded",
"canvasMerged": "Canvas Merged", "canvasMerged": "Canvas Merged",
"canvasSavedGallery": "Canvas Saved to Gallery",
"canvasSentControlnetAssets": "Canvas Sent to ControlNet & Assets",
"connected": "Connected to Server", "connected": "Connected to Server",
"disconnected": "Disconnected from Server", "disconnected": "Disconnected from Server",
"downloadImageStarted": "Image Download Started", "downloadImageStarted": "Image Download Started",
@ -974,10 +979,18 @@
"imageLinkCopied": "Image Link Copied", "imageLinkCopied": "Image Link Copied",
"imageNotLoaded": "No Image Loaded", "imageNotLoaded": "No Image Loaded",
"imageNotLoadedDesc": "Could not find image", "imageNotLoadedDesc": "Could not find image",
"imageSaved": "Image Saved",
"imageSavedToGallery": "Image Saved to Gallery", "imageSavedToGallery": "Image Saved to Gallery",
"imageSavingFailed": "Image Saving Failed",
"imageUploaded": "Image Uploaded",
"imageUploadFailed": "Image Upload Failed",
"incompatibleSubmodel": "incompatible submodel",
"initialImageNotSet": "Initial Image Not Set", "initialImageNotSet": "Initial Image Not Set",
"initialImageNotSetDesc": "Could not load initial image", "initialImageNotSetDesc": "Could not load initial image",
"initialImageSet": "Initial Image Set", "initialImageSet": "Initial Image Set",
"loadedWithWarnings": "Workflow Loaded with Warnings",
"maskSavedAssets": "Mask Saved to Assets",
"maskSentControlnetAssets": "Mask Sent to ControlNet & Assets",
"metadataLoadFailed": "Failed to load metadata", "metadataLoadFailed": "Failed to load metadata",
"modelAdded": "Model Added: {{modelName}}", "modelAdded": "Model Added: {{modelName}}",
"modelAddedSimple": "Model Added", "modelAddedSimple": "Model Added",
@ -998,8 +1011,20 @@
"parametersNotSet": "Parameters Not Set", "parametersNotSet": "Parameters Not Set",
"parametersNotSetDesc": "No metadata found for this image.", "parametersNotSetDesc": "No metadata found for this image.",
"parametersSet": "Parameters Set", "parametersSet": "Parameters Set",
"problemCopyingCanvas": "Problem Copying Canvas",
"problemCopyingCanvasDesc": "Unable to export base layer",
"problemCopyingImage": "Unable to Copy Image", "problemCopyingImage": "Unable to Copy Image",
"problemCopyingImageLink": "Unable to Copy Image Link", "problemCopyingImageLink": "Unable to Copy Image Link",
"problemDownloadingCanvas": "Problem Downloading Canvas",
"problemDownloadingCanvasDesc": "Unable to export base layer",
"problemImportingMask": "Problem Importing Mask",
"problemImportingMaskDesc": "Unable to export mask",
"problemMergingCanvas": "Problem Merging Canvas",
"problemMergingCanvasDesc": "Unable to export base layer",
"problemSavingCanvas": "Problem Saving Canvas",
"problemSavingCanvasDesc": "Unable to export base layer",
"problemSavingMask": "Problem Saving Mask",
"problemSavingMaskDesc": "Unable to export mask",
"promptNotSet": "Prompt Not Set", "promptNotSet": "Prompt Not Set",
"promptNotSetDesc": "Could not find prompt for this image.", "promptNotSetDesc": "Could not find prompt for this image.",
"promptSet": "Prompt Set", "promptSet": "Prompt Set",
@ -1009,11 +1034,16 @@
"sentToImageToImage": "Sent To Image To Image", "sentToImageToImage": "Sent To Image To Image",
"sentToUnifiedCanvas": "Sent to Unified Canvas", "sentToUnifiedCanvas": "Sent to Unified Canvas",
"serverError": "Server Error", "serverError": "Server Error",
"setCanvasInitialImage": "Set as canvas initial image",
"setControlImage": "Set as control image",
"setInitialImage": "Set as initial image",
"setNodeField": "Set as node field",
"tempFoldersEmptied": "Temp Folder Emptied", "tempFoldersEmptied": "Temp Folder Emptied",
"uploadFailed": "Upload failed", "uploadFailed": "Upload failed",
"uploadFailedInvalidUploadDesc": "Must be single PNG or JPEG image", "uploadFailedInvalidUploadDesc": "Must be single PNG or JPEG image",
"uploadFailedUnableToLoadDesc": "Unable to load file", "uploadFailedUnableToLoadDesc": "Unable to load file",
"upscalingFailed": "Upscaling Failed" "upscalingFailed": "Upscaling Failed",
"workflowLoaded": "Workflow Loaded"
}, },
"tooltip": { "tooltip": {
"feature": { "feature": {

View File

@ -4,6 +4,7 @@ import { $logger } from 'app/logging/logger';
import { getBaseLayerBlob } from 'features/canvas/util/getBaseLayerBlob'; import { getBaseLayerBlob } from 'features/canvas/util/getBaseLayerBlob';
import { addToast } from 'features/system/store/systemSlice'; import { addToast } from 'features/system/store/systemSlice';
import { copyBlobToClipboard } from 'features/canvas/util/copyBlobToClipboard'; import { copyBlobToClipboard } from 'features/canvas/util/copyBlobToClipboard';
import { t } from 'i18next';
export const addCanvasCopiedToClipboardListener = () => { export const addCanvasCopiedToClipboardListener = () => {
startAppListening({ startAppListening({
@ -20,8 +21,8 @@ export const addCanvasCopiedToClipboardListener = () => {
moduleLog.error('Problem getting base layer blob'); moduleLog.error('Problem getting base layer blob');
dispatch( dispatch(
addToast({ addToast({
title: 'Problem Copying Canvas', title: t('toast.problemCopyingCanvas'),
description: 'Unable to export base layer', description: t('toast.problemCopyingCanvasDesc'),
status: 'error', status: 'error',
}) })
); );
@ -32,7 +33,7 @@ export const addCanvasCopiedToClipboardListener = () => {
dispatch( dispatch(
addToast({ addToast({
title: 'Canvas Copied to Clipboard', title: t('toast.canvasCopiedClipboard'),
status: 'success', status: 'success',
}) })
); );

View File

@ -4,6 +4,7 @@ import { $logger } from 'app/logging/logger';
import { downloadBlob } from 'features/canvas/util/downloadBlob'; import { downloadBlob } from 'features/canvas/util/downloadBlob';
import { getBaseLayerBlob } from 'features/canvas/util/getBaseLayerBlob'; import { getBaseLayerBlob } from 'features/canvas/util/getBaseLayerBlob';
import { addToast } from 'features/system/store/systemSlice'; import { addToast } from 'features/system/store/systemSlice';
import { t } from 'i18next';
export const addCanvasDownloadedAsImageListener = () => { export const addCanvasDownloadedAsImageListener = () => {
startAppListening({ startAppListening({
@ -20,8 +21,8 @@ export const addCanvasDownloadedAsImageListener = () => {
moduleLog.error('Problem getting base layer blob'); moduleLog.error('Problem getting base layer blob');
dispatch( dispatch(
addToast({ addToast({
title: 'Problem Downloading Canvas', title: t('toast.problemDownloadingCanvas'),
description: 'Unable to export base layer', description: t('toast.problemDownloadingCanvasDesc'),
status: 'error', status: 'error',
}) })
); );
@ -29,7 +30,9 @@ export const addCanvasDownloadedAsImageListener = () => {
} }
downloadBlob(blob, 'canvas.png'); downloadBlob(blob, 'canvas.png');
dispatch(addToast({ title: 'Canvas Downloaded', status: 'success' })); dispatch(
addToast({ title: t('toast.canvasDownloaded'), status: 'success' })
);
}, },
}); });
}; };

View File

@ -5,6 +5,7 @@ import { controlNetImageChanged } from 'features/controlNet/store/controlNetSlic
import { addToast } from 'features/system/store/systemSlice'; import { addToast } from 'features/system/store/systemSlice';
import { imagesApi } from 'services/api/endpoints/images'; import { imagesApi } from 'services/api/endpoints/images';
import { startAppListening } from '..'; import { startAppListening } from '..';
import { t } from 'i18next';
export const addCanvasImageToControlNetListener = () => { export const addCanvasImageToControlNetListener = () => {
startAppListening({ startAppListening({
@ -19,8 +20,8 @@ export const addCanvasImageToControlNetListener = () => {
log.error('Problem getting base layer blob'); log.error('Problem getting base layer blob');
dispatch( dispatch(
addToast({ addToast({
title: 'Problem Saving Canvas', title: t('toast.problemSavingCanvas'),
description: 'Unable to export base layer', description: t('toast.problemSavingCanvasDesc'),
status: 'error', status: 'error',
}) })
); );
@ -40,7 +41,7 @@ export const addCanvasImageToControlNetListener = () => {
crop_visible: true, crop_visible: true,
postUploadAction: { postUploadAction: {
type: 'TOAST', type: 'TOAST',
toastOptions: { title: 'Canvas Sent to ControlNet & Assets' }, toastOptions: { title: t('toast.canvasSentControlnetAssets') },
}, },
}) })
).unwrap(); ).unwrap();

View File

@ -4,6 +4,7 @@ import { getCanvasData } from 'features/canvas/util/getCanvasData';
import { addToast } from 'features/system/store/systemSlice'; import { addToast } from 'features/system/store/systemSlice';
import { imagesApi } from 'services/api/endpoints/images'; import { imagesApi } from 'services/api/endpoints/images';
import { startAppListening } from '..'; import { startAppListening } from '..';
import { t } from 'i18next';
export const addCanvasMaskSavedToGalleryListener = () => { export const addCanvasMaskSavedToGalleryListener = () => {
startAppListening({ startAppListening({
@ -30,8 +31,8 @@ export const addCanvasMaskSavedToGalleryListener = () => {
log.error('Problem getting mask layer blob'); log.error('Problem getting mask layer blob');
dispatch( dispatch(
addToast({ addToast({
title: 'Problem Saving Mask', title: t('toast.problemSavingMask'),
description: 'Unable to export mask', description: t('toast.problemSavingMaskDesc'),
status: 'error', status: 'error',
}) })
); );
@ -51,7 +52,7 @@ export const addCanvasMaskSavedToGalleryListener = () => {
crop_visible: true, crop_visible: true,
postUploadAction: { postUploadAction: {
type: 'TOAST', type: 'TOAST',
toastOptions: { title: 'Mask Saved to Assets' }, toastOptions: { title: t('toast.maskSavedAssets') },
}, },
}) })
); );

View File

@ -5,6 +5,7 @@ import { controlNetImageChanged } from 'features/controlNet/store/controlNetSlic
import { addToast } from 'features/system/store/systemSlice'; import { addToast } from 'features/system/store/systemSlice';
import { imagesApi } from 'services/api/endpoints/images'; import { imagesApi } from 'services/api/endpoints/images';
import { startAppListening } from '..'; import { startAppListening } from '..';
import { t } from 'i18next';
export const addCanvasMaskToControlNetListener = () => { export const addCanvasMaskToControlNetListener = () => {
startAppListening({ startAppListening({
@ -31,8 +32,8 @@ export const addCanvasMaskToControlNetListener = () => {
log.error('Problem getting mask layer blob'); log.error('Problem getting mask layer blob');
dispatch( dispatch(
addToast({ addToast({
title: 'Problem Importing Mask', title: t('toast.problemImportingMask'),
description: 'Unable to export mask', description: t('toast.problemImportingMaskDesc'),
status: 'error', status: 'error',
}) })
); );
@ -52,7 +53,7 @@ export const addCanvasMaskToControlNetListener = () => {
crop_visible: true, crop_visible: true,
postUploadAction: { postUploadAction: {
type: 'TOAST', type: 'TOAST',
toastOptions: { title: 'Mask Sent to ControlNet & Assets' }, toastOptions: { title: t('toast.maskSentControlnetAssets') },
}, },
}) })
).unwrap(); ).unwrap();

View File

@ -6,6 +6,7 @@ import { getCanvasBaseLayer } from 'features/canvas/util/konvaInstanceProvider';
import { addToast } from 'features/system/store/systemSlice'; import { addToast } from 'features/system/store/systemSlice';
import { imagesApi } from 'services/api/endpoints/images'; import { imagesApi } from 'services/api/endpoints/images';
import { startAppListening } from '..'; import { startAppListening } from '..';
import { t } from 'i18next';
export const addCanvasMergedListener = () => { export const addCanvasMergedListener = () => {
startAppListening({ startAppListening({
@ -20,8 +21,8 @@ export const addCanvasMergedListener = () => {
moduleLog.error('Problem getting base layer blob'); moduleLog.error('Problem getting base layer blob');
dispatch( dispatch(
addToast({ addToast({
title: 'Problem Merging Canvas', title: t('toast.problemMergingCanvas'),
description: 'Unable to export base layer', description: t('toast.problemMergingCanvasDesc'),
status: 'error', status: 'error',
}) })
); );
@ -34,8 +35,8 @@ export const addCanvasMergedListener = () => {
moduleLog.error('Problem getting canvas base layer'); moduleLog.error('Problem getting canvas base layer');
dispatch( dispatch(
addToast({ addToast({
title: 'Problem Merging Canvas', title: t('toast.problemMergingCanvas'),
description: 'Unable to export base layer', description: t('toast.problemMergingCanvasDesc'),
status: 'error', status: 'error',
}) })
); );
@ -55,7 +56,7 @@ export const addCanvasMergedListener = () => {
is_intermediate: true, is_intermediate: true,
postUploadAction: { postUploadAction: {
type: 'TOAST', type: 'TOAST',
toastOptions: { title: 'Canvas Merged' }, toastOptions: { title: t('toast.canvasMerged') },
}, },
}) })
).unwrap(); ).unwrap();

View File

@ -4,6 +4,7 @@ import { getBaseLayerBlob } from 'features/canvas/util/getBaseLayerBlob';
import { addToast } from 'features/system/store/systemSlice'; import { addToast } from 'features/system/store/systemSlice';
import { imagesApi } from 'services/api/endpoints/images'; import { imagesApi } from 'services/api/endpoints/images';
import { startAppListening } from '..'; import { startAppListening } from '..';
import { t } from 'i18next';
export const addCanvasSavedToGalleryListener = () => { export const addCanvasSavedToGalleryListener = () => {
startAppListening({ startAppListening({
@ -18,8 +19,8 @@ export const addCanvasSavedToGalleryListener = () => {
log.error('Problem getting base layer blob'); log.error('Problem getting base layer blob');
dispatch( dispatch(
addToast({ addToast({
title: 'Problem Saving Canvas', title: t('toast.problemSavingCanvas'),
description: 'Unable to export base layer', description: t('toast.problemSavingCanvasDesc'),
status: 'error', status: 'error',
}) })
); );
@ -39,7 +40,7 @@ export const addCanvasSavedToGalleryListener = () => {
crop_visible: true, crop_visible: true,
postUploadAction: { postUploadAction: {
type: 'TOAST', type: 'TOAST',
toastOptions: { title: 'Canvas Saved to Gallery' }, toastOptions: { title: t('toast.canvasSavedGallery') },
}, },
}) })
); );

View File

@ -9,9 +9,10 @@ import { omit } from 'lodash-es';
import { boardsApi } from 'services/api/endpoints/boards'; import { boardsApi } from 'services/api/endpoints/boards';
import { startAppListening } from '..'; import { startAppListening } from '..';
import { imagesApi } from '../../../../../services/api/endpoints/images'; import { imagesApi } from '../../../../../services/api/endpoints/images';
import { t } from 'i18next';
const DEFAULT_UPLOADED_TOAST: UseToastOptions = { const DEFAULT_UPLOADED_TOAST: UseToastOptions = {
title: 'Image Uploaded', title: t('toast.imageUploaded'),
status: 'success', status: 'success',
}; };
@ -57,8 +58,8 @@ export const addImageUploadedFulfilledListener = () => {
// Fall back to just the board id if we can't find the board for some reason // Fall back to just the board id if we can't find the board for some reason
const board = data?.find((b) => b.board_id === autoAddBoardId); const board = data?.find((b) => b.board_id === autoAddBoardId);
const description = board const description = board
? `Added to board ${board.board_name}` ? `${t('toast.addedToBoard')} ${board.board_name}`
: `Added to board ${autoAddBoardId}`; : `${t('toast.addedToBoard')} ${autoAddBoardId}`;
dispatch( dispatch(
addToast({ addToast({
@ -75,7 +76,7 @@ export const addImageUploadedFulfilledListener = () => {
dispatch( dispatch(
addToast({ addToast({
...DEFAULT_UPLOADED_TOAST, ...DEFAULT_UPLOADED_TOAST,
description: 'Set as canvas initial image', description: t('toast.setCanvasInitialImage'),
}) })
); );
return; return;
@ -92,7 +93,7 @@ export const addImageUploadedFulfilledListener = () => {
dispatch( dispatch(
addToast({ addToast({
...DEFAULT_UPLOADED_TOAST, ...DEFAULT_UPLOADED_TOAST,
description: 'Set as control image', description: t('toast.setControlImage'),
}) })
); );
return; return;
@ -103,7 +104,7 @@ export const addImageUploadedFulfilledListener = () => {
dispatch( dispatch(
addToast({ addToast({
...DEFAULT_UPLOADED_TOAST, ...DEFAULT_UPLOADED_TOAST,
description: 'Set as initial image', description: t('toast.setInitialImage'),
}) })
); );
return; return;
@ -117,7 +118,7 @@ export const addImageUploadedFulfilledListener = () => {
dispatch( dispatch(
addToast({ addToast({
...DEFAULT_UPLOADED_TOAST, ...DEFAULT_UPLOADED_TOAST,
description: `Set as node field ${fieldName}`, description: `${t('toast.setNodeField')} ${fieldName}`,
}) })
); );
return; return;
@ -140,7 +141,7 @@ export const addImageUploadedRejectedListener = () => {
log.error({ ...sanitizedData }, 'Image upload failed'); log.error({ ...sanitizedData }, 'Image upload failed');
dispatch( dispatch(
addToast({ addToast({
title: 'Image Upload Failed', title: t('toast.imageUploadFailed'),
description: action.error.message, description: action.error.message,
status: 'error', status: 'error',
}) })

View File

@ -14,6 +14,7 @@ import { addToast } from 'features/system/store/systemSlice';
import { makeToast } from 'features/system/util/makeToast'; import { makeToast } from 'features/system/util/makeToast';
import { forEach } from 'lodash-es'; import { forEach } from 'lodash-es';
import { startAppListening } from '..'; import { startAppListening } from '..';
import { t } from 'i18next';
export const addModelSelectedListener = () => { export const addModelSelectedListener = () => {
startAppListening({ startAppListening({
@ -67,7 +68,9 @@ export const addModelSelectedListener = () => {
dispatch( dispatch(
addToast( addToast(
makeToast({ makeToast({
title: `Base model changed, cleared ${modelsCleared} incompatible submodel${ title: `${t(
'toast.baseModelChangedCleared'
)} ${modelsCleared} ${t('toast.incompatibleSubmodel')}${
modelsCleared === 1 ? '' : 's' modelsCleared === 1 ? '' : 's'
}`, }`,
status: 'warning', status: 'warning',

View File

@ -2,6 +2,7 @@ import { stagingAreaImageSaved } from 'features/canvas/store/actions';
import { addToast } from 'features/system/store/systemSlice'; import { addToast } from 'features/system/store/systemSlice';
import { imagesApi } from 'services/api/endpoints/images'; import { imagesApi } from 'services/api/endpoints/images';
import { startAppListening } from '..'; import { startAppListening } from '..';
import { t } from 'i18next';
export const addStagingAreaImageSavedListener = () => { export const addStagingAreaImageSavedListener = () => {
startAppListening({ startAppListening({
@ -28,11 +29,11 @@ export const addStagingAreaImageSavedListener = () => {
}) })
); );
} }
dispatch(addToast({ title: 'Image Saved', status: 'success' })); dispatch(addToast({ title: t('toast.imageSaved'), status: 'success' }));
} catch (error) { } catch (error) {
dispatch( dispatch(
addToast({ addToast({
title: 'Image Saving Failed', title: t('toast.imageSavingFailed'),
description: (error as Error)?.message, description: (error as Error)?.message,
status: 'error', status: 'error',
}) })

View File

@ -7,6 +7,7 @@ import { addToast } from 'features/system/store/systemSlice';
import { makeToast } from 'features/system/util/makeToast'; import { makeToast } from 'features/system/util/makeToast';
import { setActiveTab } from 'features/ui/store/uiSlice'; import { setActiveTab } from 'features/ui/store/uiSlice';
import { startAppListening } from '..'; import { startAppListening } from '..';
import { t } from 'i18next';
export const addWorkflowLoadedListener = () => { export const addWorkflowLoadedListener = () => {
startAppListening({ startAppListening({
@ -27,7 +28,7 @@ export const addWorkflowLoadedListener = () => {
dispatch( dispatch(
addToast( addToast(
makeToast({ makeToast({
title: 'Workflow Loaded', title: t('toast.workflowLoaded'),
status: 'success', status: 'success',
}) })
) )
@ -36,7 +37,7 @@ export const addWorkflowLoadedListener = () => {
dispatch( dispatch(
addToast( addToast(
makeToast({ makeToast({
title: 'Workflow Loaded with Warnings', title: t('toast.loadedWithWarnings'),
status: 'warning', status: 'warning',
}) })
) )

View File

@ -1,5 +1,5 @@
import { FieldType, FieldUIConfig } from './types'; import { FieldType, FieldUIConfig } from './types';
import i18n from 'i18next'; import { t } from 'i18next';
export const HANDLE_TOOLTIP_OPEN_DELAY = 500; export const HANDLE_TOOLTIP_OPEN_DELAY = 500;
export const COLOR_TOKEN_VALUE = 500; export const COLOR_TOKEN_VALUE = 500;
@ -103,73 +103,73 @@ export const isPolymorphicItemType = (
export const FIELDS: Record<FieldType, FieldUIConfig> = { export const FIELDS: Record<FieldType, FieldUIConfig> = {
boolean: { boolean: {
color: 'green.500', color: 'green.500',
description: i18n.t('nodes.booleanDescription'), description: t('nodes.booleanDescription'),
title: i18n.t('nodes.boolean'), title: t('nodes.boolean'),
}, },
BooleanCollection: { BooleanCollection: {
color: 'green.500', color: 'green.500',
description: i18n.t('nodes.booleanCollectionDescription'), description: t('nodes.booleanCollectionDescription'),
title: i18n.t('nodes.booleanCollection'), title: t('nodes.booleanCollection'),
}, },
BooleanPolymorphic: { BooleanPolymorphic: {
color: 'green.500', color: 'green.500',
description: i18n.t('nodes.booleanPolymorphicDescription'), description: t('nodes.booleanPolymorphicDescription'),
title: i18n.t('nodes.booleanPolymorphic'), title: t('nodes.booleanPolymorphic'),
}, },
ClipField: { ClipField: {
color: 'green.500', color: 'green.500',
description: i18n.t('nodes.clipFieldDescription'), description: t('nodes.clipFieldDescription'),
title: i18n.t('nodes.clipField'), title: t('nodes.clipField'),
}, },
Collection: { Collection: {
color: 'base.500', color: 'base.500',
description: i18n.t('nodes.collectionDescription'), description: t('nodes.collectionDescription'),
title: i18n.t('nodes.collection'), title: t('nodes.collection'),
}, },
CollectionItem: { CollectionItem: {
color: 'base.500', color: 'base.500',
description: i18n.t('nodes.collectionItemDescription'), description: t('nodes.collectionItemDescription'),
title: i18n.t('nodes.collectionItem'), title: t('nodes.collectionItem'),
}, },
ColorCollection: { ColorCollection: {
color: 'pink.300', color: 'pink.300',
description: i18n.t('nodes.colorCollectionDescription'), description: t('nodes.colorCollectionDescription'),
title: i18n.t('nodes.colorCollection'), title: t('nodes.colorCollection'),
}, },
ColorField: { ColorField: {
color: 'pink.300', color: 'pink.300',
description: i18n.t('nodes.colorFieldDescription'), description: t('nodes.colorFieldDescription'),
title: i18n.t('nodes.colorField'), title: t('nodes.colorField'),
}, },
ColorPolymorphic: { ColorPolymorphic: {
color: 'pink.300', color: 'pink.300',
description: i18n.t('nodes.colorPolymorphicDescription'), description: t('nodes.colorPolymorphicDescription'),
title: i18n.t('nodes.colorPolymorphic'), title: t('nodes.colorPolymorphic'),
}, },
ConditioningCollection: { ConditioningCollection: {
color: 'cyan.500', color: 'cyan.500',
description: i18n.t('nodes.conditioningCollectionDescription'), description: t('nodes.conditioningCollectionDescription'),
title: i18n.t('nodes.conditioningCollection'), title: t('nodes.conditioningCollection'),
}, },
ConditioningField: { ConditioningField: {
color: 'cyan.500', color: 'cyan.500',
description: i18n.t('nodes.conditioningFieldDescription'), description: t('nodes.conditioningFieldDescription'),
title: i18n.t('nodes.conditioningField'), title: t('nodes.conditioningField'),
}, },
ConditioningPolymorphic: { ConditioningPolymorphic: {
color: 'cyan.500', color: 'cyan.500',
description: i18n.t('nodes.conditioningPolymorphicDescription'), description: t('nodes.conditioningPolymorphicDescription'),
title: i18n.t('nodes.conditioningPolymorphic'), title: t('nodes.conditioningPolymorphic'),
}, },
ControlCollection: { ControlCollection: {
color: 'teal.500', color: 'teal.500',
description: i18n.t('nodes.controlCollectionDescription'), description: t('nodes.controlCollectionDescription'),
title: i18n.t('nodes.controlCollection'), title: t('nodes.controlCollection'),
}, },
ControlField: { ControlField: {
color: 'teal.500', color: 'teal.500',
description: i18n.t('nodes.controlFieldDescription'), description: t('nodes.controlFieldDescription'),
title: i18n.t('nodes.controlField'), title: t('nodes.controlField'),
}, },
ControlNetModelField: { ControlNetModelField: {
color: 'teal.500', color: 'teal.500',
@ -183,132 +183,132 @@ export const FIELDS: Record<FieldType, FieldUIConfig> = {
}, },
DenoiseMaskField: { DenoiseMaskField: {
color: 'blue.300', color: 'blue.300',
description: i18n.t('nodes.denoiseMaskFieldDescription'), description: t('nodes.denoiseMaskFieldDescription'),
title: i18n.t('nodes.denoiseMaskField'), title: t('nodes.denoiseMaskField'),
}, },
enum: { enum: {
color: 'blue.500', color: 'blue.500',
description: i18n.t('nodes.enumDescription'), description: t('nodes.enumDescription'),
title: i18n.t('nodes.enum'), title: t('nodes.enum'),
}, },
float: { float: {
color: 'orange.500', color: 'orange.500',
description: i18n.t('nodes.floatDescription'), description: t('nodes.floatDescription'),
title: i18n.t('nodes.float'), title: t('nodes.float'),
}, },
FloatCollection: { FloatCollection: {
color: 'orange.500', color: 'orange.500',
description: i18n.t('nodes.floatCollectionDescription'), description: t('nodes.floatCollectionDescription'),
title: i18n.t('nodes.floatCollection'), title: t('nodes.floatCollection'),
}, },
FloatPolymorphic: { FloatPolymorphic: {
color: 'orange.500', color: 'orange.500',
description: i18n.t('nodes.floatPolymorphicDescription'), description: t('nodes.floatPolymorphicDescription'),
title: i18n.t('nodes.floatPolymorphic'), title: t('nodes.floatPolymorphic'),
}, },
ImageCollection: { ImageCollection: {
color: 'purple.500', color: 'purple.500',
description: i18n.t('nodes.imageCollectionDescription'), description: t('nodes.imageCollectionDescription'),
title: i18n.t('nodes.imageCollection'), title: t('nodes.imageCollection'),
}, },
ImageField: { ImageField: {
color: 'purple.500', color: 'purple.500',
description: i18n.t('nodes.imageFieldDescription'), description: t('nodes.imageFieldDescription'),
title: i18n.t('nodes.imageField'), title: t('nodes.imageField'),
}, },
ImagePolymorphic: { ImagePolymorphic: {
color: 'purple.500', color: 'purple.500',
description: i18n.t('nodes.imagePolymorphicDescription'), description: t('nodes.imagePolymorphicDescription'),
title: i18n.t('nodes.imagePolymorphic'), title: t('nodes.imagePolymorphic'),
}, },
integer: { integer: {
color: 'red.500', color: 'red.500',
description: i18n.t('nodes.integerDescription'), description: t('nodes.integerDescription'),
title: i18n.t('nodes.integer'), title: t('nodes.integer'),
}, },
IntegerCollection: { IntegerCollection: {
color: 'red.500', color: 'red.500',
description: i18n.t('nodes.integerCollectionDescription'), description: t('nodes.integerCollectionDescription'),
title: i18n.t('nodes.integerCollection'), title: t('nodes.integerCollection'),
}, },
IntegerPolymorphic: { IntegerPolymorphic: {
color: 'red.500', color: 'red.500',
description: i18n.t('nodes.integerPolymorphicDescription'), description: t('nodes.integerPolymorphicDescription'),
title: i18n.t('nodes.integerPolymorphic'), title: t('nodes.integerPolymorphic'),
}, },
LatentsCollection: { LatentsCollection: {
color: 'pink.500', color: 'pink.500',
description: i18n.t('nodes.latentsCollectionDescription'), description: t('nodes.latentsCollectionDescription'),
title: i18n.t('nodes.latentsCollection'), title: t('nodes.latentsCollection'),
}, },
LatentsField: { LatentsField: {
color: 'pink.500', color: 'pink.500',
description: i18n.t('nodes.latentsFieldDescription'), description: t('nodes.latentsFieldDescription'),
title: i18n.t('nodes.latentsField'), title: t('nodes.latentsField'),
}, },
LatentsPolymorphic: { LatentsPolymorphic: {
color: 'pink.500', color: 'pink.500',
description: i18n.t('nodes.latentsPolymorphicDescription'), description: t('nodes.latentsPolymorphicDescription'),
title: i18n.t('nodes.latentsPolymorphic'), title: t('nodes.latentsPolymorphic'),
}, },
LoRAModelField: { LoRAModelField: {
color: 'teal.500', color: 'teal.500',
description: i18n.t('nodes.loRAModelFieldDescription'), description: t('nodes.loRAModelFieldDescription'),
title: i18n.t('nodes.loRAModelField'), title: t('nodes.loRAModelField'),
}, },
MainModelField: { MainModelField: {
color: 'teal.500', color: 'teal.500',
description: i18n.t('nodes.mainModelFieldDescription'), description: t('nodes.mainModelFieldDescription'),
title: i18n.t('nodes.mainModelField'), title: t('nodes.mainModelField'),
}, },
ONNXModelField: { ONNXModelField: {
color: 'teal.500', color: 'teal.500',
description: i18n.t('nodes.oNNXModelFieldDescription'), description: t('nodes.oNNXModelFieldDescription'),
title: i18n.t('nodes.oNNXModelField'), title: t('nodes.oNNXModelField'),
}, },
Scheduler: { Scheduler: {
color: 'base.500', color: 'base.500',
description: i18n.t('nodes.schedulerDescription'), description: t('nodes.schedulerDescription'),
title: i18n.t('nodes.scheduler'), title: t('nodes.scheduler'),
}, },
SDXLMainModelField: { SDXLMainModelField: {
color: 'teal.500', color: 'teal.500',
description: i18n.t('nodes.sDXLMainModelFieldDescription'), description: t('nodes.sDXLMainModelFieldDescription'),
title: i18n.t('nodes.sDXLMainModelField'), title: t('nodes.sDXLMainModelField'),
}, },
SDXLRefinerModelField: { SDXLRefinerModelField: {
color: 'teal.500', color: 'teal.500',
description: i18n.t('nodes.sDXLRefinerModelFieldDescription'), description: t('nodes.sDXLRefinerModelFieldDescription'),
title: i18n.t('nodes.sDXLRefinerModelField'), title: t('nodes.sDXLRefinerModelField'),
}, },
string: { string: {
color: 'yellow.500', color: 'yellow.500',
description: i18n.t('nodes.stringDescription'), description: t('nodes.stringDescription'),
title: i18n.t('nodes.string'), title: t('nodes.string'),
}, },
StringCollection: { StringCollection: {
color: 'yellow.500', color: 'yellow.500',
description: i18n.t('nodes.stringCollectionDescription'), description: t('nodes.stringCollectionDescription'),
title: i18n.t('nodes.stringCollection'), title: t('nodes.stringCollection'),
}, },
StringPolymorphic: { StringPolymorphic: {
color: 'yellow.500', color: 'yellow.500',
description: i18n.t('nodes.stringPolymorphicDescription'), description: t('nodes.stringPolymorphicDescription'),
title: i18n.t('nodes.stringPolymorphic'), title: t('nodes.stringPolymorphic'),
}, },
UNetField: { UNetField: {
color: 'red.500', color: 'red.500',
description: i18n.t('nodes.uNetFieldDescription'), description: t('nodes.uNetFieldDescription'),
title: i18n.t('nodes.uNetField'), title: t('nodes.uNetField'),
}, },
VaeField: { VaeField: {
color: 'blue.500', color: 'blue.500',
description: i18n.t('nodes.vaeFieldDescription'), description: t('nodes.vaeFieldDescription'),
title: i18n.t('nodes.vaeField'), title: t('nodes.vaeField'),
}, },
VaeModelField: { VaeModelField: {
color: 'teal.500', color: 'teal.500',
description: i18n.t('nodes.vaeModelFieldDescription'), description: t('nodes.vaeModelFieldDescription'),
title: i18n.t('nodes.vaeModelField'), title: t('nodes.vaeModelField'),
}, },
}; };

View File

@ -9,7 +9,6 @@ import { buildCanvasSDXLInpaintGraph } from './buildCanvasSDXLInpaintGraph';
import { buildCanvasSDXLOutpaintGraph } from './buildCanvasSDXLOutpaintGraph'; import { buildCanvasSDXLOutpaintGraph } from './buildCanvasSDXLOutpaintGraph';
import { buildCanvasSDXLTextToImageGraph } from './buildCanvasSDXLTextToImageGraph'; import { buildCanvasSDXLTextToImageGraph } from './buildCanvasSDXLTextToImageGraph';
import { buildCanvasTextToImageGraph } from './buildCanvasTextToImageGraph'; import { buildCanvasTextToImageGraph } from './buildCanvasTextToImageGraph';
import i18n from 'i18next';
export const buildCanvasGraph = ( export const buildCanvasGraph = (
state: RootState, state: RootState,
@ -30,7 +29,7 @@ export const buildCanvasGraph = (
} }
} else if (generationMode === 'img2img') { } else if (generationMode === 'img2img') {
if (!canvasInitImage) { if (!canvasInitImage) {
throw new Error(i18n.t('nodes.missingCanvaInitImage')); throw new Error('Missing canvas init image');
} }
if ( if (
state.generation.model && state.generation.model &&
@ -42,7 +41,7 @@ export const buildCanvasGraph = (
} }
} else if (generationMode === 'inpaint') { } else if (generationMode === 'inpaint') {
if (!canvasInitImage || !canvasMaskImage) { if (!canvasInitImage || !canvasMaskImage) {
throw new Error(i18n.t('nodes.missingCanvaInitMaskImages')); throw new Error('Missing canvas init and mask images');
} }
if ( if (
state.generation.model && state.generation.model &&
@ -58,7 +57,7 @@ export const buildCanvasGraph = (
} }
} else { } else {
if (!canvasInitImage) { if (!canvasInitImage) {
throw new Error(i18n.t('nodes.missingCanvaInitImage')); throw new Error('Missing canvas init image');
} }
if ( if (
state.generation.model && state.generation.model &&

View File

@ -25,7 +25,6 @@ import {
POSITIVE_CONDITIONING, POSITIVE_CONDITIONING,
SEAMLESS, SEAMLESS,
} from './constants'; } from './constants';
import i18n from 'i18next';
/** /**
* Builds the Canvas tab's Image to Image graph. * Builds the Canvas tab's Image to Image graph.
@ -67,8 +66,8 @@ export const buildCanvasImageToImageGraph = (
); );
if (!model) { if (!model) {
log.error(i18n.t('nodes.noModelFoundState')); log.error('No model found in state');
throw new Error(i18n.t('nodes.noModelFoundState')); throw new Error('No model found in state');
} }
let modelLoaderNodeId = MAIN_MODEL_LOADER; let modelLoaderNodeId = MAIN_MODEL_LOADER;

View File

@ -44,7 +44,6 @@ import {
RANGE_OF_SIZE, RANGE_OF_SIZE,
SEAMLESS, SEAMLESS,
} from './constants'; } from './constants';
import i18n from 'i18next';
/** /**
* Builds the Canvas tab's Inpaint graph. * Builds the Canvas tab's Inpaint graph.
@ -80,8 +79,8 @@ export const buildCanvasInpaintGraph = (
} = state.generation; } = state.generation;
if (!model) { if (!model) {
log.error(i18n.t('nodes.noImageFoundState')); log.error('No Image found in state');
throw new Error(i18n.t('nodes.noImageFoundState')); throw new Error('No Image found in state');
} }
// The bounding box determines width and height, not the width and height params // The bounding box determines width and height, not the width and height params

View File

@ -46,7 +46,6 @@ import {
RANGE_OF_SIZE, RANGE_OF_SIZE,
SEAMLESS, SEAMLESS,
} from './constants'; } from './constants';
import i18n from 'i18next';
/** /**
* Builds the Canvas tab's Outpaint graph. * Builds the Canvas tab's Outpaint graph.
@ -84,8 +83,8 @@ export const buildCanvasOutpaintGraph = (
} = state.generation; } = state.generation;
if (!model) { if (!model) {
log.error(i18n.t('nodes.noImageFoundState')); log.error('No model found in state');
throw new Error(i18n.t('nodes.noImageFoundState')); throw new Error('No model found in state');
} }
// The bounding box determines width and height, not the width and height params // The bounding box determines width and height, not the width and height params

View File

@ -27,7 +27,6 @@ import {
SEAMLESS, SEAMLESS,
} from './constants'; } from './constants';
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt'; import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
import i18n from 'i18next';
/** /**
* Builds the Canvas tab's Image to Image graph. * Builds the Canvas tab's Image to Image graph.
@ -75,8 +74,8 @@ export const buildCanvasSDXLImageToImageGraph = (
); );
if (!model) { if (!model) {
log.error(i18n.t('nodes.noModelFoundState')); log.error('No model found in state');
throw new Error(i18n.t('nodes.noModelFoundState')); throw new Error('No model found in state');
} }
// Model Loader ID // Model Loader ID

View File

@ -46,7 +46,6 @@ import {
SEAMLESS, SEAMLESS,
} from './constants'; } from './constants';
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt'; import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
import i18n from 'i18next';
/** /**
* Builds the Canvas tab's Inpaint graph. * Builds the Canvas tab's Inpaint graph.
@ -87,8 +86,8 @@ export const buildCanvasSDXLInpaintGraph = (
} = state.sdxl; } = state.sdxl;
if (!model) { if (!model) {
log.error(i18n.t('nodes.noModelFoundState')); log.error('No model found in state');
throw new Error(i18n.t('nodes.noModelFoundState')); throw new Error('No model found in state');
} }
// The bounding box determines width and height, not the width and height params // The bounding box determines width and height, not the width and height params

View File

@ -48,7 +48,6 @@ import {
SEAMLESS, SEAMLESS,
} from './constants'; } from './constants';
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt'; import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
import i18n from 'i18next';
/** /**
* Builds the Canvas tab's Outpaint graph. * Builds the Canvas tab's Outpaint graph.
@ -91,8 +90,8 @@ export const buildCanvasSDXLOutpaintGraph = (
} = state.sdxl; } = state.sdxl;
if (!model) { if (!model) {
log.error(i18n.t('nodes.noModelFoundState')); log.error('No model found in state');
throw new Error(i18n.t('nodes.noModelFoundState')); throw new Error('No model found in state');
} }
// The bounding box determines width and height, not the width and height params // The bounding box determines width and height, not the width and height params

View File

@ -29,7 +29,6 @@ import {
SEAMLESS, SEAMLESS,
} from './constants'; } from './constants';
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt'; import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
import i18n from 'i18next';
/** /**
* Builds the Canvas tab's Text to Image graph. * Builds the Canvas tab's Text to Image graph.
@ -72,8 +71,8 @@ export const buildCanvasSDXLTextToImageGraph = (
state.sdxl; state.sdxl;
if (!model) { if (!model) {
log.error(i18n.t('nodes.noModelFoundState')); log.error('No model found in state');
throw new Error(i18n.t('nodes.noModelFoundState')); throw new Error('No model found in state');
} }
const use_cpu = shouldUseNoiseSettings const use_cpu = shouldUseNoiseSettings

View File

@ -27,7 +27,6 @@ import {
POSITIVE_CONDITIONING, POSITIVE_CONDITIONING,
SEAMLESS, SEAMLESS,
} from './constants'; } from './constants';
import i18n from 'i18next';
/** /**
* Builds the Canvas tab's Text to Image graph. * Builds the Canvas tab's Text to Image graph.
@ -67,8 +66,8 @@ export const buildCanvasTextToImageGraph = (
); );
if (!model) { if (!model) {
log.error(i18n.t('nodes.noModelFoundState')); log.error('No model found in state');
throw new Error(i18n.t('nodes.noModelFoundState')); throw new Error('No model found in state');
} }
const use_cpu = shouldUseNoiseSettings const use_cpu = shouldUseNoiseSettings

View File

@ -27,7 +27,6 @@ import {
RESIZE, RESIZE,
SEAMLESS, SEAMLESS,
} from './constants'; } from './constants';
import i18n from 'i18next';
/** /**
* Builds the Image to Image tab graph. * Builds the Image to Image tab graph.
@ -76,13 +75,13 @@ export const buildLinearImageToImageGraph = (
*/ */
if (!initialImage) { if (!initialImage) {
log.error(i18n.t('nodes.noImageFoundState')); log.error('No initial image found in state');
throw new Error(i18n.t('nodes.noImageFoundState')); throw new Error('No initial image found in state');
} }
if (!model) { if (!model) {
log.error(i18n.t('nodes.noModelFoundState')); log.error('No model found in state');
throw new Error(i18n.t('nodes.noModelFoundState')); throw new Error('No model found in state');
} }
const fp32 = vaePrecision === 'fp32'; const fp32 = vaePrecision === 'fp32';

View File

@ -29,7 +29,6 @@ import {
SEAMLESS, SEAMLESS,
} from './constants'; } from './constants';
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt'; import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
import i18n from 'i18next';
/** /**
* Builds the Image to Image tab graph. * Builds the Image to Image tab graph.
@ -76,13 +75,13 @@ export const buildLinearSDXLImageToImageGraph = (
*/ */
if (!initialImage) { if (!initialImage) {
log.error(i18n.t('nodes.noImageFoundState')); log.error('No initial image found in state');
throw new Error(i18n.t('nodes.noImageFoundState')); throw new Error('No initial image found in state');
} }
if (!model) { if (!model) {
log.error(i18n.t('nodes.noModelFoundState')); log.error('No model found in state');
throw new Error(i18n.t('nodes.noModelFoundState')); throw new Error('No model found in state');
} }
const fp32 = vaePrecision === 'fp32'; const fp32 = vaePrecision === 'fp32';

View File

@ -23,7 +23,6 @@ import {
SEAMLESS, SEAMLESS,
} from './constants'; } from './constants';
import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt'; import { craftSDXLStylePrompt } from './helpers/craftSDXLStylePrompt';
import i18n from 'i18next';
export const buildLinearSDXLTextToImageGraph = ( export const buildLinearSDXLTextToImageGraph = (
state: RootState state: RootState
@ -59,8 +58,8 @@ export const buildLinearSDXLTextToImageGraph = (
: initialGenerationState.shouldUseCpuNoise; : initialGenerationState.shouldUseCpuNoise;
if (!model) { if (!model) {
log.error(i18n.t('nodes.noModelFoundState')); log.error('No model found in state');
throw new Error(i18n.t('nodes.noModelFoundState')); throw new Error('No model found in state');
} }
const fp32 = vaePrecision === 'fp32'; const fp32 = vaePrecision === 'fp32';

View File

@ -26,7 +26,6 @@ import {
SEAMLESS, SEAMLESS,
TEXT_TO_IMAGE_GRAPH, TEXT_TO_IMAGE_GRAPH,
} from './constants'; } from './constants';
import i18n from 'i18next';
export const buildLinearTextToImageGraph = ( export const buildLinearTextToImageGraph = (
state: RootState state: RootState
@ -54,8 +53,8 @@ export const buildLinearTextToImageGraph = (
: initialGenerationState.shouldUseCpuNoise; : initialGenerationState.shouldUseCpuNoise;
if (!model) { if (!model) {
log.error(i18n.t('nodes.noModelFoundState')); log.error('No model found in state');
throw new Error(i18n.t('nodes.noModelFoundState')); throw new Error('No model found in state');
} }
const fp32 = vaePrecision === 'fp32'; const fp32 = vaePrecision === 'fp32';