added translation where needed

This commit is contained in:
Rohinish 2024-01-20 12:21:08 +05:30 committed by psychedelicious
parent fafe8ccc59
commit ea1d2d6a4c
2 changed files with 6 additions and 3 deletions

View File

@ -4,7 +4,7 @@ import { motion } from 'framer-motion';
import type { ReactNode } from 'react';
import { memo, useRef } from 'react';
import { v4 as uuidv4 } from 'uuid';
import { useTranslation } from 'react-i18next';
type Props = {
isOver: boolean;
label?: ReactNode;
@ -23,7 +23,8 @@ const exit: AnimationProps['exit'] = {
};
const IAIDropOverlay = (props: Props) => {
const { isOver, label = 'Drop' } = props;
const { t } = useTranslation();
const { isOver, label = t('gallery.drop') } = props;
const motionId = useRef(uuidv4());
return (
<motion.div

View File

@ -3,6 +3,7 @@ import { createMemoizedSelector } from 'app/store/createMemoizedSelector';
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
import IAIDndImage from 'common/components/IAIDndImage';
import { IAINoContentFallback } from 'common/components/IAIImageFallback';
import { useTranslation } from 'react-i18next';
import type {
TypesafeDraggableData,
TypesafeDroppableData,
@ -20,6 +21,7 @@ const selectInitialImage = createMemoizedSelector(
);
const InitialImage = () => {
const { t } = useTranslation();
const dispatch = useAppDispatch();
const initialImage = useAppSelector(selectInitialImage);
const isConnected = useAppSelector((s) => s.system.isConnected);
@ -62,7 +64,7 @@ const InitialImage = () => {
fitContainer
dropLabel="Set as Initial Image"
noContentFallback={
<IAINoContentFallback label="No initial image selected" />
<IAINoContentFallback label={t('parameters.invoke.noInitialImageSelected')} />
}
dataTestId="initial-image"
/>