diff --git a/apps/web/src/components/ChatComposer.tsx b/apps/web/src/components/ChatComposer.tsx index 93329aaef..0e21d4e01 100644 --- a/apps/web/src/components/ChatComposer.tsx +++ b/apps/web/src/components/ChatComposer.tsx @@ -2426,8 +2426,8 @@ function mcpTemplateMatchesQuery(tpl: McpTemplate, query: string): boolean { .includes(q); } -function pluginSourceLabel(plugin: InstalledPluginRecord): string { - return plugin.sourceKind === 'bundled' ? 'Official' : 'My plugin'; +function pluginSourceLabel(plugin: InstalledPluginRecord, t: TranslateFn): string { + return plugin.sourceKind === 'bundled' ? t('chat.mentionPluginOfficial') : t('chat.mentionPluginMine'); } function ToolsImportPanel({ @@ -2574,16 +2574,16 @@ function MentionPopover({ onPickMcp: (server: McpServerConfig) => void; onPickConnector: (connector: ConnectorDetail) => void; }) { - const { locale } = useI18n(); + const { locale, t } = useI18n(); const ref = useRef(null); const [tab, setTab] = useState('all'); const tabs: Array<{ id: MentionTab; label: string }> = [ - { id: 'all', label: 'All' }, - { id: 'plugins', label: 'Plugins' }, - { id: 'skills', label: 'Skills' }, - { id: 'mcp', label: 'MCP' }, - { id: 'connectors', label: 'Connectors' }, - { id: 'files', label: 'Design files' }, + { id: 'all', label: t('chat.mentionTabAll') }, + { id: 'plugins', label: t('chat.mentionTabPlugins') }, + { id: 'skills', label: t('chat.mentionTabSkills') }, + { id: 'mcp', label: t('chat.mentionTabMcp') }, + { id: 'connectors', label: t('chat.mentionTabConnectors') }, + { id: 'files', label: t('chat.mentionTabFiles') }, ]; const showPlugins = tab === 'all' || tab === 'plugins'; const showSkills = tab === 'all' || tab === 'skills'; @@ -2601,7 +2601,7 @@ function MentionPopover({ }, [connectors, files, plugins, skills, mcpServers, tab]); return (
-
+
{tabs.map((item) => (
) : null} {showPlugins && plugins.length > 0 ? ( <> -
Plugins
+
{t('chat.mentionSectionPlugins')}
{plugins.map((p) => ( ))} ) : null} {showSkills && skills.length > 0 ? ( <> -
Skills
+
{t('chat.mentionSectionSkills')}
{skills.map((skill) => { const active = skill.id === currentSkillId; return ( @@ -2671,7 +2671,7 @@ function MentionPopover({ {localizeSkillDescription(locale, skill) || skill.id} - {active ? 'Active' : skill.mode} + {active ? t('chat.mentionActiveSkill') : skill.mode} ); })} @@ -2679,7 +2679,7 @@ function MentionPopover({ ) : null} {showMcp && mcpServers.length > 0 ? ( <> -
MCP
+
{t('chat.mentionSectionMcp')}
{mcpServers.map((server) => (