(mostly) convert to mediawiki.ui