Add fallback support for translation missing
This commit is contained in:
@@ -4,23 +4,6 @@ import { useGraphStore } from '@/stores/graph'
|
||||
import { Card } from '@/components/ui/Card'
|
||||
import { ScrollArea } from '@/components/ui/ScrollArea'
|
||||
|
||||
// Predefined node types list
|
||||
const PREDEFINED_TYPES = [
|
||||
'person',
|
||||
'category',
|
||||
'geo',
|
||||
'location',
|
||||
'organization',
|
||||
'event',
|
||||
'equipment',
|
||||
'weapon',
|
||||
'animal',
|
||||
'unknown',
|
||||
'object',
|
||||
'group',
|
||||
'technology',
|
||||
]
|
||||
|
||||
interface LegendProps {
|
||||
className?: string
|
||||
}
|
||||
@@ -45,9 +28,7 @@ const Legend: React.FC<LegendProps> = ({ className }) => {
|
||||
style={{ backgroundColor: color }}
|
||||
/>
|
||||
<span className="text-xs truncate" title={type}>
|
||||
{PREDEFINED_TYPES.includes(type.toLowerCase())
|
||||
? t(`graphPanel.nodeTypes.${type.toLowerCase()}`)
|
||||
: type}
|
||||
{t(`graphPanel.nodeTypes.${type.toLowerCase()}`, type)}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
|
Reference in New Issue
Block a user