i18n-works 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/llms.txt +5 -4
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -81,7 +81,7 @@ i18n-works is licensed under the Apache License 2.0. See the [LICENSE](LICENSE)
81
81
  ## Known Limitations
82
82
 
83
83
  - The plugin is currently in beta, so some configuration options and file formats may change.
84
- - Only Vite is officially supported as a bundler.
84
+ - Only Vite is officially supported as a bundler. Vue (`.vue` files) is not supported. See [framework support](https://rand0mc0d3r.github.io/i18n-works/reference/framework-support/) for the platforms that were tested.
85
85
  - Most of your copy should not live in JSX, as only string literals passed to `t()` are extracted.
86
86
  - AI-generated translations are only for new or changed messages; existing translations are never overwritten silently.
87
87
  - Review the [documentation](https://rand0mc0d3r.github.io/i18n-works/) for the latest updates and limitations.
package/llms.txt CHANGED
@@ -83,16 +83,17 @@ useSyncExternalStore(subscribe, getVersion, getVersion);
83
83
 
84
84
  ## Frameworks
85
85
 
86
- The plugin is not tied to React. It reads these source files:
86
+ The plugin is not tied to React. It reads these source files. Vue is not supported, and `.vue` files are not read:
87
87
 
88
88
  | Files | Framework | Parser |
89
89
  | ------------------------ | --------- | --------------------------------------------------------------------------------------- |
90
- | `.tsx`, `.jsx`, `.ts`, `.js` | React, Solid | Built in (Oxc). |
90
+ | `.tsx`, `.jsx`, `.ts`, `.js` | React, Solid, TanStack Start, React Router 7, Web Components, plain TypeScript | Built in (Oxc). |
91
91
  | `.svelte` | Svelte | `svelte` 5 compiler, an optional peer dependency. Its `<script>` and `<script module>` blocks and markup are scanned. |
92
92
  | `.astro` | Astro | `@astrojs/compiler`, an optional peer dependency. Frontmatter, markup and `{}` expressions are scanned. |
93
93
 
94
94
  - Install `svelte` or `@astrojs/compiler` only for the files you use. Astro 7 does not install `@astrojs/compiler`, so add it to Astro projects. A missing compiler fails the build with the package name.
95
- - Tested versions (full table in `reference/framework-support`): Vite 8.0.0 to 8.4.1 on Node.js 26.7.0; React 19.0.0 to 19.3.1; Svelte 5.46.4 to 5.60.2 with `@sveltejs/vite-plugin-svelte` 7.0.0 to 7.3.3; `solid-js` 1.9.16 to 1.9.20 with `vite-plugin-solid` 2.11.17; Astro 7.0.0 to 7.4.14 with `@astrojs/compiler` 4.0.0 (build delivery only). Untested: Solid 2.x, Svelte 4, Astro 6 and earlier, and two frameworks in one project.
95
+ - React Router 7 keeps code in `app/`, so set `include: ["app/**/*.{ts,tsx,js,jsx}"]`, or the registry stays empty. TanStack Start needs no `include` change, but keep `i18nWorks()` first in `plugins`, ahead of `nitro()`, `tanstackStart()` and `viteReact()`.
96
+ - Tested versions (full table in `reference/framework-support`): Vite 8.0.0 to 8.4.1 on Node.js 26.7.0; React 19.0.0 to 19.3.1; Svelte 5.46.4 to 5.60.2 with `@sveltejs/vite-plugin-svelte` 7.0.0 to 7.3.3; `solid-js` 1.9.16 to 1.9.20 with `vite-plugin-solid` 2.11.17; Astro 7.0.0 to 7.4.14 with `@astrojs/compiler` 4.0.0 (build delivery only). Latest versions only: TanStack Start 1.170.1 and React Router 7.18.7 (React 19.3.1, Vite 8.4.1), and Web Components and plain TypeScript (Vite 8.4.1, TypeScript 7.0.2). Untested: Vue, Solid 2.x, Svelte 4, Astro 6 and earlier, two frameworks in one project, and minimal versions of TanStack Start, React Router 7, Web Components and plain TypeScript.
96
97
  - Svelte: a `t()` call in the instance script is named after the component file, and one in `<script module>` is named `<module>`.
97
98
  - Astro: `t()` in frontmatter and in markup is supported. Expressions that contain nested HTML with void tags such as `<br>` cannot be parsed as JavaScript, so move that markup out of the expression.
98
99
  - Only files that import `t` from `virtual:i18n-works` are parsed, so Svelte and Astro files without the import are unchanged.
@@ -127,7 +128,7 @@ const items = [{ label: t("Shared with your team") }, { label: "Private" }]; //
127
128
  | `sourceLocale` | `"en"` | Language the `t()` strings are written in. Fallback when a translation is missing. |
128
129
  | `delivery` | `"build"` | `"build"` or `"runtime"`. |
129
130
  | `locale` | `sourceLocale` | Locale compiled in build delivery. `I18N_WORKS_LOCALE` is also read; this option wins. |
130
- | `include` | `["src/**/*.{tsx,jsx,ts,js,svelte,astro}"]` | Globs of source files to scan, relative to the Vite root. |
131
+ | `include` | `["src/**/*.{tsx,jsx,ts,js,svelte,astro}"]` | Globs of source files to scan, relative to the Vite root. Set `["app/**/*.{ts,tsx,js,jsx}"]` for React Router 7. |
131
132
  | `exclude` | `["**/*.test.*", "**/node_modules/**"]` | Globs of files to skip. |
132
133
  | `directory` | `".i18n-works"` | Folder for `registry.json` and `locales/`. |
133
134
  | `provider` | `undefined` | One provider, or a map `{ primary?, [name]: provider \| undefined }`. `undefined` entries are skipped. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18n-works",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Build-time AI localization for strings marked with t() in React, Solid, Svelte and Astro applications",
5
5
  "keywords": [
6
6
  "ai",