Release v0.20.0
Write your text in .svelte and .vue files too. The write-in-source promise now covers single-file components: t`…` (and Svelte's $t`…`) is extracted, keyed and typed straight from .svelte and .vue files, script blocks and markup alike. Until now the compiler only read .js/.ts/.jsx/.tsx, so Svelte and Vue components had to fall back to hand-written keys. This closes the most visible DX gap on the road to 1.0. No breaking changes.
Highlights
- Natural text in Svelte and Vue components. Write
<h1>{$t`Hello ${name}`}</h1>in a.sveltefile, or{{ t`Hello ${name}` }}in a.vuetemplate, and the compiler does the rest: stable key, typed params, per-locale catalogs. Works in script blocks, markup, template interpolations and attribute bindings. - Svelte's store form is understood. In Svelte components
tis a store, so you use it as$t. The extractor recognizes$t`…`,$t('key')and$t.id('key')`…`everywhere in a.sveltefile. - Live in dev, gated in build. Save a
.svelte/.vuefile with new text and the catalogs plusverbaly.d.tsupdate on the spot (Vite). Missing translations still block the build. - Readable keys and runtime keys work in markup too:
t.id('home.title')`…`extracts under your key, andt('key')calls count as used keys forcheckandextract --prune. verbaly extractscans more by default. The defaultincludenow covers.svelte/.vuefiles and theapp/folder (where Nuxt 4 and the Next.js App Router live), next tosrc/. Your ownincludeconfig still wins.
For the full details of this release, see the repository changelog.