Bugfix for bug #3546620 * Disambigpages.linkedPages() doesn't raise pywikibot.NoPage error,   so we check it with Page.exists() first. * lowercase key is needed vor mediawiki_messages since we call it via allmessages query and not the magicwords siteinfo query * Normalize templates with first letter uppercase * Add the default template "disambig" for the default (i.e. non-existant) mediawiki message only.   If MediaWiki:Disambiguationspage exist, take the templates without changing its set. * Site.templates() does not return a list of titles but page links.   Either we have to create a page link while retrieving the template via MediaWiki message   or we use the page.title(withNamespace=False). I took the last one.
Bugfix for bug #3546620
* Disambigpages.linkedPages() doesn't raise pywikibot.NoPage error,
  so we check it with Page.exists() first.
* lowercase key is needed vor mediawiki_messages since we call it via allmessages query and not the magicwords siteinfo query
* Normalize templates with first letter uppercase
* Add the default template "disambig" for the default (i.e. non-existant) mediawiki message only.
  If MediaWiki:Disambiguationspage exist, take the templates without changing its set.
* Site.templates() does not return a list of titles but page links.
  Either we have to create a page link while retrieving the template via MediaWiki message
  or we use the page.title(withNamespace=False). I took the last one.

TODO: we have to check whether MediaWiki message has the right unicode format to compare with template link titles - sorry for that.

pywikibot/core-migration-example