Navicat 中文助手:让英文报错说人话Navicat Chinese Helper: Making English Errors Speak Human
在 Navicat 里执行 SQL 报错,信息面板里蹦出一行英文:1146 - Table 'wh0524.t_user' doesn't exist。老手扫一眼就懂,新手得先翻译再理解。根据项目记录推测,作者自己写 SQL 时被英文报错烦到了,决定做个小工具让它"说人话"。思路很巧:外挂式独立小程序。不截图识别(OCR 又慢又不准),不联网,直接读取 Na…You run SQL in Navicat, it errors, and the info panel spits out: 1146 - Table 'wh0524.t_user' doesn't exist. Veterans get it at a glance; newcomers must translate first, understand…
Navicat 中文助手:让英文报错说人话
本文根据 GitHub 仓库 xueze-ai/navicat-chinese-helper 的 README 整理。无确切记录之处已标注"根据项目记录推测"或"待补充"。
为什么做
在 Navicat 里执行 SQL 报错,信息面板里蹦出一行英文:1146 - Table 'wh0524.t_user' doesn't exist。老手扫一眼就懂,新手得先翻译再理解。根据项目记录推测,作者自己写 SQL 时被英文报错烦到了,决定做个小工具让它"说人话"。
怎么做
思路很巧:外挂式独立小程序。不截图识别(OCR 又慢又不准),不联网,直接读取 Navicat"信息"面板的文本。也不向 Navicat 写入任何内容——只读不写,干净。
两层翻译:
- 词库翻译:完全离线,本地词库把英文报错变成中文,装完就能用
- AI 分析(可选):填一个自己的 OpenAI 兼容接口(比如阿里云百炼),程序会把"原因 + 怎么检查 + 怎么解决"写在报错下面,还按严重程度着色。不填密钥就完全不联网
技术选择
- C#:Windows 桌面小工具的经典选择
- 直接读面板文本:比 OCR 可靠得多,也快得多
- 离线优先,AI 可选:把选择权交给用户,不想联网就别填密钥
效果
README 里给了对照表,1062 - Duplicate entry 变成"值重复,违反唯一约束",1049 - Unknown database 变成"未知数据库"。根据项目记录推测,词库覆盖的是 MySQL 最常见的那几十种报错,覆盖范围尚未系统验证。
现在的状态
- 仓库:xueze-ai/navicat-chinese-helper
- 许可:待补充(README 未注明)
- 状态:可用,持续打磨中(根据项目记录推测)
小工具解决小痛点。这种"为自己做工具"的项目,往往比大而全的项目更有生命力。
Navicat Chinese Helper: Making English Errors Speak Human
Compiled from the GitHub repo xueze-ai/navicat-chinese-helper's README. Uncertain parts are marked "inferred from project records" or "to be added".
Why build it
You run SQL in Navicat, it errors, and the info panel spits out: 1146 - Table 'wh0524.t_user' doesn't exist. Veterans get it at a glance; newcomers must translate first, understand second. Inferred: the author was annoyed by English errors while writing SQL and decided to make a little tool that "speaks human".
How it works
A clever approach: a standalone overlay mini-app. No screenshot OCR (slow and unreliable), no network — it reads the text of Navicat's info panel directly. And it never writes anything into Navicat. Read-only, clean.
Two layers of translation:
- Dictionary translation: fully offline, a local dictionary turns English errors into Chinese. Works right after install.
- AI analysis (optional): plug in your own OpenAI-compatible API (e.g. Alibaba Bailian/DashScope), and the tool writes "cause + how to check + how to fix" under each error, color-coded by severity. No key, no network at all.
Tech choices
- C#: the classic choice for small Windows desktop tools
- Reading panel text directly: far more reliable and faster than OCR
- Offline-first, AI optional: the choice is yours — don't want network? Don't enter a key.
Effect
The README shows a comparison table: 1062 - Duplicate entry becomes "值重复,违反唯一约束" (duplicate value, unique constraint violated); 1049 - Unknown database becomes "未知数据库" (unknown database). Inferred: the dictionary covers the few dozen most common MySQL errors — its actual coverage has not been measured.
Current status
- Repo: xueze-ai/navicat-chinese-helper
- License: to be added (not stated in README)
- Status: working, being polished (inferred)
Small tools for small pains. These "built for myself" projects often outlive the big ambitious ones.