11import { Card , Elevation } from '@blueprintjs/core'
22
33import clsx from 'clsx'
4+ import { useAtomValue } from 'jotai'
45import { FC , ReactNode } from 'react'
56import { FCC } from 'types'
67
@@ -9,8 +10,12 @@ import { FactItem } from 'components/FactItem'
910import { CopilotDocV1 } from 'models/copilot.schema'
1011import { findActionType } from 'models/types'
1112
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'
1419import { formatDuration } from '../utils/times'
1520
1621interface ActionCardProps {
@@ -25,6 +30,7 @@ export const ActionCard: FC<ActionCardProps> = ({
2530 title,
2631} ) => {
2732 const t = useTranslation ( )
33+ const language = useAtomValue ( languageAtom )
2834 const type = findActionType ( action . type )
2935
3036 title ??= (
@@ -47,7 +53,7 @@ export const ActionCard: FC<ActionCardProps> = ({
4753 { 'name' in action && action . name && (
4854 < FactItem
4955 dense
50- title = { action . name }
56+ title = { getLocalizedOperatorName ( action . name , language ) }
5157 icon = "mugshot"
5258 className = "font-bold"
5359 />
0 commit comments