Add translations for graph settings depth and degree labels
This commit is contained in:
@@ -1,17 +1,19 @@
|
|||||||
import { useSettingsStore } from '@/stores/settings'
|
import { useSettingsStore } from '@/stores/settings'
|
||||||
|
import { useTranslation } from 'react-i18next'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Component that displays current values of important graph settings
|
* Component that displays current values of important graph settings
|
||||||
* Positioned to the right of the toolbar at the bottom-left corner
|
* Positioned to the right of the toolbar at the bottom-left corner
|
||||||
*/
|
*/
|
||||||
const SettingsDisplay = () => {
|
const SettingsDisplay = () => {
|
||||||
|
const { t } = useTranslation()
|
||||||
const graphQueryMaxDepth = useSettingsStore.use.graphQueryMaxDepth()
|
const graphQueryMaxDepth = useSettingsStore.use.graphQueryMaxDepth()
|
||||||
const graphMinDegree = useSettingsStore.use.graphMinDegree()
|
const graphMinDegree = useSettingsStore.use.graphMinDegree()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="absolute bottom-2 left-[calc(2rem+2.5rem)] flex items-center gap-2 text-xs text-gray-400">
|
<div className="absolute bottom-2 left-[calc(2rem+2.5rem)] flex items-center gap-2 text-xs text-gray-400">
|
||||||
<div>Depth: {graphQueryMaxDepth}</div>
|
<div>{t('graphPanel.sideBar.settings.depth')}: {graphQueryMaxDepth}</div>
|
||||||
<div>Degree: {graphMinDegree}</div>
|
<div>{t('graphPanel.sideBar.settings.degree')}: {graphMinDegree}</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@@ -86,6 +86,8 @@
|
|||||||
"maxQueryDepth": "Max Query Depth",
|
"maxQueryDepth": "Max Query Depth",
|
||||||
"minDegree": "Minimum Degree",
|
"minDegree": "Minimum Degree",
|
||||||
"maxLayoutIterations": "Max Layout Iterations",
|
"maxLayoutIterations": "Max Layout Iterations",
|
||||||
|
"depth": "Depth",
|
||||||
|
"degree": "Degree",
|
||||||
"apiKey": "API Key",
|
"apiKey": "API Key",
|
||||||
"enterYourAPIkey": "Enter your API key",
|
"enterYourAPIkey": "Enter your API key",
|
||||||
"save": "Save",
|
"save": "Save",
|
||||||
|
@@ -86,6 +86,8 @@
|
|||||||
"maxQueryDepth": "最大查询深度",
|
"maxQueryDepth": "最大查询深度",
|
||||||
"minDegree": "最小度数",
|
"minDegree": "最小度数",
|
||||||
"maxLayoutIterations": "最大布局迭代次数",
|
"maxLayoutIterations": "最大布局迭代次数",
|
||||||
|
"depth": "深度",
|
||||||
|
"degree": "邻边",
|
||||||
"apiKey": "API密钥",
|
"apiKey": "API密钥",
|
||||||
"enterYourAPIkey": "输入您的API密钥",
|
"enterYourAPIkey": "输入您的API密钥",
|
||||||
"save": "保存",
|
"save": "保存",
|
||||||
|
Reference in New Issue
Block a user