Problem/Motivation
On the media edit screen for an image, the button label always appears as “Generate with AI” even in a non-English UI where other strings are translated and caches have been rebuilt. This occurs across multiple projects.
Steps to reproduce
1. Install and enable the module on a multilingual site (non-English default or switch to a non-English interface language).
2. Navigate to /media/[id]/edit for an image media item.
3. Confirm the UI is translated except for the “Generate with AI” button.
Proposed resolution
I assume the string might not be translatable, if so, that might be a simple fix.
Remaining tasks
To be determined.
User interface changes
A translatable button-text
API changes
Not applicable
Data model changes
Not applicable
| Comment | File | Size | Author |
|---|---|---|---|
| Screenshot - Translation has been added.png | 250.24 KB | natuspella | |
| Screenshot - English button among a fully Dutch UI.png | 289.03 KB | natuspella |
Issue fork ai_image_alt_text-3556030
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
natuspella commentedProposed a fix in MR!18
- Wrapped button label in translation function.
- Added context for translation extraction.
Now ready for review
Comment #4
marcus_johansson commentedSee svendecabooter's comment.
Comment #5
natuspella commentedI fully agree, I removed the context.
Comment #6
anybodyThanks for the fix!