Closed thompsonsj closed 10 months ago
Add the ability to configure a collection to only translate documents through Crowdin that meet a condition based on the document data.
Includes:
tabbedUI
Add a checkbox field within your Payload CMS config such as:
checkbox
{ name: "translateWithCrowdin", type: "checkbox", }
In your config, dictate that Crowdin translation should only occur if this checkbox is checked.
collections: [ { slug: 'posts', condition: ({ doc }) => doc.translateWithCrowdin, }, ]
Crowdin logic is run in an afterChange hook. The doc parameter is what is passed to this condition.
afterChange
doc
Add the ability to configure a collection to only translate documents through Crowdin that meet a condition based on the document data.
Includes:
tabbedUI
fix for the Payload dev installation.Example
Add a
checkbox
field within your Payload CMS config such as:In your config, dictate that Crowdin translation should only occur if this checkbox is checked.
Crowdin logic is run in an
afterChange
hook. Thedoc
parameter is what is passed to this condition.