Skip to content

Fix locale extraction, rewriting and cleanup regressions - #13

Merged
xwiz merged 5 commits into
mainfrom
fix/reported-localization-issues
Nov 14, 2026
Merged

xwiz merged 5 commits into
mainfrom
fix/reported-localization-issues

Conversation

@xwiz

@xwiz xwiz commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix the reported locale extraction, rewriting, configuration, diagnostics and cleanup problems across issues #1–#12.

  • Index nested arrays and objects while preserving ID-based catalogs; honor the configured locale layout, source locale and locale directory.
  • Rewrite nested Vue slots, component captions, safe mustache result literals and Options API strings; avoid modifying program comparisons, type-only bindings, comments and code examples.
  • Reuse existing useI18n composers and aliased bindings in Vue setup scripts. Projects using Vue I18n composition mode can opt in to automatic binding with aiI18n.vueSetupTranslation; unsupported runtimes are warned about and left unchanged.
  • Preserve Blade comments and code examples, reject common shell-command and configuration shapes during Blade extraction and rewriting, and support Commons/text-kind fallback lookup.
  • Scan Blade views during cleanup, preserve descendants of referenced structured keys, and refuse --apply when computed translation calls make unused-key detection unsafe.
  • Copy and package the required helpers; include issue regressions in the standard test command.

Boundaries

Automatic setup binding requires an explicit Vue I18n composition-mode opt-in when no composer already exists; mixed text/interpolation remains unchanged. Shell detection is conservative, not a complete shell parser. Dynamic-key detection may block cleanup. Review generated application diffs and inspect cleanup dry-run reports before applying them.

Validation

  • npm test: TypeScript compilation, lint, 184 Vitest tests and 33 issue regressions passed (one existing lint warning).
  • End-to-end Vue extraction/replacement and idempotency fixtures, including configured setup translation.
  • Compiled and rendered rewritten Vue components with Vue 3 and Vue I18n 9 in composition mode, covering both injected and reused composers.
  • Core and VS Code package listings include the new validator; git diff --check passed.

Extension release workflow

PRs and pushes to main test and package a VSIX with a SHA-256 checksum. A manual run on main can publish to Open VSX, the Visual Studio Marketplace, or both; registry credentials and a GitHub-hosted run are still required. See dev.md.

@xwiz xwiz changed the title Improve localization extraction, rewriting and cleanup Fix locale extraction, rewriting and cleanup regressions Nov 14, 2026
@xwiz
xwiz marked this pull request as ready for review November 14, 2026 18:30
@xwiz
xwiz merged commit ba8ee8d into main Nov 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant