Skip to content

fix: add translations for plugin fetched from marketplace - #939

Open
paulhenry46 wants to merge 1 commit into
bulwarkmail:mainfrom
paulhenry46:plugin_trad_fix
Open

fix: add translations for plugin fetched from marketplace#939
paulhenry46 wants to merge 1 commit into
bulwarkmail:mainfrom
paulhenry46:plugin_trad_fix

Conversation

@paulhenry46

@paulhenry46 paulhenry46 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix paulhenry46/pgp-plugin#28 . Indeed, when plugins are imported from marketplace, ServerPlugin object is not populated with locales. As a result, the plugin use the translation key as fallback.

Changes

  • Populate ServerPlugin object with locales from manifest

Related issues

Closes #

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactor / code quality improvement
  • Chore / dependency update / CI change

Checklist

  • I have read the Contributing Guide
  • My code follows the project's code style and conventions
  • I have run npm run typecheck && npm run lint and there are no errors
  • The build passes (npm run build)
  • I have tested my changes locally
  • I have added or updated documentation if needed
  • I have updated translations (locales/) if my changes affect user-facing text
  • I have included screenshots or a screen recording for UI changes

Screenshots / demo

Notes for reviewers

Copilot AI lite review requested due to automatic review settings September 1, 2026 10:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The newly added manifest.locales validation accepts arrays as “object”, which can store an invalid locales shape and still break translations.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Populates installed marketplace plugins’ ServerPlugin metadata with locales from manifest.json, so sandbox/plugin i18n can resolve translation keys instead of falling back to the key string.

Changes:

  • Adds manifest.locales into the constructed ServerPlugin object during marketplace install/update.
File summaries
File Description
app/api/admin/marketplace/route.ts Includes manifest.locales when constructing the ServerPlugin saved from a marketplace bundle.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +368 to +370
...(manifest.locales && typeof manifest.locales === 'object'
? { locales: manifest.locales as ServerPlugin['locales'] }
: {}),
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.

[bug]: Translation keys do not get replaced with their actual translation texts

2 participants