User:AnomieBOT/docs/AccidentalLangLinkFixer

In discussions, users sometimes forget the colon when trying to link to a category or a page on another language Wikipedia. This causes the discussion page to be placed in an unintended category or to have incorrect interlanguage links displayed in the sidebar. For pages where this is a common occurrence, AnomieBOT can be asked to automagically add that necessary colon by placing the page in the hidden category Category:Pages automatically checked for incorrect links.

How it works edit

AnomieBOT records the current list of categories and interlanguage links on the page. It then periodically loads the list of categories and language links from the API. If either does not match the saved list, AnomieBOT edits the page to add a colon to any category or interlanguage link that seems accidental.

"Accidental" is quite simply defined: Any interlanguage link or category link that is on a line by itself (as is the usual practice) is assumed to be intended, while all others are assumed to be accidental.

Example edit

Consider this wikitext:

What is your favorite category? [[User:Example|Example]] ([[User talk:Example|talk]]) 22:42, 11 September 2010 (UTC)
: I really like [[Category:Featured articles]], and [[de:Kategorie:Wikipedia:Exzellent]]. [[User:Example2|Example]] ([[User talk:Example2|talk]]) 22:49, 11 September 2010 (UTC)

[[Category:Wikipedia noticeboards|{{PAGENAME}}]]
[[Category:Non-talk pages that are automatically signed]]
[[Category:Pages automatically checked for incorrect links]]

[[es:Wikipedia:Café/Portal/Archivo/Miscelánea/Actual]]
[[ru:Википедия:Форум/Общий]]

Example2 has accidentally placed the page into Category:Featured articles, and created an interlanguage link to de:Kategorie:Wikipedia:Exzellent! AnomieBOT would come along and make the following edit:

What is your favorite category? [[User:Example|Example]] ([[User talk:Example|talk]]) 22:42, 11 September 2010 (UTC)
: I really like [[:Category:Featured articles]], and [[:de:Kategorie:Wikipedia:Exzellent]]. [[User:Example2|Example]] ([[User talk:Example2|talk]]) 22:49, 11 September 2010 (UTC)

[[Category:Wikipedia noticeboards|{{PAGENAME}}]]
[[Category:Non-talk pages that are automatically signed]]
[[Category:Pages automatically checked for incorrect links]]

[[es:Wikipedia:Café/Portal/Archivo/Miscelánea/Actual]]
[[ru:Википедия:Форум/Общий]]

Note how the bot did not touch the legitimate category and interwiki links at the bottom of the page, only the ones inside Example2's comment.

What to do if AnomieBOT adds a colon where it shouldn't? edit

If the category or language link is not on a line by itself, move it! If for some reason that is not possible, you can also insert a comment just after the opening "[[", for example [[<!-- ok -->Category:Example]].

If the bot is making a real error, please post a message to User:AnomieBOT/shutoff/AccidentalLangLinkFixer to stop the bot and post a message to User talk:AnomieBOT to let Anomie know about the problem.

What to do if AnomieBOT won't add a colon where it should? edit

Try the following:

  1. Make sure the page really is in Category:Pages automatically checked for incorrect links.
  2. Make sure {{nobots}} or {{bots}} is not present on the page.
  3. Make sure the category or interlanguage link is not somehow by itself on the line.
  4. If all else fails, ask for help at User talk:AnomieBOT.

How can I stop this bot from editing my comments? edit

Stop forgetting to insert the colon yourself.