If I want to show anonymous users a message including "You can _login_ or _create an account_ " with returnto support, what's the best way to do it?
Background:
All over MediaWiki we display messages to anonymous users with "_login_ or _create an account_" links in them. In most cases we want the user to easily get back to what they were doing, so Special:UserLogin supports returnto and returntoquery parameters which after login or signup make it display a link to go back to the page the user was on, or silently redirect back to it.
The display of login/signup links seems haphazard:
1) Many messages don't bother with returnto, and just have wiki links to the special page. E.g. anontalkpagetext has:
please [[Special:UserLogin/signup|create an account]] or [[Special:UserLogin|log in]] ...
2) Some messages try to handle returnto with complicated magic word processing, , e.g.