yangdx commited on
Commit
b7e6be9
·
1 Parent(s): 219639b

Add translations for graph settings depth and degree labels

Browse files
lightrag_webui/src/components/graph/SettingsDisplay.tsx CHANGED
@@ -1,17 +1,19 @@
1
  import { useSettingsStore } from '@/stores/settings'
 
2
 
3
  /**
4
  * Component that displays current values of important graph settings
5
  * Positioned to the right of the toolbar at the bottom-left corner
6
  */
7
  const SettingsDisplay = () => {
 
8
  const graphQueryMaxDepth = useSettingsStore.use.graphQueryMaxDepth()
9
  const graphMinDegree = useSettingsStore.use.graphMinDegree()
10
 
11
  return (
12
  <div className="absolute bottom-2 left-[calc(2rem+2.5rem)] flex items-center gap-2 text-xs text-gray-400">
13
- <div>Depth: {graphQueryMaxDepth}</div>
14
- <div>Degree: {graphMinDegree}</div>
15
  </div>
16
  )
17
  }
 
1
  import { useSettingsStore } from '@/stores/settings'
2
+ import { useTranslation } from 'react-i18next'
3
 
4
  /**
5
  * Component that displays current values of important graph settings
6
  * Positioned to the right of the toolbar at the bottom-left corner
7
  */
8
  const SettingsDisplay = () => {
9
+ const { t } = useTranslation()
10
  const graphQueryMaxDepth = useSettingsStore.use.graphQueryMaxDepth()
11
  const graphMinDegree = useSettingsStore.use.graphMinDegree()
12
 
13
  return (
14
  <div className="absolute bottom-2 left-[calc(2rem+2.5rem)] flex items-center gap-2 text-xs text-gray-400">
15
+ <div>{t('graphPanel.sideBar.settings.depth')}: {graphQueryMaxDepth}</div>
16
+ <div>{t('graphPanel.sideBar.settings.degree')}: {graphMinDegree}</div>
17
  </div>
18
  )
19
  }
lightrag_webui/src/locales/en.json CHANGED
@@ -86,6 +86,8 @@
86
  "maxQueryDepth": "Max Query Depth",
87
  "minDegree": "Minimum Degree",
88
  "maxLayoutIterations": "Max Layout Iterations",
 
 
89
  "apiKey": "API Key",
90
  "enterYourAPIkey": "Enter your API key",
91
  "save": "Save",
 
86
  "maxQueryDepth": "Max Query Depth",
87
  "minDegree": "Minimum Degree",
88
  "maxLayoutIterations": "Max Layout Iterations",
89
+ "depth": "Depth",
90
+ "degree": "Degree",
91
  "apiKey": "API Key",
92
  "enterYourAPIkey": "Enter your API key",
93
  "save": "Save",
lightrag_webui/src/locales/zh.json CHANGED
@@ -86,6 +86,8 @@
86
  "maxQueryDepth": "最大查询深度",
87
  "minDegree": "最小度数",
88
  "maxLayoutIterations": "最大布局迭代次数",
 
 
89
  "apiKey": "API密钥",
90
  "enterYourAPIkey": "输入您的API密钥",
91
  "save": "保存",
 
86
  "maxQueryDepth": "最大查询深度",
87
  "minDegree": "最小度数",
88
  "maxLayoutIterations": "最大布局迭代次数",
89
+ "depth": "深度",
90
+ "degree": "邻边",
91
  "apiKey": "API密钥",
92
  "enterYourAPIkey": "输入您的API密钥",
93
  "save": "保存",