feat(ui): localise iaialertdialog defaults

This commit is contained in:
psychedelicious 2023-03-19 18:59:52 +11:00
parent eae4eb419a
commit a782ad092d
2 changed files with 7 additions and 2 deletions

View File

@ -64,6 +64,8 @@
"trainingDesc2": "InvokeAI already supports training custom embeddings using Textual Inversion using the main script.", "trainingDesc2": "InvokeAI already supports training custom embeddings using Textual Inversion using the main script.",
"upload": "Upload", "upload": "Upload",
"close": "Close", "close": "Close",
"cancel": "Cancel",
"accept": "Accept",
"load": "Load", "load": "Load",
"back": "Back", "back": "Back",
"statusConnected": "Connected", "statusConnected": "Connected",

View File

@ -9,6 +9,7 @@ import {
useDisclosure, useDisclosure,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import { cloneElement, memo, ReactElement, ReactNode, useRef } from 'react'; import { cloneElement, memo, ReactElement, ReactNode, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import IAIButton from './IAIButton'; import IAIButton from './IAIButton';
type Props = { type Props = {
@ -22,10 +23,12 @@ type Props = {
}; };
const IAIAlertDialog = forwardRef((props: Props, ref) => { const IAIAlertDialog = forwardRef((props: Props, ref) => {
const { t } = useTranslation();
const { const {
acceptButtonText = 'Accept', acceptButtonText = t('common.accept'),
acceptCallback, acceptCallback,
cancelButtonText = 'Cancel', cancelButtonText = t('common.cancel'),
cancelCallback, cancelCallback,
children, children,
title, title,