Skip to content

feat: Add tmApprovedSuggestionsOnly parameter in Add Project API#121

Merged
andrii-bodnar merged 2 commits intocrowdin:mainfrom
RyanCarlisle:feat/tmApprovedSuggestionsOnly-create-project-API
Oct 29, 2025
Merged

feat: Add tmApprovedSuggestionsOnly parameter in Add Project API#121
andrii-bodnar merged 2 commits intocrowdin:mainfrom
RyanCarlisle:feat/tmApprovedSuggestionsOnly-create-project-API

Conversation

@RyanCarlisle
Copy link
Contributor

@RyanCarlisle RyanCarlisle commented Oct 28, 2025

Fixes #117

@codecov-commenter
Copy link

codecov-commenter commented Oct 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.21%. Comparing base (0198054) to head (34afbd7).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

// 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"`
Copy link
Member

Choose a reason for hiding this comment

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

The Project model should also have this property because it is included in the response.

@andrii-bodnar andrii-bodnar requested a review from Copilot October 29, 2025 07:24
Copy link

Copilot AI left a comment

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 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 TmApprovedSuggestionsOnly field to the ProjectsAddRequest struct
  • 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.

@RyanCarlisle
Copy link
Contributor Author

@andrii-bodnar changes pushed!

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.

@RyanCarlisle thank you!

@andrii-bodnar andrii-bodnar merged commit 07bc3a7 into crowdin:main Oct 29, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for tmApprovedSuggestionsOnly parameter in Create Project API

4 participants