Update i18n translation
This commit is contained in:
@@ -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()
|
||||
|
@@ -136,6 +136,7 @@
|
||||
}
|
||||
},
|
||||
"graphPanel": {
|
||||
"dataIsTruncated": "تم اقتصار بيانات الرسم البياني على الحد الأقصى للعقد",
|
||||
"sideBar": {
|
||||
"settings": {
|
||||
"settings": "الإعدادات",
|
||||
|
@@ -136,6 +136,7 @@
|
||||
}
|
||||
},
|
||||
"graphPanel": {
|
||||
"dataIsTruncated": "Graph data is truncated to Max Nodes",
|
||||
"sideBar": {
|
||||
"settings": {
|
||||
"settings": "Settings",
|
||||
|
@@ -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",
|
||||
|
@@ -136,6 +136,7 @@
|
||||
}
|
||||
},
|
||||
"graphPanel": {
|
||||
"dataIsTruncated": "图数据已截断至最大返回节点数",
|
||||
"sideBar": {
|
||||
"settings": {
|
||||
"settings": "设置",
|
||||
|
Reference in New Issue
Block a user