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).
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.
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.