Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 1.2 KB

File metadata and controls

25 lines (19 loc) · 1.2 KB

Todos

loaders.js requires gettext-parser but currently this is not obvious

Either we have a hard dependency on gettext-parser (I like this better) or figure out how we want to do dynamic imports (we’ll have to do this for extractors anyways).

High priority

Set up automatic CI

Get Astro example going

specify language via astro:i18n

static mode: i18n pages

server mode: auto redirect i18n

how should components get the context?

Pages would need to somehow pass the context into components, either manually or with some state manager. Then each component can do bindLocale to get their own references to the translator functions with the right context. It’s either that or passing the functions themselves, which also sounds messy.

bindLocale seriously needs to not completely reinitialize the functions.

SvelteKit example

Extraction from Astro

Per-string fallbacks

Example project / sandboxes for SvelteKit

Extraction command

Extract from ts/js/tsx/jsx, as well as Astro or Svelte (or others) as long as their compile-to-JS packages are installed, as well as support supplying custom functions.

examples(SPA, gettext runtime on client side)