crowdin / crowdin/crowdin-api-client-go

Add scope and re-translation options to Apply Pre-Translation

Open
#141 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
Go
Stars
10
Forks
18
Avg merge
1h 11m
Merged PRs (30d)
1

Description

The Crowdin API extends the **Apply Pre-Translation** (`api.projects.pre-translations.post`) request with re-translation controls in both Crowdin and Crowdin Enterprise. API client libraries should expose the new fields.

New fields:

- `scope` — which strings to apply pre-translation to: `untranslated` (default), `translated`, or `all`.
- `translationModifiedBefore` — re-translate only if the current translation was modified before this date (has effect when `scope` is `translated` or `all`).
- `replaceTranslationsOption` — whether to replace existing translations: `none` (default), `autoTranslated`, or `all`.
- `resetApprovalStatus` — remove approval on existing translations when applying pre-translations.

Deprecated:

- `translateUntranslatedOnly` is deprecated in favor of `scope` (`true` → `scope: untranslated`, `false` → `scope: all`) and cannot be combined with `scope` in the same request.

The fields carry mutual-exclusion constraints (e.g. `resetApprovalStatus` requires `scope` to be `translated`/`all` and cannot be combined with `skipApprovedTranslations` or `autoApproveOption`); see the API docs for the full rules.

**References:**
- [Apply Pre-Translation](https://support.crowdin.com/developer/api/v2/#operation/api.projects.pre-translations.post)
- Crowdin Enterprise: [Apply Pre-Translation](https://support.crowdin.com/developer/enterprise/api/v2/#operation/api.projects.pre-translations.post)

Contributor guide

Open the contributing guide

Research direction

Start at the client entry point for the Crowdin API operation `api.projects.pre-translations.post` and inspect its request type and related tests. Compare the exposed fields, deprecation behavior, and mutual-exclusion rules with the linked Apply Pre-Translation API documentation; done means the new options and constraints are represented by the Go client.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.