Skip to content

feat(translations): add scope and re-translation options to Apply Pre-Translation - #264

Open
innomaxx wants to merge 1 commit into
mainfrom
feature/issue-256_translations-add-scope
Open

feat(translations): add scope and re-translation options to Apply Pre-Translation#264
innomaxx wants to merge 1 commit into
mainfrom
feature/issue-256_translations-add-scope

Conversation

@innomaxx

@innomaxx innomaxx commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Closes #256

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Python Crowdin API client’s Translations resource to expose the newly added Apply Pre-Translation request options (scope and re-translation controls) described in Issue #256.

Changes:

  • Added new enums for pre-translation scope and replaceTranslationsOption.
  • Extended TranslationsResource.apply_pre_translation() to accept and send the new request fields.
  • Updated and expanded unit tests to cover the new request parameters.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
crowdin_api/api_resources/translations/resource.py Adds new optional parameters to apply_pre_translation() and forwards them into request payload.
crowdin_api/api_resources/translations/enums.py Introduces PreTranslationScope and PreTranslationReplaceTranslationsOption enums.
crowdin_api/api_resources/translations/tests/test_translations_resources.py Updates expected request payload keys and adds a positive test for the new parameters.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +105 to +107
`translateUntranslatedOnly` is deprecated in favor of `scope` and cannot be
combined with it in the same request.

Comment on lines +319 to 320

@mock.patch("crowdin_api.requester.APIRequester.request")
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 scope and re-translation options to Apply Pre-Translation

2 participants