Install
Works with Drupal: ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Download tar.gz
21.15 KB
MD5: 61c12c52dc60c342832d4b13bfab55d3
SHA-1: 20e2ce78d5232aab1cb8ded9f048d6059bebc893
SHA-256: cfe385060e397babe974c325c4e4f10a08b6bba5c2458ceb0bc6492df95f0524
Download zip
31.37 KB
MD5: a466fe9c631265657246bced656d0aa6
SHA-1: 299134013e48f550143a4cf96b10e05f78e8df1d
SHA-256: 7915d9d469507be3ee4eae219dc4416bf8b6b1ab0512f78b3e93ca31fd6db637
Release notes
First stable release. It adds automatic handling of translations that come out longer than the field allows, more context for prompts, and support for AI Translate 1.4.4.
New features
- Shortening translations that are too long (#3575448). If a translation is longer than the field's
max_length, AI Translate Plus can now fix it automatically:- AI shortening: asks the model to shorten the text with a dedicated prompt. If the result is still too long, it is cut at a word boundary.
- Hard truncation: skips the extra AI call and cuts the text at a word boundary straight away.
- The settings are in a new "Length handling for max-length fields" section on the overview form. You can turn the feature on or off, pick the shortening prompt, and choose truncation only.
- A default prompt, Shorten translated text to max length, is included. It supports the
{maxLength},{destLangName}and{inputText}placeholders.
- More Twig context in prompts. Translation prompts can now use the entity being translated (as
entityand under its entity type ID, e.g.node), plusfield_nameandfield_settings.
Compatibility
- Requires
drupal/ai_translate^1.4.4. It's now a declared Composer dependency. The provider has been updated to match the newloadTranslator()signature, which fixes a fatal error with AI Translate 1.4.4. The model that AI Translate picks for each target language is now used, both for translating and for shortening. - Fixed a PHP 8.4 deprecation: an implicitly nullable
$entity_type_idparameter.