feat(ai): add support for AI Translate Strings method#363
Merged
andrii-bodnar merged 5 commits intocrowdin:mainfrom Mar 16, 2026
Merged
feat(ai): add support for AI Translate Strings method#363andrii-bodnar merged 5 commits intocrowdin:mainfrom
andrii-bodnar merged 5 commits intocrowdin:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #363 +/- ##
===========================================
+ Coverage 50.38% 68.72% +18.34%
===========================================
Files 277 455 +178
Lines 3688 6901 +3213
Branches 0 565 +565
===========================================
+ Hits 1858 4742 +2884
- Misses 1830 2110 +280
- Partials 0 49 +49 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a new AI API surface to the Crowdin .NET SDK for translating arbitrary strings via the AI “Translate Strings” endpoint, along with unit test coverage and test resources.
Changes:
- Introduces
AiTranslateStringsRequest/AiTranslateStringsResponsemodels. - Adds
TranslateStringstoIAiApiExecutorand implements it inAiApiExecutor. - Adds a unit test plus
.resxfixtures and wires the new resource into the unit test project.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/Crowdin.Api/AI/IAiApiExecutor.cs |
Adds the TranslateStrings method to the AI executor interface. |
src/Crowdin.Api/AI/AiApiExecutor.cs |
Implements the new TranslateStrings API call and URL formation via AddUserIdIfAvailable. |
src/Crowdin.Api/AI/AiTranslateStringsRequest.cs |
Adds request model for the new translate-strings endpoint. |
src/Crowdin.Api/AI/AiTranslateStringsResponse.cs |
Adds response model for the new translate-strings endpoint. |
tests/Crowdin.Api.UnitTesting/Tests/AI/AiTranslateStringsApiTests.cs |
Adds a unit test validating request serialization and response parsing. |
tests/Crowdin.Api.UnitTesting/Resources/AI_TranslateStrings.resx |
Adds JSON fixtures for request/response. |
tests/Crowdin.Api.UnitTesting/Resources/AI_TranslateStrings.Designer.cs |
Strongly-typed resource accessor for the new fixtures. |
tests/Crowdin.Api.UnitTesting/Crowdin.Api.UnitTesting.csproj |
Registers the new .resx and generated designer for compilation. |
Files not reviewed (1)
- tests/Crowdin.Api.UnitTesting/Resources/AI_TranslateStrings.Designer.cs: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
No description provided.