Skip to content

Localize Mermaid render status copy#6

Open
jerryfan wants to merge 1 commit into
Gurpartap:mainfrom
jerryfan:localize-render-status-copy
Open

Localize Mermaid render status copy#6
jerryfan wants to merge 1 commit into
Gurpartap:mainfrom
jerryfan:localize-render-status-copy

Conversation

@jerryfan
Copy link
Copy Markdown

@jerryfan jerryfan commented May 2, 2026

This keeps pi-mermaid English by default, but makes the render-status path optionally localizable.

Why these strings:

  • parser unavailable, too-many-blocks, too-large-block, and unsupported-type notices are the points where users decide whether a diagram actually rendered or why it was skipped.
  • /pi-mermaid empty-state messages tell users whether there was no assistant message or no Mermaid block.
  • I kept this to runtime status/command copy only; no README or generated files.

What changed:

  • adds a tiny optional i18n bridge with English fallbacks
  • adds es/fr/pt-BR bundles for render status and /pi-mermaid empty states
  • includes i18n.ts in the package files list so the runtime import is packaged
  • preserves current behavior when no i18n provider is present

Validation:

  • npx tsc --noEmit --module ESNext --moduleResolution Bundler --target ES2022 --skipLibCheck --allowImportingTsExtensions index.ts passed
  • npm pack --dry-run passed

If useful later, I’m happy to handle broader localization in small follow-up PRs using whatever locale set you prefer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant