Page MenuHomePhabricator

TUX misinterprets translation variable inside a wikilink
Open, LowPublic

Description

The wikitext

[[<tvar|highlightslink>Special:MyLanguage/Wikimedia Highlights</>|highlights]]

renders correctly on-wiki here, but in the translation editor it shows up as this broken link:

<a href="/wiki/$highlightslink" title="">highlights</a>

Event Timeline

Tbayer raised the priority of this task from to Needs Triage.
Tbayer updated the task description. (Show Details)
Tbayer subscribed.
Nikerabbit changed the task status from Open to Stalled.May 18 2015, 12:44 PM
Nikerabbit subscribed.

The editor just shows prettified version of the wikitext, not part from actual page. Why do you think this should be changed?

The editor shows the broken link https://meta.wikimedia.org/wiki/$highlightslink , which (e.g. when right-clicking it and opening it in another tab, to check that the link didn't get damaged in translation) will lead to a "This page doesn't currently exist" message. Isn't it obvious that working links shouldn't be shown as broken in the editor?

It's also inconsistent with the behavior for external links, see e.g. "[$bloglink Wikimedia blog]" in the same translation unit.

So would you prefer the first link to show up as [[$highlightslink|noticias destacadas]] in the editor?

Making the links point to their correct targets is nontrivial but I understand your point.

Nikerabbit changed the task status from Stalled to Open.May 23 2015, 1:34 PM
Nikerabbit moved this task from Backlog to tux on the MediaWiki-extensions-Translate board.

Yes, I think that would be a viable solution. (Generating the correct link would be great, but the main point is to avoid showing a broken link to the translator that won't exist on the actual page as shown to the reader.)

What's more, there is a parallel bug (which might be worth filing separately, although the cause is likely the same) affecting edit summaries. See e.g.
this edit, corresponding to the creation of this translation unit in the target language.

The first link in the translated source code is:

[[$participantslink|Aproximadamente cuarenta Wikipedistas]]

(with $participantslink defined as "WikiArabia2015/Participants" in the English version).

In the translated page, this is correctly rendered as:

[[WikiArabia2015/Participants|Aproximadamente cuarenta Wikipedistas]]

but in the two edit summaries, the text "Aproximadamente cuarenta Wikipedistas" links to the nonexisting page
https://meta.wikimedia.org/w/index.php?title=$participantslink&action=edit&redlink=1 .