import type { ModuleConfig } from '@/types/module' import type { SearchIndexItem } from '@/stores/searchIndex' const searchItems: SearchIndexItem[] = [ { title: '翻译', description: '多源翻译与 AI 翻译工作台', keywords: ['翻译', '译', 'translate', 'translation', '中英', '互译', '英文'], tab: 'workbench' }, { title: '翻译引擎设置', description: '配置免密钥/云翻译引擎,或从 AI 服务添加 AI 引擎', keywords: ['引擎', '模型', 'api key', '密钥', 'deepl', 'libretranslate', '中转'], tab: 'settings' }, { title: '默认目标语言', description: '设置默认翻译到的语言', keywords: ['语言', '目标语言', 'target', '中文', '英文', '日语'], tab: 'settings' }, { title: '自动降级', description: '某个引擎失败时自动尝试下一个引擎', keywords: ['降级', 'fallback', '容错', '备用源', '自动'], tab: 'settings' }, { title: '划词翻译', description: '选中文字后按快捷键,非激活悬浮窗显示译文', keywords: ['划词', '取词', '选中', '快捷键', 'selection', '悬浮窗', '弹窗'], tab: 'settings' }, { title: '翻译剪贴板', description: '复制文字后按快捷键翻译剪贴板内容(终端类应用也能用)', keywords: ['剪贴板翻译', '复制翻译', '快捷键', 'clipboard'], tab: 'settings' }, { title: '截图翻译', description: '框选屏幕区域,本地 OCR 或视觉直译后展示译文', keywords: ['截图', 'ocr', '识别', '图片翻译', '屏幕翻译', '翻译选区'], tab: 'settings' }, { title: '翻译历史', description: '查看、搜索、收藏与清理翻译记录', keywords: ['历史', '记录', '收藏', 'history', '搜索'], tab: 'history' } ] export const moduleConfig: ModuleConfig = { id: 'translate', name: '翻译', icon: 'translate', description: '多源翻译与 AI 翻译,含划词、截图翻译', category: 'tool', defaultEnabled: true, loader: () => import('./TranslateModule.vue'), searchItems, // 默认第 5 位(翻译是高频入口,紧跟终端之后) order: 50 }