Jump to content

Template talk:Interlanguage link

Page contents not supported in other languages.
Tandikawo emboozi endala
Bisangiddwa ku Wikipedia
Latest comment: 9 days ago by SyntaxTerror in topic Replacing the hard links to enwiki with a bot
[kolera mu edit source]

Hello

The links to other languages disguised as internal links like :[[:en:2021 Ugandan general election|kulonda kwa bonna mu Uganda okwa 2021]] can now be replaced with {{ill|kulonda kwa bonna mu Uganda okwa 2021|en|2021 Ugandan general election}}.

But there is probably a problem, as 'kulonda kwa bonna mu Uganda okwa 2021' seems to translate to 'the 2021 general elections in Uganda', but the correct name for the article in Luanda should be 2021 Akalulu ka Uganda ? (I really don't know, I translated with Google)

Anyway, there is a problem, because the template should be {{ill|2021 Akalulu ka Uganda|lt=kulonda kwa bonna mu Uganda okwa 2021|en|2021 Ugandan general election}}.

The first parameter is the name of the linked article, lt (= link text) is the text displayed, a bit like in [[2021 Akalulu ka Uganda|kulonda kwa bonna mu Uganda okwa 2021]].

In short, if I don't know the name of the article that will be created, I cannot make these replacements.

The only ones that can be fully automated without risk are when the article name on lgwiki is the same (mostly people, e.g. [[:fr:Amini Cishugi|Amini Cishugi]] that will become {{ill|Amini Cishugi|fr}} => Amini Cishugi [fr]). [EDIT: even these links can be problematic, see below ]

Elsewhere, the replacement can be semi-automated with AWB and this regex (test on regex101):

  • Find : \[\[\s*:\s*en\s*:\s*([^|]+)\b\s*\|\s*([^\]]+)\b\s*\]\]
  • Replace: {{ill|$2|en|$1}}

But every replacement has to be checked by someone that speaks Luganda to avoid mistakes. If the link is not the good one, it has to be manually modified in AWB edit box.

The thing is it has to be done as soon as possible (we have thousands of these links on frwiki, and they are a real problem).

  • There are 3,043 articles that have at least one 'fake' internal link (an 69 'non-main' pages ).
  • There are only 8 articles with links to other languages (I couldn't search all codes with insource, but I searched the codes of the 20 Wikipedias with the most articles, and the top 20 African language Wikipedias : (ceb|de|fr|nl|ru|es|it|sv|pl|war|vi|ar|pt|uk|zh|fa|ja|ca|fi|af|sw|ha|yo|ig|am|so|zu|wo|ti|sn|om|ln|rw|lg|ff|ak|tn|st|xh)).
  • I'll look in a Wikipedia dump the number of articles that can be modified automatically, it is not possible with insource search.

Best regards, SyntaxTerror (talk) 17:46, 9 Gwakutaano(Muzigo) 2026 (UTC)Reply

There are 1,613 articles with links that can be edited automatically [EDIT: see next answer ] (but it doesn't mean they have only this kind of link, there will probably still be 3000 articles to edit in semi-auto after).
  • Here's an example of what AWB can do :
    Three links have been replaced, and as they exist on lgwiki, now they link to the Luganda articles instead of the English ones.
    The only issue is that Uganda is a redirect, so it still has the little link to enwiki : Uganda [en] (this is to avoid circular redirects, see Template:Interlanguage link#Circular redirects, I'm not sure though, the frwiki template works differently).
    But when a bot will replace the template with regular links, it will disappear and become Uganda.
  • Another example : . This time, Universal Church of the Kingdom of God [en] is still red.
SyntaxTerror (talk) 19:10, 9 Gwakutaano(Muzigo) 2026 (UTC)Reply
After examining the links, none can be edited automatically, as there is always a little chance that [[:en:LINK]] is not speaking of the same thing as [[:lg:LINK]] (for example for people, if en:John Doe is a page about a John Doe on enwiki, but another one with the same name on lgwiki).
This can happen with people, but also with en:acronyms, and many other things we haven't thought about yet.
All edits have therefore to be done semi-automatically, with each link checked to avoid linking to the wrong articles. Şÿℵדαχ₮ɘɼɾ๏ʁ 20:11, 1 Gwamusanvu(Kasambula) 2026 (UTC)Reply