Add i18n translation
This commit is contained in:
@@ -4,6 +4,21 @@ import { useGraphStore } from '@/stores/graph'
|
|||||||
import { Card } from '@/components/ui/Card'
|
import { Card } from '@/components/ui/Card'
|
||||||
import { ScrollArea } from '@/components/ui/ScrollArea'
|
import { ScrollArea } from '@/components/ui/ScrollArea'
|
||||||
|
|
||||||
|
// Predefined node types list
|
||||||
|
const PREDEFINED_TYPES = [
|
||||||
|
'person',
|
||||||
|
'category',
|
||||||
|
'geo',
|
||||||
|
'location',
|
||||||
|
'organization',
|
||||||
|
'event',
|
||||||
|
'equipment',
|
||||||
|
'weapon',
|
||||||
|
'animal',
|
||||||
|
'unknown',
|
||||||
|
'technology'
|
||||||
|
]
|
||||||
|
|
||||||
interface LegendProps {
|
interface LegendProps {
|
||||||
className?: string
|
className?: string
|
||||||
}
|
}
|
||||||
@@ -28,7 +43,9 @@ const Legend: React.FC<LegendProps> = ({ className }) => {
|
|||||||
style={{ backgroundColor: color }}
|
style={{ backgroundColor: color }}
|
||||||
/>
|
/>
|
||||||
<span className="text-xs truncate" title={type}>
|
<span className="text-xs truncate" title={type}>
|
||||||
{type}
|
{PREDEFINED_TYPES.includes(type.toLowerCase())
|
||||||
|
? t(`graphPanel.nodeTypes.${type.toLowerCase()}`)
|
||||||
|
: type}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
@@ -143,6 +143,19 @@
|
|||||||
"title": "إعدادات خادم LightRAG"
|
"title": "إعدادات خادم LightRAG"
|
||||||
},
|
},
|
||||||
"legend": "المفتاح",
|
"legend": "المفتاح",
|
||||||
|
"nodeTypes": {
|
||||||
|
"person": "شخص",
|
||||||
|
"category": "فئة",
|
||||||
|
"geo": "كيان جغرافي",
|
||||||
|
"location": "موقع",
|
||||||
|
"organization": "منظمة",
|
||||||
|
"event": "حدث",
|
||||||
|
"equipment": "معدات",
|
||||||
|
"weapon": "سلاح",
|
||||||
|
"animal": "حيوان",
|
||||||
|
"unknown": "غير معروف",
|
||||||
|
"technology": "العلوم"
|
||||||
|
},
|
||||||
"sideBar": {
|
"sideBar": {
|
||||||
"settings": {
|
"settings": {
|
||||||
"settings": "الإعدادات",
|
"settings": "الإعدادات",
|
||||||
|
@@ -143,6 +143,19 @@
|
|||||||
"title": "LightRAG Server Settings"
|
"title": "LightRAG Server Settings"
|
||||||
},
|
},
|
||||||
"legend": "Legend",
|
"legend": "Legend",
|
||||||
|
"nodeTypes": {
|
||||||
|
"person": "Person",
|
||||||
|
"category": "Category",
|
||||||
|
"geo": "Geographic",
|
||||||
|
"location": "Location",
|
||||||
|
"organization": "Organization",
|
||||||
|
"event": "Event",
|
||||||
|
"equipment": "Equipment",
|
||||||
|
"weapon": "Weapon",
|
||||||
|
"animal": "Animal",
|
||||||
|
"unknown": "Unknown",
|
||||||
|
"technology": "Technology"
|
||||||
|
},
|
||||||
"sideBar": {
|
"sideBar": {
|
||||||
"settings": {
|
"settings": {
|
||||||
"settings": "Settings",
|
"settings": "Settings",
|
||||||
|
@@ -143,6 +143,19 @@
|
|||||||
"title": "Paramètres du Serveur LightRAG"
|
"title": "Paramètres du Serveur LightRAG"
|
||||||
},
|
},
|
||||||
"legend": "Légende",
|
"legend": "Légende",
|
||||||
|
"nodeTypes": {
|
||||||
|
"person": "Personne",
|
||||||
|
"category": "Catégorie",
|
||||||
|
"geo": "Géographique",
|
||||||
|
"location": "Emplacement",
|
||||||
|
"organization": "Organisation",
|
||||||
|
"event": "Événement",
|
||||||
|
"equipment": "Équipement",
|
||||||
|
"weapon": "Arme",
|
||||||
|
"animal": "Animal",
|
||||||
|
"unknown": "Inconnu",
|
||||||
|
"technology": "Technologie"
|
||||||
|
},
|
||||||
"sideBar": {
|
"sideBar": {
|
||||||
"settings": {
|
"settings": {
|
||||||
"settings": "Paramètres",
|
"settings": "Paramètres",
|
||||||
|
@@ -143,6 +143,19 @@
|
|||||||
"title": "LightRAG 服务器设置"
|
"title": "LightRAG 服务器设置"
|
||||||
},
|
},
|
||||||
"legend": "图例",
|
"legend": "图例",
|
||||||
|
"nodeTypes": {
|
||||||
|
"person": "人物",
|
||||||
|
"category": "类别",
|
||||||
|
"geo": "地理名称",
|
||||||
|
"location": "位置",
|
||||||
|
"organization": "组织机构",
|
||||||
|
"event": "事件",
|
||||||
|
"equipment": "装备",
|
||||||
|
"weapon": "武器",
|
||||||
|
"animal": "动物",
|
||||||
|
"unknown": "未知",
|
||||||
|
"technology": "技术"
|
||||||
|
},
|
||||||
"sideBar": {
|
"sideBar": {
|
||||||
"settings": {
|
"settings": {
|
||||||
"settings": "设置",
|
"settings": "设置",
|
||||||
|
Reference in New Issue
Block a user