Merge pull request #1283 from danielaskdd/main
Browse files- lightrag/api/webui/assets/{index-sAkGsjRM.js → index-CAYmcaJK.js} +0 -0
- lightrag/api/webui/index.html +0 -0
- lightrag_webui/src/components/graph/Legend.tsx +18 -1
- lightrag_webui/src/locales/ar.json +13 -0
- lightrag_webui/src/locales/en.json +13 -0
- lightrag_webui/src/locales/fr.json +13 -0
- lightrag_webui/src/locales/zh.json +13 -0
lightrag/api/webui/assets/{index-sAkGsjRM.js → index-CAYmcaJK.js}
RENAMED
Binary files a/lightrag/api/webui/assets/index-sAkGsjRM.js and b/lightrag/api/webui/assets/index-CAYmcaJK.js differ
|
|
lightrag/api/webui/index.html
CHANGED
Binary files a/lightrag/api/webui/index.html and b/lightrag/api/webui/index.html differ
|
|
lightrag_webui/src/components/graph/Legend.tsx
CHANGED
@@ -4,6 +4,21 @@ import { useGraphStore } from '@/stores/graph'
|
|
4 |
import { Card } from '@/components/ui/Card'
|
5 |
import { ScrollArea } from '@/components/ui/ScrollArea'
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
interface LegendProps {
|
8 |
className?: string
|
9 |
}
|
@@ -28,7 +43,9 @@ const Legend: React.FC<LegendProps> = ({ className }) => {
|
|
28 |
style={{ backgroundColor: color }}
|
29 |
/>
|
30 |
<span className="text-xs truncate" title={type}>
|
31 |
-
{type
|
|
|
|
|
32 |
</span>
|
33 |
</div>
|
34 |
))}
|
|
|
4 |
import { Card } from '@/components/ui/Card'
|
5 |
import { ScrollArea } from '@/components/ui/ScrollArea'
|
6 |
|
7 |
+
// Predefined node types list
|
8 |
+
const PREDEFINED_TYPES = [
|
9 |
+
'person',
|
10 |
+
'category',
|
11 |
+
'geo',
|
12 |
+
'location',
|
13 |
+
'organization',
|
14 |
+
'event',
|
15 |
+
'equipment',
|
16 |
+
'weapon',
|
17 |
+
'animal',
|
18 |
+
'unknown',
|
19 |
+
'technology'
|
20 |
+
]
|
21 |
+
|
22 |
interface LegendProps {
|
23 |
className?: string
|
24 |
}
|
|
|
43 |
style={{ backgroundColor: color }}
|
44 |
/>
|
45 |
<span className="text-xs truncate" title={type}>
|
46 |
+
{PREDEFINED_TYPES.includes(type.toLowerCase())
|
47 |
+
? t(`graphPanel.nodeTypes.${type.toLowerCase()}`)
|
48 |
+
: type}
|
49 |
</span>
|
50 |
</div>
|
51 |
))}
|
lightrag_webui/src/locales/ar.json
CHANGED
@@ -143,6 +143,19 @@
|
|
143 |
"title": "إعدادات خادم LightRAG"
|
144 |
},
|
145 |
"legend": "المفتاح",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
"sideBar": {
|
147 |
"settings": {
|
148 |
"settings": "الإعدادات",
|
|
|
143 |
"title": "إعدادات خادم LightRAG"
|
144 |
},
|
145 |
"legend": "المفتاح",
|
146 |
+
"nodeTypes": {
|
147 |
+
"person": "شخص",
|
148 |
+
"category": "فئة",
|
149 |
+
"geo": "كيان جغرافي",
|
150 |
+
"location": "موقع",
|
151 |
+
"organization": "منظمة",
|
152 |
+
"event": "حدث",
|
153 |
+
"equipment": "معدات",
|
154 |
+
"weapon": "سلاح",
|
155 |
+
"animal": "حيوان",
|
156 |
+
"unknown": "غير معروف",
|
157 |
+
"technology": "العلوم"
|
158 |
+
},
|
159 |
"sideBar": {
|
160 |
"settings": {
|
161 |
"settings": "الإعدادات",
|
lightrag_webui/src/locales/en.json
CHANGED
@@ -143,6 +143,19 @@
|
|
143 |
"title": "LightRAG Server Settings"
|
144 |
},
|
145 |
"legend": "Legend",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
"sideBar": {
|
147 |
"settings": {
|
148 |
"settings": "Settings",
|
|
|
143 |
"title": "LightRAG Server Settings"
|
144 |
},
|
145 |
"legend": "Legend",
|
146 |
+
"nodeTypes": {
|
147 |
+
"person": "Person",
|
148 |
+
"category": "Category",
|
149 |
+
"geo": "Geographic",
|
150 |
+
"location": "Location",
|
151 |
+
"organization": "Organization",
|
152 |
+
"event": "Event",
|
153 |
+
"equipment": "Equipment",
|
154 |
+
"weapon": "Weapon",
|
155 |
+
"animal": "Animal",
|
156 |
+
"unknown": "Unknown",
|
157 |
+
"technology": "Technology"
|
158 |
+
},
|
159 |
"sideBar": {
|
160 |
"settings": {
|
161 |
"settings": "Settings",
|
lightrag_webui/src/locales/fr.json
CHANGED
@@ -143,6 +143,19 @@
|
|
143 |
"title": "Paramètres du Serveur LightRAG"
|
144 |
},
|
145 |
"legend": "Légende",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
"sideBar": {
|
147 |
"settings": {
|
148 |
"settings": "Paramètres",
|
|
|
143 |
"title": "Paramètres du Serveur LightRAG"
|
144 |
},
|
145 |
"legend": "Légende",
|
146 |
+
"nodeTypes": {
|
147 |
+
"person": "Personne",
|
148 |
+
"category": "Catégorie",
|
149 |
+
"geo": "Géographique",
|
150 |
+
"location": "Emplacement",
|
151 |
+
"organization": "Organisation",
|
152 |
+
"event": "Événement",
|
153 |
+
"equipment": "Équipement",
|
154 |
+
"weapon": "Arme",
|
155 |
+
"animal": "Animal",
|
156 |
+
"unknown": "Inconnu",
|
157 |
+
"technology": "Technologie"
|
158 |
+
},
|
159 |
"sideBar": {
|
160 |
"settings": {
|
161 |
"settings": "Paramètres",
|
lightrag_webui/src/locales/zh.json
CHANGED
@@ -143,6 +143,19 @@
|
|
143 |
"title": "LightRAG 服务器设置"
|
144 |
},
|
145 |
"legend": "图例",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
"sideBar": {
|
147 |
"settings": {
|
148 |
"settings": "设置",
|
|
|
143 |
"title": "LightRAG 服务器设置"
|
144 |
},
|
145 |
"legend": "图例",
|
146 |
+
"nodeTypes": {
|
147 |
+
"person": "人物",
|
148 |
+
"category": "类别",
|
149 |
+
"geo": "地理名称",
|
150 |
+
"location": "位置",
|
151 |
+
"organization": "组织机构",
|
152 |
+
"event": "事件",
|
153 |
+
"equipment": "装备",
|
154 |
+
"weapon": "武器",
|
155 |
+
"animal": "动物",
|
156 |
+
"unknown": "未知",
|
157 |
+
"technology": "技术"
|
158 |
+
},
|
159 |
"sideBar": {
|
160 |
"settings": {
|
161 |
"settings": "设置",
|