yangdx
commited on
Commit
·
1ea39b5
1
Parent(s):
9defefd
Translate common property names to Chinese
Browse files
lightrag/api/webui/assets/{index-CKDgttI2.js → index-B6Hxnq21.js}
RENAMED
Binary files a/lightrag/api/webui/assets/index-CKDgttI2.js and b/lightrag/api/webui/assets/index-B6Hxnq21.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/PropertiesView.tsx
CHANGED
@@ -132,11 +132,19 @@ const PropertyRow = ({
|
|
132 |
onClick?: () => void
|
133 |
tooltip?: string
|
134 |
}) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
return (
|
136 |
<div className="flex items-center gap-2">
|
137 |
-
<label className="text-primary/60 tracking-wide">{name}</label>:
|
138 |
<Text
|
139 |
-
className="hover:bg-primary/20 rounded p-1 text-ellipsis"
|
140 |
tooltipClassName="max-w-80"
|
141 |
text={value}
|
142 |
tooltip={tooltip || (typeof value === 'string' ? value : JSON.stringify(value, null, 2))}
|
|
|
132 |
onClick?: () => void
|
133 |
tooltip?: string
|
134 |
}) => {
|
135 |
+
const { t } = useTranslation()
|
136 |
+
|
137 |
+
const getPropertyNameTranslation = (name: string) => {
|
138 |
+
const translationKey = `graphPanel.propertiesView.node.propertyNames.${name}`
|
139 |
+
const translation = t(translationKey)
|
140 |
+
return translation === translationKey ? name : translation
|
141 |
+
}
|
142 |
+
|
143 |
return (
|
144 |
<div className="flex items-center gap-2">
|
145 |
+
<label className="text-primary/60 tracking-wide whitespace-nowrap">{getPropertyNameTranslation(name)}</label>:
|
146 |
<Text
|
147 |
+
className="hover:bg-primary/20 rounded p-1 overflow-hidden text-ellipsis"
|
148 |
tooltipClassName="max-w-80"
|
149 |
text={value}
|
150 |
tooltip={tooltip || (typeof value === 'string' ? value : JSON.stringify(value, null, 2))}
|
lightrag_webui/src/locales/en.json
CHANGED
@@ -150,7 +150,14 @@
|
|
150 |
"labels": "Labels",
|
151 |
"degree": "Degree",
|
152 |
"properties": "Properties",
|
153 |
-
"relationships": "Relationships"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
},
|
155 |
"edge": {
|
156 |
"title": "Relationship",
|
|
|
150 |
"labels": "Labels",
|
151 |
"degree": "Degree",
|
152 |
"properties": "Properties",
|
153 |
+
"relationships": "Relationships",
|
154 |
+
"propertyNames": {
|
155 |
+
"description": "Description",
|
156 |
+
"entity_id": "Name",
|
157 |
+
"entity_type": "Type",
|
158 |
+
"source_id": "SrcID",
|
159 |
+
"Neighbour": "Neigh"
|
160 |
+
}
|
161 |
},
|
162 |
"edge": {
|
163 |
"title": "Relationship",
|
lightrag_webui/src/locales/zh.json
CHANGED
@@ -147,7 +147,14 @@
|
|
147 |
"labels": "标签",
|
148 |
"degree": "度数",
|
149 |
"properties": "属性",
|
150 |
-
"relationships": "关系"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
},
|
152 |
"edge": {
|
153 |
"title": "关系",
|
|
|
147 |
"labels": "标签",
|
148 |
"degree": "度数",
|
149 |
"properties": "属性",
|
150 |
+
"relationships": "关系",
|
151 |
+
"propertyNames": {
|
152 |
+
"description": "描述",
|
153 |
+
"entity_id": "名称",
|
154 |
+
"entity_type": "类型",
|
155 |
+
"source_id": "信源ID",
|
156 |
+
"Neighbour": "邻接"
|
157 |
+
}
|
158 |
},
|
159 |
"edge": {
|
160 |
"title": "关系",
|