Skip to content

feat: add Pre-Translation Batch Operations support#368

Merged
andrii-bodnar merged 2 commits intomasterfrom
copilot/add-pre-translation-batch-operations
Mar 14, 2026
Merged

feat: add Pre-Translation Batch Operations support#368
andrii-bodnar merged 2 commits intomasterfrom
copilot/add-pre-translation-batch-operations

Conversation

Copy link
Contributor

Copilot AI commented Mar 14, 2026

Exposes the PATCH /projects/{projectId}/pre-translations endpoint (RFC 6902 JSON Patch), allowing batch updates across multiple pre-translations in a single request.

Changes

  • TranslationsApi — new batchEditPreTranslations(Long projectId, List<PatchRequest> request) method returning ResponseList<PreTranslation>
  • Test fixturesbatchEditPreTranslationsRequest.json / batchEditPreTranslationsResponse.json
  • TranslationsApiTest — mock registration and batchEditPreTranslationsTest for the new endpoint

Usage

PatchRequest op = new PatchRequest();
op.setOp(PatchOperation.REPLACE);
op.setPath("/status");
op.setValue("cancelled");

ResponseList<PreTranslation> result = translationsApi.batchEditPreTranslations(projectId, List.of(op));
Original prompt

This section details on the original issue you should resolve

<issue_title>Add support for Pre-Translation Batch Operations</issue_title>
<issue_description>The Crowdin API adds a Pre-Translation Batch Operations method: PATCH /projects/{projectId}/pre-translations. It accepts a JSON Patch document (RFC 6902) to update multiple pre-translations in one request (e.g. change status or priority). API client libraries should expose this endpoint so consumers can perform batch updates on pre-translations via the SDK.

References:

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…re-translations

Co-authored-by: andrii-bodnar <29282228+andrii-bodnar@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for Pre-Translation Batch Operations Add Pre-Translation Batch Operations support Mar 14, 2026
Copilot AI requested a review from andrii-bodnar March 14, 2026 16:44
@andrii-bodnar andrii-bodnar marked this pull request as ready for review March 14, 2026 16:56
@andrii-bodnar andrii-bodnar changed the title Add Pre-Translation Batch Operations support feat: add Pre-Translation Batch Operations support Mar 14, 2026
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.40%. Comparing base (a7ee1c7) to head (5563423).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #368      +/-   ##
============================================
+ Coverage     93.37%   93.40%   +0.04%     
- Complexity      915      921       +6     
============================================
  Files           203      203              
  Lines          3300     3317      +17     
  Branches         70       70              
============================================
+ Hits           3081     3098      +17     
  Misses          183      183              
  Partials         36       36              

☔ 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.

@andrii-bodnar andrii-bodnar merged commit dcdc704 into master Mar 14, 2026
2 of 5 checks passed
@andrii-bodnar andrii-bodnar deleted the copilot/add-pre-translation-batch-operations branch March 14, 2026 17:01
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 Pre-Translation Batch Operations

3 participants