WORK-509
ID:WORK-509Status:ready

Plugin translation bundles + mergePlugins() wiring

Give plugins a slot to ship their own translations and wire it into the merge so a configured locale resolves plugin-scoped keys. This is the mechanism first-party and community plugins both use.

Priority:mediumComplexity:moderateMilestone:v0.29.0Source:SPEC-035
claude/multi-language-support-spec-5zzt9q View source

Criteria completion

Criteria completion: 0 of 4 (0%) checked; tracking started on Jul 17, no incremental history yet0%25%50%75%100%Jul 17Jul 30

Tracking started Jul 17 — check back for trends.

Branches 2
claude/multi-language-support-spec-5zzt9q current ready
main doneclaude/milestone-v0-29-0-stzywk done
History 1
  1. d92ad0c
    Created (ready)by bjornolofandersson

Scope

  • Add translations?: Record<string, Record<string, LocalizedValue>> to Plugin (packages/types/src/package.ts), keyed by BCP 47 locale. Authored as per-locale JSON imported into the field (Decision D3/D8).
  • Thread translations through LoadedPlugin and MergedPluginResult, and in mergePlugins() (packages/runes/src/plugins.ts) select the bundle for the configured locale (with the D5 de-ATde tag fallback) and merge into the LocaleContext.strings.
  • Enforce the D5 precedence at merge/resolve time: site ThemeConfig.strings entries win over plugin defaults; no per-plugin "default language" (English is the floor).
  • Tests: plugin bundle selected by locale, site override beats plugin bundle, unknown locale → English.

Acceptance Criteria

  • Plugin.translations exists and is loaded/merged by mergePlugins().
  • A plugin-shipped de bundle localizes that plugin's labels under locale: 'de'.
  • Site-level strings override beats the plugin bundle; missing keys fall to English.
  • No per-plugin default-language fallback path exists.

Blocked by

  • WORK-502

References

  • SPEC-035 — Plugin Translation Bundles, Decisions D3/D5/D8.