🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
🌐 chore: translate non-English comments to English in features/MCPPluginDetail (#13008)
LobeHub Bot935304dbd24a
diff --git a/src/features/MCPPluginDetail/Nav.tsx b/src/features/MCPPluginDetail/Nav.tsxindex 66cfaf861f2..877a32b64e9 100644--- a/src/features/MCPPluginDetail/Nav.tsx+++ b/src/features/MCPPluginDetail/Nav.tsx@@ -69,7 +69,7 @@ const Nav = memo<NavProps>(identifier,} = useDetailContext();- // 检查插件是否已安装+ // Check if the plugin is installedconst installedPlugin = useToolStore(pluginSelectors.getInstalledPluginById(identifier));const deploymentCount = deploymentOptions?.length || 0;@@ -83,7 +83,7 @@ const Nav = memo<NavProps>(compact={mobile}items={[- // 只有已安装的插件才显示设置 tab+ // Only show the settings tab for installed plugins!noSettings &&installedPlugin && {icon: <Icon icon={SettingsIcon} size={16} />,diff --git a/src/features/MCPPluginDetail/Score/GithubBadge/index.tsx b/src/features/MCPPluginDetail/Score/GithubBadge/index.tsxindex 62cecacc2bd..942b0c60f02 100644--- a/src/features/MCPPluginDetail/Score/GithubBadge/index.tsx+++ b/src/features/MCPPluginDetail/Score/GithubBadge/index.tsx@@ -25,7 +25,7 @@ const GithubBadge = memo(() => {const badgeFullUrl = urlJoin(OFFICIAL_SITE, 'badge/mcp-full', identifier);- // 构建带主题参数的完整 badge URL+ // Build the full badge URL with theme parameterconst styledBadgeFullUrl =selectedTheme === 'dark' ? badgeFullUrl : `${badgeFullUrl}?theme=${selectedTheme}`;diff --git a/src/features/MCPPluginDetail/Score/TotalScore.tsx b/src/features/MCPPluginDetail/Score/TotalScore.tsxindex 5bb68e7d010..9aa3bad8500 100644--- a/src/features/MCPPluginDetail/Score/TotalScore.tsx+++ b/src/features/MCPPluginDetail/Score/TotalScore.tsx@@ -7,7 +7,7 @@ import { useTranslation } from 'react-i18next';import { type ScoreResult } from '../../MCP/calculateScore';import { sortItemsByPriority } from '../../MCP/calculateScore';-// 使用 cssVar 的 getGradeColor 版本+// Version of getGradeColor using cssVarconst getGradeColor = (grade: string): string => {switch (grade) {case 'a': {@@ -127,15 +127,15 @@ const TotalScore = memo<TotalScoreProps>(({ scoreResult, scoreItems = [], isValiconst { totalScore, maxScore, percentage, grade } = scoreResult;- // 使用主题颜色的段级颜色配置+ // Segment-level color configuration using theme colorsconst SEGMENT_COLORS = {- // 绿色 (80-100%)+ // Green (80-100%)A_COLOR: cssVar.colorSuccess,- // 黄色 (60-85%)+ // Yellow (60-85%)B_COLOR: cssVar.colorWarning,- // 红色 (0-60%)+ // Red (0-60%)F_COLOR: cssVar.colorError,};@@ -145,11 +145,11 @@ const TotalScore = memo<TotalScoreProps>(({ scoreResult, scoreItems = [], isValiconst completedOptional = allItems.filter((item) => !item.required && item.check);const incompleteOptional = allItems.filter((item) => !item.required && !item.check);- // 计算必需项个数+ // Count the number of required itemsconst totalRequiredItems = completedRequired.length + incompleteRequired.length;const completedRequiredItems = completedRequired.length;- // 生成 tooltip 内容+ // Generate tooltip contentconst renderTooltipContent = () => (<div className={styles.tooltipContent}><div style={{ fontSize: '14px', marginBottom: '12px' }}>diff --git a/src/features/MCPPluginDetail/Score/index.tsx b/src/features/MCPPluginDetail/Score/index.tsxindex de2dbc36de3..f57a6edb285 100644--- a/src/features/MCPPluginDetail/Score/index.tsx+++ b/src/features/MCPPluginDetail/Score/index.tsx@@ -28,11 +28,11 @@ const Score = memo(() => {deploymentOptions,} = useDetailContext();- // 使用工具函数计算所有的 has* 值+ // Use utility function to calculate all has* valuesconst scoreFlags = calculateScoreFlags({deploymentOptions,github,- isClaimed: false, // 详情页暂时没有 claimed 状态+ isClaimed: false, // Detail page does not have claimed state yetisValidated,overview,promptsCount,@@ -40,19 +40,19 @@ const Score = memo(() => {toolsCount,});- // 计算总分和评级+ // Calculate total score and gradeconst scoreItems = createScoreItems(scoreFlags);const scoreResult = calculateScore(scoreItems);- // 使用新的 hook 创建评分项目列表+ // Use the new hook to create the score item listconst scoreListItems = useScoreList();- // 使用工具函数排序+ // Sort using utility functionconst sortedScoreListItems = sortItemsByPriority(scoreListItems);return (<Flexbox gap={16}>- {/* 总分显示 */}+ {/* Total score display */}<TotalScoreisValidated={isValidated}scoreResult={scoreResult}@@ -64,7 +64,7 @@ const Score = memo(() => {}))}/>- {/* 评分明细 */}+ {/* Score details */}<Grid rows={2}><Flexbox gap={16}>diff --git a/src/features/ModelSwitchPanel/components/ControlsForm/ThinkingBudgetSlider.tsx b/src/features/ModelSwitchPanel/components/ControlsForm/ThinkingBudgetSlider.tsxindex 8f86607792a..7af86dcbbdc 100644--- a/src/features/ModelSwitchPanel/components/ControlsForm/ThinkingBudgetSlider.tsx+++ b/src/features/ModelSwitchPanel/components/ControlsForm/ThinkingBudgetSlider.tsx@@ -3,28 +3,28 @@ import { Slider } from 'antd';import { memo, useMemo } from 'react';import useMergeState from 'use-merge-value';-// 定义特殊值映射+// Define special value mappingsconst SPECIAL_VALUES = {AUTO: -1,OFF: 0,};-// 定义滑块位置到实际值的映射+// Define slider position to actual value mappingconst SLIDER_TO_VALUE_MAP = [- SPECIAL_VALUES.AUTO, // 位置 0 -> -1 (Auto)- SPECIAL_VALUES.OFF, // 位置 1 -> 0 (OFF)- 128, // 位置 2 -> 128- 512, // 位置 3 -> 512- 1024, // 位置 4 -> 1024- 2048, // 位置 5 -> 2048- 4096, // 位置 6 -> 4096- 8192, // 位置 7 -> 8192- 16_384, // 位置 8 -> 16384- 24_576, // 位置 9 -> 24576- 32_768, // 位置 10 -> 32768+ SPECIAL_VALUES.AUTO, // Position 0 -> -1 (Auto)+ SPECIAL_VALUES.OFF, // Position 1 -> 0 (OFF)+ 128, // Position 2 -> 128+ 512, // Position 3 -> 512+ 1024, // Position 4 -> 1024+ 2048, // Position 5 -> 2048+ 4096, // Position 6 -> 4096+ 8192, // Position 7 -> 8192+ 16_384, // Position 8 -> 16384+ 24_576, // Position 9 -> 24576+ 32_768, // Position 10 -> 32768];-// 从实际值获取滑块位置+// Get slider position from actual valueconst getSliderPosition = (value: number): number => {const exactIndex = SLIDER_TO_VALUE_MAP.indexOf(value);if (exactIndex !== -1) return exactIndex;@@ -46,7 +46,7 @@ const getSliderPosition = (value: number): number => {return position;};-// 从滑块位置获取实际值(修复:0 不再被当作 falsy)+// Get actual value from slider position (fix: 0 is no longer treated as falsy)const getValueFromPosition = (position: number): number => {const v = SLIDER_TO_VALUE_MAP[position];return v === undefined ? SPECIAL_VALUES.AUTO : v;@@ -67,7 +67,7 @@ interface ThinkingBudgetSliderProps {const ThinkingBudgetSlider = memo<ThinkingBudgetSliderProps>(({ value, onChange, defaultValue }) => {- // 首先确定初始的 budget 值+ // First determine the initial budget valueconst initialBudget = value ?? defaultValue ?? SPECIAL_VALUES.AUTO;const [budget, setBudget] = useMergeState(initialBudget, {