mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
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>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Tab, TabList, TabPanel, TabPanels, Tabs } from '@chakra-ui/react';
|
||||
import i18n from 'i18n';
|
||||
import { ReactNode, memo } from 'react';
|
||||
import { ReactNode, memo, useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import ImportModelsPanel from '../../../../modelManager/subpanels/ImportModelsPanel';
|
||||
import MergeModelsPanel from '../../../../modelManager/subpanels/MergeModelsPanel';
|
||||
import ModelManagerPanel from '../../../../modelManager/subpanels/ModelManagerPanel';
|
||||
@@ -18,30 +18,34 @@ type ModelManagerTabInfo = {
|
||||
content: ReactNode;
|
||||
};
|
||||
|
||||
const tabs: ModelManagerTabInfo[] = [
|
||||
{
|
||||
id: 'modelManager',
|
||||
label: i18n.t('modelManager.modelManager'),
|
||||
content: <ModelManagerPanel />,
|
||||
},
|
||||
{
|
||||
id: 'importModels',
|
||||
label: i18n.t('modelManager.importModels'),
|
||||
content: <ImportModelsPanel />,
|
||||
},
|
||||
{
|
||||
id: 'mergeModels',
|
||||
label: i18n.t('modelManager.mergeModels'),
|
||||
content: <MergeModelsPanel />,
|
||||
},
|
||||
{
|
||||
id: 'settings',
|
||||
label: i18n.t('modelManager.settings'),
|
||||
content: <ModelManagerSettingsPanel />,
|
||||
},
|
||||
];
|
||||
|
||||
const ModelManagerTab = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
const tabs: ModelManagerTabInfo[] = useMemo(
|
||||
() => [
|
||||
{
|
||||
id: 'modelManager',
|
||||
label: t('modelManager.modelManager'),
|
||||
content: <ModelManagerPanel />,
|
||||
},
|
||||
{
|
||||
id: 'importModels',
|
||||
label: t('modelManager.importModels'),
|
||||
content: <ImportModelsPanel />,
|
||||
},
|
||||
{
|
||||
id: 'mergeModels',
|
||||
label: t('modelManager.mergeModels'),
|
||||
content: <MergeModelsPanel />,
|
||||
},
|
||||
{
|
||||
id: 'settings',
|
||||
label: t('modelManager.settings'),
|
||||
content: <ModelManagerSettingsPanel />,
|
||||
},
|
||||
],
|
||||
[t]
|
||||
);
|
||||
return (
|
||||
<Tabs
|
||||
isLazy
|
||||
|
||||
@@ -6,6 +6,7 @@ import { useDroppableTypesafe } from 'features/dnd/hooks/typesafeHooks';
|
||||
import { CanvasInitialImageDropData } from 'features/dnd/types';
|
||||
import { isValidDrop } from 'features/dnd/util/isValidDrop';
|
||||
import { memo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const droppableData: CanvasInitialImageDropData = {
|
||||
id: 'canvas-intial-image',
|
||||
@@ -13,6 +14,7 @@ const droppableData: CanvasInitialImageDropData = {
|
||||
};
|
||||
|
||||
const UnifiedCanvasContent = () => {
|
||||
const { t } = useTranslation();
|
||||
const {
|
||||
isOver,
|
||||
setNodeRef: setDroppableRef,
|
||||
@@ -40,7 +42,10 @@ const UnifiedCanvasContent = () => {
|
||||
<IAICanvasToolbar />
|
||||
<IAICanvas />
|
||||
{isValidDrop(droppableData, active) && (
|
||||
<IAIDropOverlay isOver={isOver} label="Set Canvas Initial Image" />
|
||||
<IAIDropOverlay
|
||||
isOver={isOver}
|
||||
label={t('toast.setCanvasInitialImage')}
|
||||
/>
|
||||
)}
|
||||
</Flex>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user