Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add addToTm parameter support for Upload Translation API #185

Merged

Conversation

imprvhub
Copy link
Contributor

The support for addToTm parameter has been added to upload_translation method:

  • Defined addToTm in UploadTranslationRequest type
  • Added addToTm as optional boolean parameter in upload_translation
  • Added comprehensive test cases covering all possible scenarios

Default value (true) is handled by the API as specified in: https://developer.crowdin.com/api/v2/#operation/api.projects.translations.postOnLanguage

Closes #183

The support for addToTm parameter has been added to upload_translation method:
- Defined addToTm in UploadTranslationRequest type
- Added addToTm as optional boolean parameter in upload_translation
- Added comprehensive test cases covering all possible scenarios

Default value (true) is handled by the API as specified in:
https://developer.crowdin.com/api/v2/#operation/api.projects.translations.postOnLanguage

Closes crowdin#183
@imprvhub
Copy link
Contributor Author

@andrii-bodnar Fixed indentation issues from #185 that were causing workflow failures. All style checks should pass now.

@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.21%. Comparing base (ef7cfb1) to head (2e1da24).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #185      +/-   ##
==========================================
+ Coverage   99.20%   99.21%   +0.01%     
==========================================
  Files         166      166              
  Lines        6497     6505       +8     
  Branches      149      149              
==========================================
+ Hits         6445     6453       +8     
  Misses         36       36              
  Partials       16       16              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@andrii-bodnar andrii-bodnar left a comment

Choose a reason for hiding this comment

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

@imprvhub thanks for your contribution!

I just left a few comments on the matter.

crowdin_api/api_resources/translations/resource.py Outdated Show resolved Hide resolved
crowdin_api/api_resources/translations/resource.py Outdated Show resolved Hide resolved
@andrii-bodnar andrii-bodnar merged commit 1fa4b5b into crowdin:main Nov 27, 2024
6 checks passed
imprvhub added a commit to imprvhub/crowdin-api-client-python that referenced this pull request Nov 28, 2024
feat: add addToTm parameter support for Upload Translation API (crowdin#185)
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.

Upload Translations API: add addToTm parameter support
3 participants