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

已驗證STDIO僅桌面開發者工具AI 與機器學習

概覽

AI 產生的概覽

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 設定。
安裝前請注意
翻譯會把來源字串傳送給你設定的 LLM 服務商,請確認哪些內容會離開儲存庫。工具會寫入語系檔,i18nize 也會改寫元件;鎖定檔可保護手動修改,除非使用強制選項。使用自己的金鑰會產生 LLM 費用。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 glot,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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.

[glot translate refuses a Polish plural without few/many, a {nom} placeholder the source does not have and a German label 276px wide for a 120px button, then writes the corrected retries]

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.

sh
npx glot-i18n init        # detect your i18n stack, write glot.toml + rules for your coding agentnpx glot-i18n i18nize     # hardcoded UI strings -> keys, components rewritten (next-intl, react-i18next)npx glot-i18n translate   # translate only the delta; invalid output is refused, retried, never written

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.

Placeholders{name}, {{name}}, tags: same set as the source, none invented, none translated. ICU, i18next and MessageFormat 2 syntax parsed.
CLDR pluralsEvery category the target locale needs (pl: one, few, many, other; ar: six of them).
Glossaryglossary.toml in your repo: required and forbidden translations, do-not-translate terms.
Pixel widthglot measure records each key's box and font from your running app; translations are shaped with that font and refused if wider. glot fit shortens what already overflows.
Lockfileglot.lock hashes source and target: only the delta is translated, and a hand edit is never overwritten without --force.
MCP for your agentglot mcp gives Claude Code, Cursor or Codex your keys, their usages (file:line, UI role), the glossary, and tools that add strings through the same validator.

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
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v0.4.0最新Oct 18, 2026
  2. v0.3.0Oct 18, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分