Skip to content

feat(ai): add support for AI Translate Strings endpoint#620

Open
AGSAVALIYA wants to merge 1 commit intocrowdin:masterfrom
AGSAVALIYA:feature/ai-translate-strings
Open

feat(ai): add support for AI Translate Strings endpoint#620
AGSAVALIYA wants to merge 1 commit intocrowdin:masterfrom
AGSAVALIYA:feature/ai-translate-strings

Conversation

@AGSAVALIYA
Copy link

@AGSAVALIYA AGSAVALIYA commented Feb 27, 2026

Description

Adds support for the new AI Translate Strings endpoint introduced in the Crowdin API.

Changes

  • Added aiUserTranslateStrings(userId, request) method to the Ai class — issues POST /users/{userId}/ai/translate/strings
  • Added AiModel.AiTranslateStringsRequest type (request body: projectId, languageId, optional stringIds[])
  • Added AiModel.AiTranslateStringsAttribute type (response attribute)
  • Added corresponding nock mock and test case in tests/ai/api.test.ts

References

Resolves #617


Note

Low Risk
Low risk: adds a new POST /users/{userId}/ai/translate/strings client wrapper and corresponding types/tests without changing existing request flows.

Overview
Adds support for the Crowdin AI Translate Strings user endpoint by introducing aiUserTranslateStrings() on the Ai client, issuing POST /users/{userId}/ai/translate/strings.

Extends AiModel with request/response types (AiTranslateStringsRequest, AiTranslateStringsAttribute) and adds a nock mock + test coverage to validate the new call returns a job identifier.

Written by Cursor Bugbot for commit d82df9a. This will update automatically on new commits. Configure here.

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.12%. Comparing base (a660900) to head (d82df9a).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #620      +/-   ##
==========================================
+ Coverage   90.11%   90.12%   +0.02%     
==========================================
  Files          40       40              
  Lines        2071     2074       +3     
  Branches      243      243              
==========================================
+ Hits         1866     1869       +3     
  Misses         82       82              
  Partials      123      123              

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

1 participant