Metadata-Version: 2.4
Name: uplanguagetool
Version: 0.2.1
Summary: Language table editor
Author: Vorga
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: PyQt6 (>=6.7.0,<7.0.0)
Description-Content-Type: text/markdown

# UPLanguageTool

Python + PyQt6 版语言配置表格工具。

## 环境准备

``` shell
poetry install
```

## 运行

``` shell
poetry run uplanguagetool
```

## 打包

``` shell
poetry install
poetry run pyinstaller UPLanguageTool.spec
```

打包输出在 `dist/UPLanguageTool.exe`。

## 说明

- 支持拖拽和打开 `.lang`、`.json` 文件
- 右键菜单提供读取、保存、查找、撤销/恢复等功能
- 支持 DeepSeek 自动翻译：选中某个单元格后，可将该行文本自动翻译到其他语言列

## AI 翻译配置

在工具栏 `AI` 菜单中：

- `配置翻译服务`：选择预设模型并填写 API Key
- `配置术语关键词`：单独配置领域关键词（逗号或换行分隔）
- `翻译选中单元格到本行其他语言`：以当前选中单元格为源文本，翻译到同一行的其他语言列

说明：

- 语言会根据列名自动推断（例如 `en.json`、`zh_cn.json`、`ja.lang`）
- 目标语言为 `zh-TW` 时，会强制要求返回繁体中文（不允许简体字）
- 翻译结果支持撤销/恢复
- 翻译过程在后台异步执行，并显示可取消的进度窗口
- 默认预设为 DeepSeek Chat（`https://api.deepseek.com/v1` + `deepseek-chat`）
- 可配置领域关键词（如医疗软件、EMR、处方），且与模型预设无关
- 预设可扩展：新增预设只需在代码中的预设注册表添加一项
- AI 配置默认保存到用户目录 `~/.uplanguagetool/uplanguagetool.ai.json`，不写入注册表
- 可通过环境变量指定配置位置：
	- `UPLANGUAGETOOL_AI_CONFIG_FILE`：指定完整配置文件路径
	- `UPLANGUAGETOOL_AI_CONFIG_DIR`：指定配置目录（文件名固定为 `uplanguagetool.ai.json`）
