mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): fix hotkey key & untranslated string
This commit is contained in:
parent
6930d8ba41
commit
8f9e9e639e
@ -86,6 +86,7 @@
|
|||||||
"copyError": "$t(gallery.copy) Error",
|
"copyError": "$t(gallery.copy) Error",
|
||||||
"close": "Close",
|
"close": "Close",
|
||||||
"on": "On",
|
"on": "On",
|
||||||
|
"or": "or",
|
||||||
"checkpoint": "Checkpoint",
|
"checkpoint": "Checkpoint",
|
||||||
"communityLabel": "Community",
|
"communityLabel": "Community",
|
||||||
"controlNet": "ControlNet",
|
"controlNet": "ControlNet",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/* eslint-disable i18next/no-literal-string */
|
|
||||||
import { Flex, Kbd, Spacer } from '@chakra-ui/react';
|
import { Flex, Kbd, Spacer } from '@chakra-ui/react';
|
||||||
import { InvText } from 'common/components/InvText/wrapper';
|
import { InvText } from 'common/components/InvText/wrapper';
|
||||||
import { memo } from 'react';
|
import { Fragment, memo } from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
interface HotkeysModalProps {
|
interface HotkeysModalProps {
|
||||||
hotkeys: string[][];
|
hotkeys: string[][];
|
||||||
@ -10,6 +10,7 @@ interface HotkeysModalProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const HotkeyListItem = (props: HotkeysModalProps) => {
|
const HotkeyListItem = (props: HotkeysModalProps) => {
|
||||||
|
const { t } = useTranslation();
|
||||||
const { title, hotkeys, description } = props;
|
const { title, hotkeys, description } = props;
|
||||||
return (
|
return (
|
||||||
<Flex flexDir="column" gap={2} px={2}>
|
<Flex flexDir="column" gap={2} px={2}>
|
||||||
@ -18,7 +19,7 @@ const HotkeyListItem = (props: HotkeysModalProps) => {
|
|||||||
<Spacer />
|
<Spacer />
|
||||||
{hotkeys.map((hotkey, index) => {
|
{hotkeys.map((hotkey, index) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<Fragment key={`${hotkey}-${index}`}>
|
||||||
{hotkey.map((key, index) => (
|
{hotkey.map((key, index) => (
|
||||||
<>
|
<>
|
||||||
<Kbd
|
<Kbd
|
||||||
@ -41,10 +42,10 @@ const HotkeyListItem = (props: HotkeysModalProps) => {
|
|||||||
variant="subtext"
|
variant="subtext"
|
||||||
fontWeight="semibold"
|
fontWeight="semibold"
|
||||||
>
|
>
|
||||||
or
|
{t('common.or')}
|
||||||
</InvText>
|
</InvText>
|
||||||
)}
|
)}
|
||||||
</>
|
</Fragment>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</Flex>
|
</Flex>
|
||||||
|
Loading…
Reference in New Issue
Block a user