Repository navigation
feat(translation): ITranslationService for plugins (backendconfiguration#1384) - #974
Merged
Merged
Conversation
…ackendconfiguration-plugin#1384) Adds Microting.eFormApi.BasePn.Abstractions.Translation.ITranslationService (IsConfigured + TranslateText(source, sourceCode, targetCode)), so a plugin can machine-translate server-side through the API host without ever seeing the API key. The host owns the implementation and the key and registers it in DI; plugins resolve it optionally. The interface lives in its own namespace: the host still declares an ITranslationService of its own until it switches over, and its Startup imports Microting.eFormApi.BasePn.Abstractions, so a plain package bump must not produce an ambiguous reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused interface addition is consistent with the planned host and plugin integrations and has no identified defects.
Review effort: Balanced
Findings: None
What changed in this PR
Adds a shared translation-service contract so plugins can request host-managed server-side translations without receiving API credentials.
Changes:
- Adds
ITranslationServicewith configuration status and asynchronous translation. - Isolates the contract in a dedicated namespace to avoid host naming conflicts.
| File | Description |
|---|---|
eFormApi.BasePn/Abstractions/Translation/ITranslationService.cs |
Defines the plugin-facing translation contract and behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
Microting.eFormApi.BasePn.Abstractions.Translation.ITranslationServiceso plugins can machine-translate server-side through the API host (needed by microting/eform-backendconfiguration-plugin#1384, v2 of #1324).ITranslationServiceof its own until its follow-up PR switches over, and itsStartupimportsMicroting.eFormApi.BasePn.Abstractions. With a separate namespace, a plain dependabot bump to this version cannot cause an ambiguous reference.Release order
v10.0.37on master. The tag workflow publishes the NuGet package.Tests
This repo has no test project. The interface is exercised by the host's unit tests and the plugin's integration tests (fake translator) in the follow-up PRs.
Not verified
Builds locally (
dotnet build, anddotnet packto a scratch feed that both follow-ups were built against). No runtime check.Refs microting/eform-backendconfiguration-plugin#1384
🤖 Generated with Claude Code