Because the "Add link" control is never shown, even when the text caret is in an editable area, there is currently no way to add a link to the translation except by selecting text and clicking on a source link.
|Open||None||T76456 Language Engineering tracker of trackers (tracking)|
|Open||None||T76449 [Epic] ContentTranslation - Translation view|
|Open||None||T76455 [Epic] ContentTranslation - Link Adaptation|
|Resolved||Amire80||T85931 It is not possible to add a link to the translation without selecting text and clicking on the source link|
I just tried the following:
- Type "Bratislava" in the translation.
- Select the text "Bratislava" in the translation.
- Observe that a link card with an "add link" action appears.
- Click on "add link"
- Observe that Bratislava turns into a link.
This seems a way to add a link without interacting with any source link.
Please, can you provide more details on the issue so that I can understand what is not working (examples and steps to reproduce would help)?
You can add a link by selecting text and using the link card as you noted. The issue I was trying to describe is when the text caret is in an editable area in the translation column but no text is selected and you click on a source link.
We need clarification on what should happen then. The options seems to be:
- Do nothing. Do not show the target link card.
- Show the target link card with "Add link" (if the link can be adapted)
In the second case, clicking on "Add link" would insert a new link at the caret position using the adapted title as the link text.
Steps to reproduce:
- Click on a placeholder to add a section to the translation column.
- Put the text caret somewhere in the translation section; not in link or template; do not select any text.
- Click on a source link
- Note add link control is not shown.
Should it be?
So if I have caret link like this "BBC ra|dio" and I click on a link in source column with title "BBC Radio", should we make the "radio" a link or "BBC Radio" as a whole as a link? We cannot decide it automatically right? That is what I meant, there is not enough context to create a link if you just place the caret somewhere.
This is disruptive too, users will have caret somewherer in editable area in translation section. If user want to click a source link and inspect what it is with the help of link cards, we are introducing an unexpected side effect, a link is inserted with some text in the caret position.
Curious - This bug was created based on the bugs you fixed inside the redlinks patch. Did you actually implement a fix for this in redlinks patch? If so how?
The point is to insert a link that uses the adapted title as the link text at the caret position; not to make the surrounding text a link. So in your example above, it would insert a link with the text "BBC Radio" wherever the text caret is. This would only be done by clicking "Add link." There would be no automatic link creation when clicking on a source link.
I did implement a fix for this in red links. Wasn't that hard given the above.
I think this can help translations for languages we don't support MT. But this also requires to do a good job on keeping the caret in place (or technically restoring it) when the user clicks on a source link (currently it seems to work when clicking on the source text but not when clicking on elements from the tools column). That is, when I see link cards shown as a result of clicking a source link, I should view where the caret is so that I expect where a new link is inserted if I click on "add link".
First, if there were text selected we should use that as a text (which I know is not the current case, but we need to make sue we don't interfere with that)
For the current case (no text selection in the translation):
- When there is no MT we can use the article title in the target language.
- When there is MT we can use an MT translation of the text (since it may have more context especifc info ("lemons" pointing to Lemon article). But it would not be a big problem if it just adds the target article title in that case. So we can start with that if it simplifies things.
I've looked into what implementing this would require. I think it wouldn't require more than a one day's worth of effort with minimal to moderate changes to the code. If we want to include in sprint 82, I can probably take it. However, it might be considered more of a new feature than a bug so I am also fine if we want to postpone in order to address higher priority issues.
I just tried it and to the best of my understanding, it is resolved.
If there is a corresponding link, the clicking "Add link" adds text with the title of the corresponding article. This is correct and sensible.
Please reopen if I misunderstood anything.