Skip to content

Release v0.20.0

Choose a tag to compare

@github-actions github-actions released this 14 Jul 04:29
d0410d6

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 .svelte file, or {{ t`Hello ${name}` }} in a .vue template, 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 t is a store, so you use it as $t. The extractor recognizes $t`…`, $t('key') and $t.id('key')`…` everywhere in a .svelte file.
  • Live in dev, gated in build. Save a .svelte/.vue file with new text and the catalogs plus verbaly.d.ts update 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, and t('key') calls count as used keys for check and extract --prune.
  • verbaly extract scans more by default. The default include now covers .svelte/.vue files and the app/ folder (where Nuxt 4 and the Next.js App Router live), next to src/. Your own include config still wins.

For the full details of this release, see the repository changelog.