locAIlize
Local-first VS Code extension for understanding localization keys, source references, and translation coverage.
This repository is the starting point for the architecture described in docs/NEW_PROJECT_BLUEPRINT.md.
Current status
- Locale resources are discovered and flattened into stable translation keys.
- Static
t('key') and i18n.t('key') references are indexed with source locations.
- Resources and details are shown in native VS Code tree views with issue severity badges.
- Missing locales, empty values, placeholder mismatches, and malformed locale JSON are published to Problems.
- Problems entries identify locAIlize, open the affected locale file at the relevant key, and provide confirmed Quick Fix edits for valid JSON issues.
- Reference entries open the source location directly in the editor.
- Optional AI enrichment uses any language model provider exposed by VS Code and sends one independent record per localization key.
- Per-key deterministic and AI context is persisted in
.locailize/context.json; locale JSON files remain valid translation resources.
Commands
locAIlize: Refresh Index
locAIlize: Go to Reference
locAIlize: Enrich Context with AI
locAIlize: Enrich Strings in Resource File with AI
locAIlize: Enrich All Project Strings with AI
locAIlize: Export Translator Context
locAIlize: Export XLIFF 2.0
The AI commands are explicit and user initiated. They are available as toolbar icons in the Resources and Details views, list the language models available through VS Code, let the user choose one, show a confirmation with the number of strings and estimated payload size, and keep unchanged results in memory for the current extension session. The selected-key, resource-file, and project commands all send independent per-string records rather than one aggregate file summary. AI results are currently shown in the AI output channel; Problems Quick Fixes are deterministic source-value edits and do not use an LLM. No model request is made during activation, indexing, watching, or diagnostics publication.
Translator handoff is explicit and keeps runtime resources unchanged. Export Translator Context writes a parallel en.context.json beside the source resource file. Export XLIFF 2.0 writes target-locale XLIFF files under .locailize/export; each unit joins the source value, target value, key, and translator-facing notes by key.