From 4d8b8a2db8cec7ed4ba31bd8fdbd4e09102ddc5b Mon Sep 17 00:00:00 2001
From: Rohinish <92542124+rohinish404@users.noreply.github.com>
Date: Mon, 20 Nov 2023 11:54:03 +0530
Subject: [PATCH] fix(ui): add missing translations (#5096)
* first string only to test
* more strings changed
* almost half strings added in json file
* more strings added
* more changes
* few strings and t function changed
* resolved
* errors resolved
* chore(ui): fmt en.json
---------
Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
---
invokeai/frontend/web/public/locales/en.json | 53 +++++++++++++++---
.../listeners/imageUploaded.ts | 2 +-
.../components/ParamDynamicPromptsPreview.tsx | 4 +-
.../components/Boards/DeleteBoardModal.tsx | 10 ++--
.../Boards/GalleryBoardContextMenuItems.tsx | 5 +-
.../CurrentImage/CurrentImagePreview.tsx | 5 +-
.../MultipleSelectionMenuItems.tsx | 2 +-
.../SingleSelectionMenuItems.tsx | 4 +-
.../lora/components/ParamLoraSelect.tsx | 2 +-
.../subpanels/AddModelsPanel/AddModels.tsx | 6 ++-
.../AddModelsPanel/AdvancedAddModels.tsx | 15 +++---
.../AddModelsPanel/ScanAdvancedAddModels.tsx | 13 ++++-
.../subpanels/MergeModelsPanel.tsx | 2 +-
.../subpanels/ModelManagerPanel.tsx | 4 +-
.../SyncModelsButton.tsx | 2 +-
.../TopRightPanel/WorkflowEditorSettings.tsx | 4 +-
.../sidePanel/inspector/InspectorPanel.tsx | 10 ++--
.../sidePanel/workflow/WorkflowPanel.tsx | 6 ++-
.../ParamCanvasCoherenceMode.tsx | 18 ++++---
.../Canvas/GenerationModeStatusText.tsx | 24 +++++----
.../Upscale/ParamRealESRGANModel.tsx | 5 +-
.../components/QueueList/QueueListHeader.tsx | 11 ++--
.../SettingsModal/SettingsModal.tsx | 6 +--
.../tabs/ModelManager/ModelManagerTab.tsx | 54 ++++++++++---------
.../UnifiedCanvas/UnifiedCanvasContent.tsx | 7 ++-
25 files changed, 180 insertions(+), 94 deletions(-)
diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json
index 561b577a46..e3dd84bf5c 100644
--- a/invokeai/frontend/web/public/locales/en.json
+++ b/invokeai/frontend/web/public/locales/en.json
@@ -6,6 +6,7 @@
"flipVertically": "Flip Vertically",
"invokeProgressBar": "Invoke progress bar",
"menu": "Menu",
+ "mode": "Mode",
"modelSelect": "Model Select",
"modifyConfig": "Modify Config",
"nextImage": "Next Image",
@@ -30,6 +31,10 @@
"cancel": "Cancel",
"changeBoard": "Change Board",
"clearSearch": "Clear Search",
+ "deleteBoard": "Delete Board",
+ "deleteBoardAndImages": "Delete Board and Images",
+ "deleteBoardOnly": "Delete Board Only",
+ "deletedBoardsCannotbeRestored": "Deleted boards cannot be restored",
"loading": "Loading...",
"menuItemAutoAdd": "Auto-add to this Board",
"move": "Move",
@@ -51,9 +56,12 @@
"cancel": "Cancel",
"close": "Close",
"on": "On",
+ "checkpoint": "Checkpoint",
"communityLabel": "Community",
"controlNet": "ControlNet",
"controlAdapter": "Control Adapter",
+ "data": "Data",
+ "details": "Details",
"ipAdapter": "IP Adapter",
"t2iAdapter": "T2I Adapter",
"darkMode": "Dark Mode",
@@ -65,6 +73,7 @@
"imagePrompt": "Image Prompt",
"imageFailedToLoad": "Unable to Load Image",
"img2img": "Image To Image",
+ "inpaint": "inpaint",
"langArabic": "العربية",
"langBrPortuguese": "Português do Brasil",
"langDutch": "Nederlands",
@@ -93,6 +102,8 @@
"nodes": "Workflow Editor",
"nodesDesc": "A node based system for the generation of images is under development currently. Stay tuned for updates about this amazing feature.",
"openInNewTab": "Open in New Tab",
+ "outpaint": "outpaint",
+ "outputs": "Outputs",
"postProcessDesc1": "Invoke AI offers a wide variety of post processing features. Image Upscaling and Face Restoration are already available in the WebUI. You can access them from the Advanced Options menu of the Text To Image and Image To Image tabs. You can also process images directly, using the image action buttons above the current image display or in the viewer.",
"postProcessDesc2": "A dedicated UI will be released soon to facilitate more advanced post processing workflows.",
"postProcessDesc3": "The Invoke AI Command Line Interface offers various other features including Embiggen.",
@@ -100,7 +111,9 @@
"postProcessing": "Post Processing",
"random": "Random",
"reportBugLabel": "Report Bug",
+ "safetensors": "Safetensors",
"settingsLabel": "Settings",
+ "simple": "Simple",
"statusConnected": "Connected",
"statusConvertingModel": "Converting Model",
"statusDisconnected": "Disconnected",
@@ -127,6 +140,7 @@
"statusSavingImage": "Saving Image",
"statusUpscaling": "Upscaling",
"statusUpscalingESRGAN": "Upscaling (ESRGAN)",
+ "template": "Template",
"training": "Training",
"trainingDesc1": "A dedicated workflow for training your own embeddings and checkpoints using Textual Inversion and Dreambooth from the web interface.",
"trainingDesc2": "InvokeAI already supports training custom embeddourings using Textual Inversion using the main script.",
@@ -214,6 +228,7 @@
"setControlImageDimensions": "Set Control Image Dimensions To W/H",
"showAdvanced": "Show Advanced",
"toggleControlNet": "Toggle this ControlNet",
+ "unstarImage": "Unstar Image",
"w": "W",
"weight": "Weight",
"enableIPAdapter": "Enable IP Adapter",
@@ -279,6 +294,7 @@
"next": "Next",
"status": "Status",
"total": "Total",
+ "time": "Time",
"pending": "Pending",
"in_progress": "In Progress",
"completed": "Completed",
@@ -286,6 +302,7 @@
"canceled": "Canceled",
"completedIn": "Completed in",
"batch": "Batch",
+ "batchFieldValues": "Batch Field Values",
"item": "Item",
"session": "Session",
"batchValues": "Batch Values",
@@ -335,6 +352,7 @@
"loading": "Loading",
"loadMore": "Load More",
"maintainAspectRatio": "Maintain Aspect Ratio",
+ "noImageSelected": "No Image Selected",
"noImagesInGallery": "No Images to Display",
"setCurrentImage": "Set as Current Image",
"showGenerations": "Show Generations",
@@ -583,7 +601,7 @@
"strength": "Image to image strength",
"Threshold": "Noise Threshold",
"variations": "Seed-weight pairs",
- "vae": "VAE",
+ "vae": "VAE",
"width": "Width",
"workflow": "Workflow"
},
@@ -606,6 +624,7 @@
"cannotUseSpaces": "Cannot Use Spaces",
"checkpointFolder": "Checkpoint Folder",
"checkpointModels": "Checkpoints",
+ "checkpointOrSafetensors": "$t(common.checkpoint) / $t(common.safetensors)",
"clearCheckpointFolder": "Clear Checkpoint Folder",
"closeAdvanced": "Close Advanced",
"config": "Config",
@@ -685,6 +704,7 @@
"nameValidationMsg": "Enter a name for your model",
"noCustomLocationProvided": "No Custom Location Provided",
"noModels": "No Models Found",
+ "noModelSelected": "No Model Selected",
"noModelsFound": "No Models Found",
"none": "none",
"notLoaded": "not loaded",
@@ -730,6 +750,8 @@
"widthValidationMsg": "Default width of your model."
},
"models": {
+ "addLora": "Add LoRA",
+ "esrganModel": "ESRGAN Model",
"loading": "loading",
"noLoRAsAvailable": "No LoRAs available",
"noMatchingLoRAs": "No matching LoRAs",
@@ -1010,6 +1032,7 @@
"maskAdjustmentsHeader": "Mask Adjustments",
"maskBlur": "Blur",
"maskBlurMethod": "Blur Method",
+ "maskEdge": "Mask Edge",
"negativePromptPlaceholder": "Negative Prompt",
"noiseSettings": "Noise",
"noiseThreshold": "Noise Threshold",
@@ -1057,6 +1080,7 @@
"upscale": "Upscale (Shift + U)",
"upscaleImage": "Upscale Image",
"upscaling": "Upscaling",
+ "unmasked": "Unmasked",
"useAll": "Use All",
"useCpuNoise": "Use CPU Noise",
"cpuNoise": "CPU Noise",
@@ -1078,6 +1102,7 @@
"dynamicPrompts": "Dynamic Prompts",
"enableDynamicPrompts": "Enable Dynamic Prompts",
"maxPrompts": "Max Prompts",
+ "promptsPreview": "Prompts Preview",
"promptsWithCount_one": "{{count}} Prompt",
"promptsWithCount_other": "{{count}} Prompts",
"seedBehaviour": {
@@ -1117,7 +1142,10 @@
"displayHelpIcons": "Display Help Icons",
"displayInProgress": "Display Progress Images",
"enableImageDebugging": "Enable Image Debugging",
+ "enableInformationalPopovers": "Enable Informational Popovers",
+ "enableInvisibleWatermark": "Enable Invisible Watermark",
"enableNodesEditor": "Enable Nodes Editor",
+ "enableNSFWChecker": "Enable NSFW Checker",
"experimental": "Experimental",
"favoriteSchedulers": "Favorite Schedulers",
"favoriteSchedulersPlaceholder": "No schedulers favorited",
@@ -1217,7 +1245,8 @@
"sentToImageToImage": "Sent To Image To Image",
"sentToUnifiedCanvas": "Sent to Unified Canvas",
"serverError": "Server Error",
- "setCanvasInitialImage": "Set as canvas initial image",
+ "setAsCanvasInitialImage": "Set as canvas initial image",
+ "setCanvasInitialImage": "Set canvas initial image",
"setControlImage": "Set as control image",
"setIPAdapterImage": "Set as IP Adapter Image",
"setInitialImage": "Set as initial image",
@@ -1275,11 +1304,15 @@
},
"compositingBlur": {
"heading": "Blur",
- "paragraphs": ["The blur radius of the mask."]
+ "paragraphs": [
+ "The blur radius of the mask."
+ ]
},
"compositingBlurMethod": {
"heading": "Blur Method",
- "paragraphs": ["The method of blur applied to the masked area."]
+ "paragraphs": [
+ "The method of blur applied to the masked area."
+ ]
},
"compositingCoherencePass": {
"heading": "Coherence Pass",
@@ -1289,7 +1322,9 @@
},
"compositingCoherenceMode": {
"heading": "Mode",
- "paragraphs": ["The mode of the Coherence Pass."]
+ "paragraphs": [
+ "The mode of the Coherence Pass."
+ ]
},
"compositingCoherenceSteps": {
"heading": "Steps",
@@ -1307,7 +1342,9 @@
},
"compositingMaskAdjustments": {
"heading": "Mask Adjustments",
- "paragraphs": ["Adjust the mask."]
+ "paragraphs": [
+ "Adjust the mask."
+ ]
},
"controlNetBeginEnd": {
"heading": "Begin / End Step Percentage",
@@ -1365,7 +1402,9 @@
},
"infillMethod": {
"heading": "Infill Method",
- "paragraphs": ["Method to infill the selected area."]
+ "paragraphs": [
+ "Method to infill the selected area."
+ ]
},
"lora": {
"heading": "LoRA Weight",
diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/imageUploaded.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/imageUploaded.ts
index 3cff64f5bb..5b6ed0dfe8 100644
--- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/imageUploaded.ts
+++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/imageUploaded.ts
@@ -79,7 +79,7 @@ export const addImageUploadedFulfilledListener = () => {
dispatch(
addToast({
...DEFAULT_UPLOADED_TOAST,
- description: t('toast.setCanvasInitialImage'),
+ description: t('toast.setAsCanvasInitialImage'),
})
);
return;
diff --git a/invokeai/frontend/web/src/features/dynamicPrompts/components/ParamDynamicPromptsPreview.tsx b/invokeai/frontend/web/src/features/dynamicPrompts/components/ParamDynamicPromptsPreview.tsx
index 7e64521be2..e0ef4af903 100644
--- a/invokeai/frontend/web/src/features/dynamicPrompts/components/ParamDynamicPromptsPreview.tsx
+++ b/invokeai/frontend/web/src/features/dynamicPrompts/components/ParamDynamicPromptsPreview.tsx
@@ -17,6 +17,7 @@ import IAIInformationalPopover from 'common/components/IAIInformationalPopover/I
import ScrollableContent from 'features/nodes/components/sidePanel/ScrollableContent';
import { memo } from 'react';
import { FaCircleExclamation } from 'react-icons/fa6';
+import { useTranslation } from 'react-i18next';
const selector = createSelector(
stateSelector,
@@ -38,6 +39,7 @@ const listItemStyles: ChakraProps['sx'] = {
};
const ParamDynamicPromptsPreview = () => {
+ const { t } = useTranslation();
const { prompts, parsingError, isLoading, isError } =
useAppSelector(selector);
@@ -69,7 +71,7 @@ const ParamDynamicPromptsPreview = () => {
overflow="hidden"
textOverflow="ellipsis"
>
- Prompts Preview ({prompts.length})
+ {t('dynamicPrompts.promptsPreview')} ({prompts.length})
{parsingError && ` - ${parsingError}`}
{
- Delete {boardToDelete.board_name}
+ {t('controlnet.delete')} {boardToDelete.board_name}
@@ -136,7 +136,7 @@ const DeleteBoardModal = (props: Props) => {
bottomMessage={t('boards.bottomMessage')}
/>
)}
- Deleted boards cannot be restored.
+ {t('boards.deletedBoardsCannotbeRestored')}
{canRestoreDeletedImagesFromBin
? t('gallery.deleteImageBin')
@@ -149,21 +149,21 @@ const DeleteBoardModal = (props: Props) => {
sx={{ justifyContent: 'space-between', width: 'full', gap: 2 }}
>
- Cancel
+ {t('boards.cancel')}
- Delete Board Only
+ {t('boards.deleteBoardOnly')}
- Delete Board and Images
+ {t('boards.deleteBoardAndImages')}
diff --git a/invokeai/frontend/web/src/features/gallery/components/Boards/GalleryBoardContextMenuItems.tsx b/invokeai/frontend/web/src/features/gallery/components/Boards/GalleryBoardContextMenuItems.tsx
index 9499e6be98..0ce736da5d 100644
--- a/invokeai/frontend/web/src/features/gallery/components/Boards/GalleryBoardContextMenuItems.tsx
+++ b/invokeai/frontend/web/src/features/gallery/components/Boards/GalleryBoardContextMenuItems.tsx
@@ -2,13 +2,14 @@ import { MenuItem } from '@chakra-ui/react';
import { memo, useCallback } from 'react';
import { FaTrash } from 'react-icons/fa';
import { BoardDTO } from 'services/api/types';
-
+import { useTranslation } from 'react-i18next';
type Props = {
board: BoardDTO;
setBoardToDelete?: (board?: BoardDTO) => void;
};
const GalleryBoardContextMenuItems = ({ board, setBoardToDelete }: Props) => {
+ const { t } = useTranslation();
const handleDelete = useCallback(() => {
if (!setBoardToDelete) {
return;
@@ -34,7 +35,7 @@ const GalleryBoardContextMenuItems = ({ board, setBoardToDelete }: Props) => {
icon={}
onClick={handleDelete}
>
- Delete Board
+ {t('boards.deleteBoard')}
>
);
diff --git a/invokeai/frontend/web/src/features/gallery/components/CurrentImage/CurrentImagePreview.tsx b/invokeai/frontend/web/src/features/gallery/components/CurrentImage/CurrentImagePreview.tsx
index ec60d7cbef..f755de269c 100644
--- a/invokeai/frontend/web/src/features/gallery/components/CurrentImage/CurrentImagePreview.tsx
+++ b/invokeai/frontend/web/src/features/gallery/components/CurrentImage/CurrentImagePreview.tsx
@@ -170,7 +170,10 @@ const CurrentImagePreview = () => {
useThumbailFallback
dropLabel={t('gallery.setCurrentImage')}
noContentFallback={
-
+
}
dataTestId="image-preview"
/>
diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageContextMenu/MultipleSelectionMenuItems.tsx b/invokeai/frontend/web/src/features/gallery/components/ImageContextMenu/MultipleSelectionMenuItems.tsx
index 675a4fd6af..a067050290 100644
--- a/invokeai/frontend/web/src/features/gallery/components/ImageContextMenu/MultipleSelectionMenuItems.tsx
+++ b/invokeai/frontend/web/src/features/gallery/components/ImageContextMenu/MultipleSelectionMenuItems.tsx
@@ -104,7 +104,7 @@ const MultipleSelectionMenuItems = () => {
)}
} onClickCapture={handleChangeBoard}>
- Change Board
+ {t('boards.changeBoard')}
)}
} onClickCapture={handleChangeBoard}>
- Change Board
+ {t('boards.changeBoard')}
{imageDTO.starred ? (
}
onClickCapture={handleUnstarImage}
>
- {customStarUi ? customStarUi.off.text : `Unstar Image`}
+ {customStarUi ? customStarUi.off.text : t('controlnet.unstarImage')}
) : (