- Issue created by @marcus_johansson
- Merge request !143Trim translated text to fit the destination field's length. → (Merged) created by unqunq
- 🇬🇧United Kingdom unqunq
I've added a fix which pulls each field's config to find out if there is a limit of characters set and then truncate the response to fit in.
Other improvements can be done with the AI prompting to ask for a character limit on the response amongst other things but for now I believe this should fix the error.
- 🇧🇬Bulgaria valthebald Sofia
Tested and works for text fields attached to entity being translated and referenced entities
- 🇬🇧United Kingdom scott_euser
For a follow-up should we have it immediately make a tiny follow-up attempt. Like
"The following text between the ____ seperator is longer than the character limit of ___:
-------
Text here
-------
- Keep the same tone of voice
- Keep the same meaning
- Ensure the text is maximum ___ characters
- Respond only with the shortened text without any additional words or niceties"Then if that still fails, then fall back to truncate from this MR? Can be part of the translate settings form as a default.
Just thinking manh users might miss truncated text particularly in a language they are not comfortable with. So doing this action under cover may easily go unnoticed and not get fixed.
- 🇬🇧United Kingdom unqunq
Or maybe display a message when the trimming happens so at least the user knows that the result might not be complete? Or both?
- 🇩🇪Germany marcus_johansson
I started the merge train, but saw that you still had discussions. Will this be changed as part of this MR or a follow up issue?
- 🇬🇧United Kingdom scott_euser
Follow-up created here 📌 Update translation cropping Active
- 🇩🇪Germany marcus_johansson
Then we merged with 1.0.x-dev and will be in the next release. Thanks @unqunq and Scott and @valthebald for reviewing.
Automatically closed - issue fixed for 2 weeks with no activity.