voorhoede / datocms-plugin-translate-fields

A DatoCMS plugin that gives you the ability to translate structured-text, string and text fields in DatoCMS
https://www.datocms.com/marketplace/plugins/i/datocms-plugin-translate-fields
ISC License
8 stars 12 forks source link

Translate blocks inside a StructuredText field #17

Closed christophemenager closed 1 year ago

christophemenager commented 1 year ago

First many thanks for the work on this plugin, it works really well for many cases and is I think, the most well developed of the marketplace for translations 🙏

How to reproduce?

  1. Create a block with a StructuredText field
  2. Create a model with an other StructudedText field that authorize to add the previous StructuredText block in its content
  3. Create a record of this model and try to translate it

Result

Only the "top" StructuredText" is translated, the block is not

image image
velomovies commented 1 year ago

Hi @christophemenager, Thanks for using the pugin! Awesome you like it so much.

This is indeed a problem we have with all blocks inside a structured text field. Currently we only check on text blocks directly inside a structured text field and not for other blocks inside the field. Structured text is a difficult one with a lot of exceptions and a complicated data structure. Blocks can have, for example, all sorts of names and data. So we need to think of a way to distinguish normal text fields with for example linked images, modelId's or json fields.

This is a feature we want to add in the future, but feel free to open a PR.

I hope this answers you question. This unfortunately doesn't solve your problem, but I hope you understand why it's not working at the moment.

velomovies commented 1 year ago

As of version 1.6.0 the structured text field should be translatable.

christophemenager commented 1 year ago

Thanks a lot @velomovies!