Scan your whole stack
Are you using translate-gadget?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.1.261130
translate-gadget was last scanned on 30 Nov 2026 at version 0.1.261130. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.1.261130 LATEST | 30 Nov 2026 | No rules fired |
| 0.1.261105.1 | 5 Nov 2026 | No rules fired |
| 0.1.261105 | 5 Nov 2026 | No rules fired |
| 0.1.261102 | 2 Nov 2026 | Not shown |
Findings for v0.1.261130. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.1.261130; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
一个基于 PySide6 的桌面翻译小工具,支持动态背景色适配,让翻译窗口自然融入桌面环境。
Enter - 触发翻译Ctrl+Enter - 清空输入框和翻译结果F4 - 打开设置页面双击输入框 - 清空输入框Ctrl+左键拖拽 - 移动窗口位置scripts/install_fcitx5_qt6.sh)# 从 PyPI 安装(推荐,装完即可全局使用命令)
uv tool install translate-gadget
# 或
pip install translate-gadget
# 启动
translate-gadget
源码运行:
# 克隆项目
git clone https://github.com/eleksbai/translate-gadget.git
cd translate-gadget
# 安装依赖(含 dev 工具链)
uv sync
# 运行程序
uv run python -m translate_gadget
支持三种翻译引擎,在设置页面顶部的「翻译引擎」下拉框中切换,各自的凭证独立保存。
F4 或右键托盘图标选择「设置」阿里云机器翻译(机器翻译服务,按字符计费,新用户有免费额度):
cn-hangzhouDeepSeek(大模型翻译,译文更贴合语境,按 token 计费):
deepseek-flash,可填 deepseek-v4-prohttps://api.deepseek.com,仅在需要走代理/网关时修改thinking: disabled)以保证翻译响应速度千问(通义千问大模型翻译,支持多模态理解,按 token 计费):
qwen3.7-flash,可填 qwen-max / qwen-plus 等https://cn-beijing.maas.qianwenaiapi.com/compatible-mode/v1enable_thinking: false)以保证翻译响应速度凭证存储:
~/.config/TranslateGadget/secret.key(Windows 为 %LOCALAPPDATA%\TranslateGadget\secret.key),权限 0600,之后直接复用,代码中不硬编码任何密钥Enter 键触发翻译Ctrl+Enter 或双击输入框清空Ctrl + 鼠标左键拖拽输入框,可移动窗口到任意位置窗口会自动采样周围 20 像素边距区域的背景色:
translate-gadget/
├── .github/workflows/publish.yml # 打 tag 后自动构建并发布到 PyPI
├── src/translate_gadget/
│ ├── __main__.py # 程序入口
│ ├── window.py # 主窗口(动态取色、翻译界面)
│ ├── translator.py # 翻译引擎(阿里云 / DeepSeek / 千问)与引擎注册表
│ ├── config.py # 配置管理(引擎分节 + 敏感字段加解密)
│ ├── secret_store.py # 本地主密钥与凭证加解密
│ ├── tray.py # 系统托盘
│ ├── settings_dialog.py # 设置对话框
│ ├── utils.py # 工具函数(语言检测、包内资源路径)
│ └── resources/ # 随包分发的资源(图标等)
├── scripts/ # 环境辅助与手工验证脚本
├── tests/ # 测试代码
├── LICENSE
├── .pre-commit-config.yaml # 提交前检查(ruff + pytest)
└── pyproject.toml # 项目配置(元数据、依赖、ruff/pytest)
| 组件 | 技术 |
|---|---|
| GUI 框架 | PySide6 (Qt 6) |
| 翻译引擎 | 阿里云机器翻译 SDK、DeepSeek / 千问 Chat Completions(httpx,OpenAI 兼容格式) |
| 配置存储 | QSettings + cryptography(Fernet 加密敏感字段) |
| 依赖管理 | uv |
uv sync # 安装运行与 dev 依赖(pytest / ruff / pre-commit)
uv run pytest # 运行测试
uv run ruff check # 静态检查
uv run ruff format # 代码格式化
uv run pre-commit install # 安装提交前钩子
uv build # 构建 sdist + wheel
版本号来自 git tag(由 hatch-vcs 推导),不需要手工修改 pyproject.toml。
发布由 GitHub Actions(.github/workflows/publish.yml)完成:推送 v* tag 后自动跑 lint、测试,用 uv build 构建,并通过 PyPI 的 Trusted Publishing(OIDC,无需 API Token)上传。
前置条件(只需配置一次):
pypi 的环境translate-gadget → Publishing → 添加 pending publisher:eleksbai/translate-gadgetpublish.ymlpypi# 1. 先把改动提交并推送到 master(tag 必须指向 master 最新提交)
git push
# 2. 打 tag:v<major>.<minor>.<YYMMDD>,例如 v0.1.261030
git tag v0.1.261030
# 3. 推送 tag 触发发布
git push origin v0.1.261030
# 若发错了:在 master 上修好后重新打 tag 递增补丁号
git tag v0.1.261030.1
git push origin v0.1.261030.1
注意:tag 必须指向 master 最新提交且匹配 v<major>.<minor>.<YYMMDD>[.<n>];已上传的版本号不能在 PyPI 上覆盖或复用。
MIT License
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.