Problem/Motivation
The module builds sentences around the translated type label, such as "Describe the @what", "Generate @what" and "How to add the @what". AiMediaGeneration::noun() lower-cases the label and inserts it. A translator cannot get gender, articles or case right. In French, "Describe the @what" becomes "Décrivez le @what", which reads "Décrivez le image" for the feminine "image" and is only right for "SVG".
Steps to reproduce
- Add French.
- Translate "Describe the @what" as "Décrivez le @what" and "Generate @what" as "Générer @what".
- Open
/fr/media/add/image?ai_media=1. The field reads "Décrivez le image" and the button reads "Générer image".
Proposed resolution
Each generator declares its own whole t() strings: "Generate image", "Describe the image", "How to add the image", "Generating image...". The SVG, Audio and Video generators declare theirs too, and so do the "not offered" and "not set up" messages.
Remaining tasks
- ✅ File an issue
- ❌ Addition/Change/Update/Fix
- ❌ Testing to ensure no regression
- ➖ Automated unit/functional testing coverage
- ➖ Developer Documentation support
- ➖ User Guide Documentation support
- ➖ UX/UI designer responsibilities
- ➖ Accessibility and Readability
- ❌ Reviewed by a human
- ❌ Code review by maintainers
- ❌ Full testing and approval
- ❌ Credit contributors
- ❌ Review with the product owner
- ✅ Update Release Notes
- ✅ Release
User interface changes
- Before (1.0.x): "Décrivez le image", the article cannot follow the noun. Varbase Starter, Gin, French, Image and SVG pages.

- After: "Décrivez l'image" and "Générer une image" as whole French strings. Varbase Starter, Gin, French, Image and SVG pages.

API changes
- N/A
Data model changes
- N/A
Release notes snippet
- N/A
AI-Generated: Yes
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | K60-real-vs1-gin-fr-after.png | 29.27 KB | rajab natshah |
| #4 | K60-real-vs1-gin-fr-before.png | 29.3 KB | rajab natshah |
| #3 | 3634875-after.png | 60.33 KB | rajab natshah |
| #3 | 3634875-before.png | 61.9 KB | rajab natshah |
Issue fork ai_media-3634875
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
rajab natshahComment #4
rajab natshahComment #6
rajab natshah✅ Released ai_media-1.0.0-rc1