[Tracker]
Update Summary: New issue, backported from https://www.drupal.org/project/ai_translate
Short Description: one-click link should show human name, not machine name
Check-in Date: 03/19/2026
Metadata is used by the AI Tracker. Docs and additional fields here.
[/Tracker]
Problem/Motivation
The AI module works off of providers. Each provider defines models with both human name, and "machine name." The machine name usually avoids spaces and other "special" characters.
The problem: the "one click" link on the translate page uses the machine name, not the human name. This can be hard to read, and leads to a bad Editor Experience (EX).

Steps to reproduce
- Configure multiple languages
- Enable the ai_translate module
- Enable at least one provider (with a long machine name)
- Create a node
- Click on the "Translate" tab
- Observe the machine name of the model (yikes)
Proposed resolution
Simple patch to ContentTranslationControllerOverride.php: switch this:
$parts1[1]
to this:
$parts1[0]
Maybe add a fallback in case the human name doesn't exist, isn't readable, &c.
Remaining tasks
Submit MR
User interface changes
One-click translate link: Change from ugly "machine name" to beautiful "human name"
API changes
None
Data model changes
None
Optional: Other details as applicable (e.g., User interface changes, API changes, Data model changes)
AI usage (if applicable)
[ ] AI Assisted Issue
This issue was generated with AI assistance, but was reviewed and refined by the creator.
[x] AI Assisted Code
This code was mainly generated by a human, with AI autocompleting or parts AI generated, but under full human supervision.
[ ] AI Generated Code
This code was mainly generated by an AI with human guidance, and reviewed, tested, and refined by a human.
[ ] Vibe Coded
This code was generated by an AI and has only been functionally tested.
Issue fork ai-3580328
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 #2
koppie commentedI've noticed that ai_translate was removed from the 2.x branch. Switching to 1.3.x, because it still needs adjustment there (as a backport).
Comment #5
koppie commentedComment #6
koppie commentedI've updated the patch in #3580314: one-click link should show human name, not machine name; need to update here as well (or just remove, per 2.x)
Comment #7
koppie commentedI experimented with different methods of fetching the "human readable" name out of the array, but ultimately it strikes me as a fool's errand. The underlying here is to make the link easy to read. In my opinion it is not necessary to display the specific model here, as it has already been selected and is not changeable here. It is sufficient to offer a one-click link that says "Translate with AI". That's what this patch does.
Comment #8
marcus_johansson commentedThere are currently PHPCS errors on the MR. See https://git.drupalcode.org/issue/ai-3580328/-/jobs/9003782