@@ -23,6 +23,7 @@ import {
23
23
} from 'features/controlLayers/store/paramsSlice' ;
24
24
import type { ChangeEvent } from 'react' ;
25
25
import { memo , useCallback , useMemo , useState } from 'react' ;
26
+ import { useTranslation } from 'react-i18next' ;
26
27
import { PiArrowArcLeftBold , PiClockCounterClockwise , PiTrashBold , PiTrashSimpleBold } from 'react-icons/pi' ;
27
28
28
29
export const PositivePromptHistoryIconButton = memo ( ( ) => {
@@ -51,6 +52,7 @@ export const PositivePromptHistoryIconButton = memo(() => {
51
52
PositivePromptHistoryIconButton . displayName = 'PositivePromptHistoryIconButton' ;
52
53
53
54
const PromptHistoryContent = memo ( ( ) => {
55
+ const { t } = useTranslation ( ) ;
54
56
const dispatch = useAppDispatch ( ) ;
55
57
const positivePromptHistory = useAppSelector ( selectPositivePromptHistory ) ;
56
58
const [ searchTerm , setSearchTerm ] = useState ( '' ) ;
@@ -100,12 +102,12 @@ const PromptHistoryContent = memo(() => {
100
102
< Flex flexDir = "column" flexGrow = { 1 } minH = { 0 } >
101
103
{ positivePromptHistory . length === 0 && (
102
104
< Flex w = "full" h = "full" alignItems = "center" justifyContent = "center" >
103
- < Text color = "base.300" > No prompt history recorded. </ Text >
105
+ < Text color = "base.300" > { t ( ' prompt.noPromptHistory' ) } </ Text >
104
106
</ Flex >
105
107
) }
106
108
{ positivePromptHistory . length !== 0 && filteredPrompts . length === 0 && (
107
109
< Flex w = "full" h = "full" alignItems = "center" justifyContent = "center" >
108
- < Text color = "base.300" > No matching prompts in history. </ Text > { ' ' }
110
+ < Text color = "base.300" > { t ( 'prompt.noMatchingPrompts' ) } </ Text > { ' ' }
109
111
</ Flex >
110
112
) }
111
113
{ filteredPrompts . length > 0 && (
@@ -120,7 +122,7 @@ const PromptHistoryContent = memo(() => {
120
122
</ Flex >
121
123
< Flex alignItems = "center" justifyContent = "center" pt = { 1 } >
122
124
< Text color = "base.300" textAlign = "center" >
123
- < Kbd textTransform = "lowercase" > alt+up/down</ Kbd > to switch between prompts.
125
+ < Kbd textTransform = "lowercase" > alt+up/down</ Kbd > { t ( 'prompt.toSwitchBetweenPrompts' ) }
124
126
</ Text >
125
127
</ Flex >
126
128
</ Flex >
0 commit comments