i18n-LE
io.github.nolindnaidoov1.0.0更新於 Oct 4, 2026
Audit translation catalogues: missing keys, broken placeholders. Never returns a translation.
概覽
稽核翻譯目錄中缺少的鍵、損壞的佔位符與結構不一致,並以資料形式回傳結果,且從不回傳譯文。
- 功能
- 提供一個工具 check_catalogues,接收目錄內容與 i18n 函式庫名稱,回報缺少或多出的鍵、被丟棄或改名的佔位符、來自其他函式庫慣例的寫法、重複的鍵、結構不一致、空值以及未翻譯項目。它回傳與編輯器擴充功能相同的報告,預設最多 500 筆並附截斷標記。它不讀取檔案,也不發出網路請求。
- 適用情境
- 適合在發行前判斷某個語系是否可交付,在機器翻譯後捕捉佔位符名稱被翻譯的問題,或在審閱譯者的拉取請求時不必閱讀譯文就能看出鍵的變化。
- 執行需求
- 透過 npx i18n-le-mcp 以 stdio 在本機執行,也可用 npm 全域安裝。需要 Node.js。不需要環境變數、API 金鑰或設定。呼叫端必須提供目錄內容與函式庫名稱,因為此工具無法檢視專案。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 i18n-LE,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
i18n-LE: The Locale That Only Looks Finished
Audit translation catalogues against the source locale, in one keystroke
i18next, next-intl, VS Code bundles and Flutter ARB — keys and tokens, never a translated string
[Install from VS Code Marketplace] [Open VSX downloads] [i18n-le-mcp on npm] [i18n-le on crates.io] [LE Tools]
Useful? A star or rating is how other developers find it — ★ GitHub · ★ Open VSX · ★ Marketplace
What it does
Spanish shipped last week and the metrics screen has said {{periodo}} to every user since. The catalogue had every key. It parsed. The placeholder came back from machine translation with its name translated too, which compiles perfectly and renders the literal.
Open a catalogue, press Ctrl+Alt+L (Cmd+Alt+L on Mac), and the set it belongs to is audited against the source locale: keys a locale is missing or has too many of, placeholders dropped or renamed in translation, constructs from another library's convention, values left empty, keys defined twice, and a path that is an object in one locale and a string in another. The report opens beside the editor. From the Explorer, run it on any folder. Works in VS Code and in VS Code–based editors like Cursor and VSCodium (installable from Open VSX).
- Before a release — is this locale shippable, or does it only look like it is?
- After machine translation —
{{timeframe}}that came back as{{periodo}}, caught by its token names - Reviewing a translator's pull request — the keys that changed shape, without reading the translations
The report never contains a translated string. It names keys, placeholder tokens, counts and shapes; an untranslated string is proved by being byte-identical to the source, not by being shown. It rewrites nothing.
Install
It works out which library you use first
{name} is a placeholder in next-intl and literal text in i18next; {{ name }} is an i18next variable and an ICU literal brace around a word. No amount of looking at the bytes settles that, so the library is identified before a catalogue is read, and the placeholder grammar, the plural model and which keys are metadata all come from the answer.
Five kinds of evidence, and two agreeing is an identification: a manifest dependency (package.json, pubspec.yaml), a config file, the directory layout, the catalogue's own syntax, and call sites in source. An ARB file's @@locale beside @key metadata settles it alone. When nothing agrees, or two libraries do, it refuses and names what it found rather than picking one. Set i18n-le.library to skip identification.
A VS Code extension's package.nls.json sits at the root while its translations live elsewhere; that split is read as one set. Source files are read only to answer which library this is, never for a finding.
What it finds
One catalogue is the contract, never the union of all of them — a union would turn one translator's typo into a missing key for everyone else. It is the one English catalogue, or the one i18n-le.source names. Plural categories are folded onto their base key, so Polish's legitimate _few is not an extra key; plural-category completeness is deliberately not checked.
Use it from an AI agent
The same engine runs as an MCP server, so an agent can call it directly instead of being handed twenty-five catalogues to diff itself.
The tool takes catalogue contents and the library's name — it cannot see the project, so it cannot identify the library and does not guess. It returns the same report the editor renders, as data, capped at 500 findings by default with meta.truncated. It reads no files and makes no network requests. Published as i18n-le-mcp on npm and as io.github.nolindnaidoo/i18n-le in the MCP registry. It answers exactly as the Rust CLI's server does: one corpus runs against both, and a differential test feeds both thousands of generated catalogue sets — broken ones included, where both report the parser's own words and position — and compares every answer.
Configuring it by hand — any host with an MCP config file
Or install it once with npm install -g i18n-le-mcp and point at i18n-le-mcp. It needs no environment variables, no API key and no configuration of its own. To check it:
The CLI
The same audit runs from a terminal or a CI step: a Rust CLI in crate/, sharing one corpus with the extension — crate/fixtures/ — so the two can never read a catalogue differently.
Exit codes are the API — 0 clean, 1 findings, 2 the question was malformed (no library identified, two identified, no single source). Finding no catalogues at all is 0: there is nothing to be wrong with.
Commands
Settings
Languages
Twelve languages besides English:
German · Spanish · French · Indonesian · Italian · Japanese · Korean · Portuguese (Brazil) · Russian · Ukrainian · Vietnamese · Chinese (Simplified)
Both halves are covered — the manifest (command titles, setting names and descriptions) and everything shown while the extension runs (notifications, the status bar and the report's headings). A refusal's reason is the engine's English, identical to the CLI's.
Privacy & security
- No network access. The extension never sends data anywhere. The
telemetryEnabledsetting only writes events to a local Output Channel you can inspect (i18n-LE). - No translated value ever reaches a report, a notification or the MCP boundary. Keys are the deliberate exception, and where a layout makes the key the English sentence, that English is shown.
- The MCP server holds the same line. It takes content as an argument and returns data: no filesystem access, no network calls, no telemetry.
check:mcp-bundlefails the build if a translation reaches its stdout. - Error notifications redact home directories and credential-shaped fragments.
Documentation
Performance
Median of 7 runs after warmup, on Apple M5 Pro, 24 GB RAM, Node 24.3.0. Inputs are generated
by scripts/benchmark.ts rather than checked in, so the sizes above are
exactly what was measured. Reproduce with bun run benchmark.
These are machine-specific and are not asserted in CI — a benchmark that gates a build only tells you how busy the runner was.
Testing
209 test cases across 12 files, plus an integration suite that runs
in a real VS Code extension host and an end-to-end test that installs the
built .vsix into a clean profile.
Generated from a real run — coverage/coverage-summary.json and
coverage/test-results.json — by scripts/coverage-readme.js; CI fails if
this section drifts. Reproduce with bun run test:coverage, and the case
count is the one vitest prints.
More from the LE family
Sixteen single-purpose tools for the work in front of every model. Each ships a Rust CLI and an MCP server. One page: letools.dev
Get it out
- String-LE — Extract every string in a codebase, with its position, so a person can read them
- Numbers-LE — Extract every hardcoded number in a codebase, so a person can check them
- Units-LE — Extract every quantity with its unit, normalized, and refuse the ambiguous ones by name
- Dates-LE — Extract every date and timestamp, and the exact instant each one resolves to
- IDs-LE — Extract every UUID, ULID, NanoID, ObjectId and Snowflake, and decode the time inside
- IPs-LE — Extract every IP address, CIDR block and MAC, normalized and classified by scope
- URLs-LE — Extract every URL in a codebase, with its protocol and exact position
- Paths-LE — Extract every file path in a codebase, and say whether it still points at anything
- Colors-LE — Extract every color in a codebase, and say which ones are not in your palette
Check it
- Regex-LE — Find every regex in a codebase, and report which can be driven into catastrophic backtracking
- Versions-LE — Find where one dependency is constrained differently across a repository's manifests
- i18n-LE — Identify the i18n library a project uses, then audit its catalogs by that library's rules
- Scrape-LE — Check whether a page is scrapeable before the scraper is written, and say when it cannot tell
Guard it
- Secrets-LE — Find hardcoded credentials in a codebase, and never print one into the report
- EnvSync-LE — Compare the dotenv files in a tree, and say which keys are missing from which
- Unicode-LE — Find the Unicode that hides meaning — bidi controls, invisibles, homoglyphs, mixed scripts
Each stands on its own: no shared crate, no published core. Where two of them agree, it is because the same answer was right twice.
Contact — nolindnaidoo.com · GitHub · LinkedIn
Also by nolindnaidoo
Rust — pixelcoords and pixelactions are one loop: pixelcoords answers where, pixelactions acts there. Their own tools, their own voice — not part of the LE family.
- pixelcoords — Freeze your screen, mark regions, get pixel-exact coordinates and crops pixelcoords.dev · crates.io · docs.rs
- pixelactions — Consume human-verified coordinates, perform the interaction, confirm it landed pixelactions.dev · crates.io · docs.rs
License
MIT © nolindnaidoo
來源:README.md,提交 fe14ed4
工具
0版本歷史
1- v1.0.0最新Oct 4, 2026

