1
1
import { Card , Elevation } from '@blueprintjs/core'
2
2
3
3
import clsx from 'clsx'
4
+ import { useAtomValue } from 'jotai'
4
5
import { FC , ReactNode } from 'react'
5
6
import { FCC } from 'types'
6
7
@@ -9,8 +10,12 @@ import { FactItem } from 'components/FactItem'
9
10
import { CopilotDocV1 } from 'models/copilot.schema'
10
11
import { findActionType } from 'models/types'
11
12
12
- import { useTranslation } from '../i18n/i18n'
13
- import { findOperatorDirection , getSkillUsageTitle } from '../models/operator'
13
+ import { languageAtom , useTranslation } from '../i18n/i18n'
14
+ import {
15
+ findOperatorDirection ,
16
+ getLocalizedOperatorName ,
17
+ getSkillUsageTitle ,
18
+ } from '../models/operator'
14
19
import { formatDuration } from '../utils/times'
15
20
16
21
interface ActionCardProps {
@@ -25,6 +30,7 @@ export const ActionCard: FC<ActionCardProps> = ({
25
30
title,
26
31
} ) => {
27
32
const t = useTranslation ( )
33
+ const language = useAtomValue ( languageAtom )
28
34
const type = findActionType ( action . type )
29
35
30
36
title ??= (
@@ -47,7 +53,7 @@ export const ActionCard: FC<ActionCardProps> = ({
47
53
{ 'name' in action && action . name && (
48
54
< FactItem
49
55
dense
50
- title = { action . name }
56
+ title = { getLocalizedOperatorName ( action . name , language ) }
51
57
icon = "mugshot"
52
58
className = "font-bold"
53
59
/>
0 commit comments