Feature summary (what you would like to be able to do and where):
Create a new magic word that says if a page is a redirect, or not. That could be {{#isredirect}} with {{ISREDIRECT}} set up as a template. Output could be as follows (but comment if you think there's a more appropriate way to do this):
- {{#isredirect}} and {{#isredirect:local}} output true or false in local language, e.g. vero for true and falso for false in Italian.
- {{#isredirect:canonical}} outputs true or false in English.
- {{#isredirect:boolean}} outputs 0 or 1.
These can take an additional argument:
- {{#isredirect|some page}} outputs the redirect status of [[some page]].
It should work not only with Wikitext redirects, but also Javascript redirects (which have different syntax), and Vue redirects (after T401158: Enable redirects for Vue components).
Benefits
This would be mainly useful in system messages, e.g. redirects say that they are "articles," when they are not articles, but redirects to articles.
This could be fixed with a switch in [[MediaWiki:nstab-main]].
It could also be useful in bot-generated reports.
I could be used as an IF function and a second magic word, {{#redirecttarget}} to pull that page's target. So, T404410: Create a new magic word that pulls a redirect's target page.
