QuickTranslate 模块商店指南

如何添加一个模块到商店

1. 构建 .qt-module 文件

# 使用腳手架工具生成模板
node packages/create-qt-module/index.js

# 或手动编写,參考 EXAMPLE.md

生成的 .qt-module 文件是一个标准的 JS 文件,包含完整的 manifest 和模块邏輯。

2. 将 .qt-module 放入 store/ 目录

cp your-module.qt-module store/

3. 在 store/modules.json 中添加條目

打开 store/modules.json,在 modules 数组中添加:

{
  "id": "engine-your-engine",
  "name": "Your Module Name",
  "version": "1.0.0",
  "author": "Your Name",
  "type": "translator",
  "description": "What this module does",
  "download": "store/your-module.qt-module",
  "size": "2.5 KB"
}

字段说明

字段说明示例
id唯一标识,与 manifest.id 一致engine-deepl
name模块名称DeepL Translator
version版本号1.0.0
author作者(GitHub 用户名推薦)yourname
type模块類型translator / mode / renderer / processor / service / theme
description简短描述(<=80字)DeepL API translation engine
download.qt-module 文件路徑store/deepl.qt-module
size文件大小2.5 KB

4. 提交流程

1. Fork 倉库

2. 添加你的 .qt-module 文件和更新 store/modules.json

3. 提交 Pull Request

4. 審核通过后合併,网站自动更新