Skip to main content

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)

Source distribution for uplanguagetool 0.2.2
File Size Uploaded
uplanguagetool-0.2.2.tar.gz 16.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for uplanguagetool 0.2.2
File Interpreter ABI Platform
uplanguagetool-0.2.2-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page