I18nKeyEditor
A panel that lists the keys the current locale is missing, with an input per key and an export of the typed translations. The app creates a createMissingKeyStore(), passes store.record as onMissingKey to createI18n, and mounts the panel with that store. A key counts as missing even when it has a _ fallback or the fallback locale holds it. The export is flat JSON to spread into a catalog.
Installation
pnpm dlx shadcn@latest add @chelone/i18n-key-editorA panel that lists the keys the current locale is missing, with an input per key and an export of the typed translations. The app creates a createMissingKeyStore(), passes store.record as onMissingKey to createI18n, and mounts the panel with that store. A key counts as missing even when it has a _ fallback or the fallback locale holds it. The export is flat JSON to spread into a catalog.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | |
| defaultOpen | boolean | — | Start with the list showing. Default `true`. |
| showExport | boolean | — | Show the button that copies the typed translations as JSON. Default `true`. |
| store | MissingKeyStore | — | The store the app's `createI18n` writes to through `onMissingKey: store.record`. |