
glot
io.github.MattJeff由 GitHub 账号 MattJeff 发布v0.4.0更新于 Nov 2, 2026
AI-native i18n: live string context, validated translations, glossary for your app catalogs
概览
glot 是一套本地 i18n 工具链,其 MCP 模式把翻译键、使用位置、术语表和带校验的加词工具交给编码助手。
- 可以做什么
- 向助手提供应用翻译键及其使用位置(文件:行号、界面角色)和仓库术语表
- 通过与 CLI 相同的校验器新增或设置字符串,强制检查占位符、复数和术语规则
- 配合周边 CLI 流程:初始化、把硬编码界面字符串抽成键、只翻译增量、检查语言包
- 在运行中的应用里测量键的文本框宽度,并缩短溢出的译文
- 维护锁文件,未经显式强制不会覆盖手工修改
- 适用场景
- 适合希望编码助手直接在项目中本地化语言包,并且要求对占位符、CLDR 复数、术语和像素宽度做确定性校验、而非直接信任模型输出的场景。
- 运行要求
- 以本地 stdio 进程运行,通常通过 npx glot-i18n 启动,需要 Node.js。翻译需要 LLM 密钥:ANTHROPIC_API_KEY,或按 glot.toml 使用 OPENAI_API_KEY,也支持任意 OpenAI 兼容端点;context、check、add 不需要密钥。仓库中需有 glot.toml 配置。
安装
在 SourceWeft 中
- 打开 控制台中的 glot,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
glot
Your coding agent localizes your app. Deterministic code guarantees that nothing broken or too long lands in your catalogs.
The real glot translate binary. The LLM is scripted to get three strings wrong on its first pass; every refusal and message is glot's. Reproduce it, or rerun it with a real model doing the retries: docs/launch/record/refusal.sh.
Or all of it in one idempotent step: npx glot-i18n localize --yes --targets fr,de (init if needed → i18nize → translate → check).
Guarantees
Checked by code on every LLM output, on glot set, in the overlay and in CI (glot check). A refused string goes back to the model with the exact reason (2 retries, then the fallback model); if it still fails, nothing is written.
Works with the i18n library you already use, adds no runtime, bring your own LLM key (Anthropic, OpenAI, any OpenAI-compatible endpoint). MIT.
More: Docs (concepts, CLI, MCP, integrations & GitHub Action, agent skill, AI-translation provenance, FAQ & costs) · Labs (SEO, database content, emails/images, task parity, plural coverage…) · Self-hosted server (experimental) · Demo app · Architecture
来源:README.md,提交 a35a2d4
工具
0版本历史
2- v0.4.0最新Oct 18, 2026
- v0.3.0Oct 18, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分