Skip to content

feat(ai): add support for AI Translate Strings method#363

Merged
andrii-bodnar merged 5 commits intocrowdin:mainfrom
MHIZokuchi:feat/ai-translate-strings
Mar 16, 2026
Merged

feat(ai): add support for AI Translate Strings method#363
andrii-bodnar merged 5 commits intocrowdin:mainfrom
MHIZokuchi:feat/ai-translate-strings

Conversation

@MHIZokuchi
Copy link
Copy Markdown
Contributor

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.72%. Comparing base (f45d418) to head (f5e88a2).
⚠️ Report is 180 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 / AiTranslateStringsResponse models.
  • Adds TranslateStrings to IAiApiExecutor and implements it in AiApiExecutor.
  • Adds a unit test plus .resx fixtures 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.

Comment thread src/Crowdin.Api/AI/AiTranslateStringsRequest.cs Outdated
Comment thread src/Crowdin.Api/AI/AiTranslateStringsRequest.cs Outdated
Comment thread src/Crowdin.Api/AI/AiTranslateStringsRequest.cs Outdated
MHIZokuchi and others added 4 commits March 13, 2026 14:18
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>
@andrii-bodnar andrii-bodnar linked an issue Mar 16, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Member

@andrii-bodnar andrii-bodnar left a comment

Choose a reason for hiding this comment

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

@MHIZokuchi thank you!

@andrii-bodnar andrii-bodnar merged commit 3caef19 into crowdin:main Mar 16, 2026
5 checks passed
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.

Add support for AI Translate Strings method

3 participants