Skip to content

feat: add Pre-Translation Batch Operations support#632

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

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

Conversation

Copy link
Contributor

Copilot AI commented Mar 16, 2026

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

Changes

  • Translations.editPreTranslations(projectId, request) — new batch PATCH method targeting the collection endpoint (distinct from the existing editPreTranslation which targets a single resource by ID)
  • TranslationsModel.Priority — new 'low' | 'normal' | 'high' type
  • PreTranslationStatusAttributes.priority — added missing priority field to the status attributes interface

Usage

await crowdin.translationsApi.editPreTranslations(projectId, [
    {
        op: 'replace',
        path: '/9e7de270-4f83-41cb-b606-2f90631f26e2/status',
        value: 'canceled',
    },
    {
        op: 'replace',
        path: '/9e7de270-4f83-41cb-b606-2f90631f26e2/priority',
        value: 'high',
    },
]);

Returns ResponseList<Status<PreTranslationStatusAttributes>> — one entry per updated pre-translation.

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)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

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 in API feat: add Pre-Translation Batch Operations support Mar 16, 2026
Copilot AI requested a review from andrii-bodnar March 16, 2026 14:25
@andrii-bodnar andrii-bodnar marked this pull request as ready for review March 16, 2026 14:27
@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #632      +/-   ##
==========================================
+ Coverage   90.16%   90.18%   +0.02%     
==========================================
  Files          40       40              
  Lines        2083     2086       +3     
  Branches      243      243              
==========================================
+ Hits         1878     1881       +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.

@andrii-bodnar andrii-bodnar merged commit 51b1c3d into master Mar 16, 2026
12 checks passed
@andrii-bodnar andrii-bodnar deleted the copilot/add-pre-translation-batch-operations branch March 16, 2026 14:30
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

2 participants