feat(translations): add scope and re-translation options to Apply Pre-Translation - #264
Open
innomaxx wants to merge 1 commit into
Open
feat(translations): add scope and re-translation options to Apply Pre-Translation#264innomaxx wants to merge 1 commit into
innomaxx wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
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
scopeandreplaceTranslationsOption. - 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") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #256