Fix legend translation keys by removing spaces from node types

This commit is contained in:
yangdx 2025-09-20 23:27:34 +08:00
parent 5e0ef7166e
commit 68883c0e7a

View file

@ -28,7 +28,7 @@ const Legend: React.FC<LegendProps> = ({ className }) => {
style={{ backgroundColor: color }}
/>
<span className="text-xs truncate" title={type}>
{t(`graphPanel.nodeTypes.${type.toLowerCase()}`, type)}
{t(`graphPanel.nodeTypes.${type.toLowerCase().replace(/\s+/g, '')}`, type)}
</span>
</div>
))}