UPLanguageTool
基于 Python + PyQt6 的多语言表格编辑工具,用于维护 .lang / .json 语言资源。
环境准备
poetry install
运行
poetry run uplanguagetool
核心功能
- 支持打开与拖拽导入
.lang、.json文件 - 支持按列(语言)与按行(key)进行增删改
- 提供查找、复制/剪切/粘贴、清空、全选
- 支持撤销/恢复历史记录
- 右键菜单与工具栏均可执行主要操作
AI 翻译(DeepSeek)
当前 AI 翻译仅使用 DeepSeek 兼容接口。
工具栏 AI 菜单包含:
配置翻译服务:选择 DeepSeek 预设并填写 API Key配置术语关键词:单独配置行业术语关键词(逗号或换行分隔)翻译选中单元格到本行其他语言:将当前选中单元格文本翻译到同一行其他语言列
注意:
- 当前不提供“整列批量翻译全部行”入口
- 同一行多目标语言翻译会优先使用单次多目标请求,以减少请求次数
- 翻译在后台异步执行,并显示可取消进度窗口
- 翻译写回支持撤销/恢复
翻译提示词策略
以下规则通过提示词约束实现,而非代码级强制改写:
- 自动根据列名推断语言(如
en.json、zh_cn.json、ja.lang) - 目标语言为
zh-TW时,要求使用台湾繁体中文表达(语义翻译,避免简体) - 字母类语言结果要求首字母大写
- 保留占位符、转义序列与标记符号
- 可注入术语关键词,增强行业术语一致性
AI 配置存储
AI 配置保存为用户目录下的 JSON 文件(不写入注册表):
- 默认路径:
~/.uplanguagetool/uplanguagetool.ai.json UPLANGUAGETOOL_AI_CONFIG_FILE:指定完整配置文件路径UPLANGUAGETOOL_AI_CONFIG_DIR:指定配置目录(文件名固定为uplanguagetool.ai.json)
测试
poetry run pytest
打包 EXE
poetry run pyinstaller UPLanguageTool.spec
输出文件位于 dist/UPLanguageTool.exe。
Metadata
Release files for uplanguagetool 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| uplanguagetool-0.2.2.tar.gz | 16.1 kB | Without provenance | Details for uplanguagetool-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uplanguagetool-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for uplanguagetool-0.2.2-py3-none-any.whl |
Total release size: 33.9 kB
Release files / uplanguagetool-0.2.2.tar.gz
| Download URL | uplanguagetool-0.2.2.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eab28f400e8e9596a3e6e66ff65530be58728f2f0a10910fcfd795794f4cad5d
|
|
BLAKE2b-256 checksum How to use checksums |
83f79a58a9bf5db50c8cf89fd169c6771b005848a67d62cb955526b0b68011bf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / uplanguagetool-0.2.2-py3-none-any.whl
| Download URL | uplanguagetool-0.2.2-py3-none-any.whl |
|---|---|
| Size | 17.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e6d4977f28ba13555c6f3ffcc1733b65ffbbf3d88b7a19ec31ee7b65ecafd3d
|
|
BLAKE2b-256 checksum How to use checksums |
4c294fcc69c1ad1cedb3e03fda95725227da323f781af219f3b1c383fb01961a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Security for uplanguagetool 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.