Update i18n translation

This commit is contained in:
yangdx
2025-04-03 00:14:21 +08:00
parent 6d942da338
commit 419432d156
5 changed files with 13 additions and 3 deletions

View File

@@ -169,7 +169,7 @@ const fetchGraph = async (label: string, maxDepth: number, maxNodes: number) =>
}
// console.debug({ data: JSON.parse(JSON.stringify(rawData)) })
return rawGraph
return { rawGraph, is_truncated: rawData.is_truncated }
}
// Create a new graph instance with the raw graph data
@@ -303,12 +303,18 @@ const useLightrangeGraph = () => {
} else {
// 2. If query label is empty, set data to null
console.log('Query label is empty, show empty graph')
dataPromise = Promise.resolve(null);
dataPromise = Promise.resolve({ rawGraph: null, is_truncated: false });
}
// 3. Process data
dataPromise.then((data) => {
dataPromise.then((result) => {
const state = useGraphStore.getState()
const data = result?.rawGraph;
// Check if data is truncated
if (result?.is_truncated) {
toast.info(t('graphPanel.dataIsTruncated', 'Graph data is truncated to Max Nodes'));
}
// Reset state
state.reset()

View File

@@ -136,6 +136,7 @@
}
},
"graphPanel": {
"dataIsTruncated": "تم اقتصار بيانات الرسم البياني على الحد الأقصى للعقد",
"sideBar": {
"settings": {
"settings": "الإعدادات",

View File

@@ -136,6 +136,7 @@
}
},
"graphPanel": {
"dataIsTruncated": "Graph data is truncated to Max Nodes",
"sideBar": {
"settings": {
"settings": "Settings",

View File

@@ -136,6 +136,7 @@
}
},
"graphPanel": {
"dataIsTruncated": "Les données du graphe sont tronquées au nombre maximum de nœuds",
"sideBar": {
"settings": {
"settings": "Paramètres",

View File

@@ -136,6 +136,7 @@
}
},
"graphPanel": {
"dataIsTruncated": "图数据已截断至最大返回节点数",
"sideBar": {
"settings": {
"settings": "设置",