feat: Add tmApprovedSuggestionsOnly parameter in Add Project API#121
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #121 +/- ##
=======================================
Coverage 98.21% 98.21%
=======================================
Files 68 68
Lines 3296 3296
=======================================
Hits 3237 3237
Misses 33 33
Partials 26 26 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| // If true - show primary language TM suggestions for dialects if there are no dialect-specific ones. Default: true. | ||
| ShowTMSuggestionsDialects *bool `json:"showTmSuggestionsDialects,omitempty"` | ||
| // If true - only approved suggestions will be saved to the project default TM. | ||
| TmApprovedSuggestionsOnly *bool `json:"tmApprovedSuggestionsOnly,omitempty"` |
There was a problem hiding this comment.
The Project model should also have this property because it is included in the response.
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for the TmApprovedSuggestionsOnly field in the Crowdin API client, which controls whether only approved translation suggestions are saved to a project's default Translation Memory.
- Added
TmApprovedSuggestionsOnlyfield to theProjectsAddRequeststruct - Updated test coverage to include the new field in serialization tests
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crowdin/model/projects.go | Added TmApprovedSuggestionsOnly field to ProjectsAddRequest struct with documentation |
| crowdin/projects_test.go | Updated test case to include the new field in both the request object and expected JSON payload |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@andrii-bodnar changes pushed! |
andrii-bodnar
left a comment
There was a problem hiding this comment.
@RyanCarlisle thank you!
Fixes #117