In Content Translation, when a link present in the source article cannot be aded to the translation because the corresponding article does not exist in the target wiki, it is marked as unadapted (in grey) and users have the option to mark it as missing (in red) as described in T193233.
The link target of a red link points to an article that does not exist in the target wikipedia. Determining such target is not easy. For example, a link that reads as "lemons" in the source article (English) points to the "Lemon" article, in the translation to German the expected result (assuming the article does not exist in German) would be to have a red link with the text "zitronen" that points to the missing "Zitrone" article.
The current approach is to use the title of the source article ("Lemon" in the example) for the link target of the red link. That will result in a red link labelled as "zitronen" (if MT is used) that points to "Lemon" in German Wikipedia. This is problematic since its encouraging the creation of an article titled in a different language than the one used in the wiki, and can collide with other existing articles (e.g., "Lemon" in German Wikipedia is a disambiguation page that links to articles of people with such surname).
The proposed solution consists in the following approaches that should be attempted in order until one is successful:
- If there is label for the Wikidata item in the target language and use it as the link target for the red link. For example [[ https://www.wikidata.org/wiki/Q500 | Q500 ]] shows that the "Lemon" has a "Zitron" label for German, but even for wikis where the article does not exist such as Wolof Wikipedia it still has the "limoŋ" label in Wolof which would very likely be the article title to use there (better than just "Lemon").
- If machine translation is available for the language pair and applied to the paragraph, a translation of the source article name will be used for the target. In the example we'll take "Lemon" (not "lemons") and send it to Yandex to hopefully get "Zitrone".
- If there is no machine translation available (i.e., "copy from source" approach is used), the target of the red link will be kept in the target. In the example, the "lemons" link will be transferred to German as "lemons" pointing to the non-existing "Lemon" page. In this case the user will have to correct both the label and link target.
**What if there is already another page with the selected title?**
We use Wikidata to find which is the corresponding articles across languages. As illustrated above, it is possible that "Lemon" in English is equivalent to "Zitron" in German but there is still an unrelated "Lemon" article in German. If we decide that the right target for the red link in German is "Lemon", it won't be possible to create such red link because the article is not missing.
In the case that an article already exists for the intended target, the result of clicking "mark as missing" won't be creating a red link directly. Instead, the insert link box will be opened with the intended text as search term. In this way the user can modified (e.g., making it "Lemon (fruit)" instead) to create the appropriate red link. The expected result is shown below:
{F22407453, size=full}