On Fri, 2025-07-25 at 15:21 +0100, Andrew Sayers wrote: > # InterWiki links > > zeha mentioned InterWiki links, although they seem to require database work[1]. They can be configured from the Special:InterWiki page. Though it's disabled by default, so config will need to be updated to allow admins/bureaucrats to edit. > If you convert these to a template like {{InterWiki|DebianBug|12345}}, > the template can render them as interwiki links if we get that to work, > or failing that it can do the job with some moderately clever template logic. A lot of the InterWiki links can be turned into templates in order to control the text of the link, not only the URL. For example, I've quickly made a DebianIRC[7] template and have used it in [8] as an example. > ## DebianBug links > > https://wiki.debian.org/htdocs/bugstatus.js seems to handle [[DebianBug:]], > [[https://bugs.debian.org/]], and apparently launchpad as well. > The obvious MediaWiki equivalent is a gadget[2]. [...] The easiest way I found to do this (where this = adding a strikethrough to closed bugs) is to run a very small service[9] to check the BTS and render the necessary HTML, then add an InterWiki connection for that service with "scary transclusion"[10] enabled. I've tested it on my local MW instance and it works perfectly. MW also caches it, so it doesn't contact the server on every page load. This also opens up new opportunities for things like incorporating dynamic package data -- who knows? > # Emoticons > > There seems to be an emoticon extension[3], but I've never used it. > So we could hedge our bets with a template solution like {{Emoticon|:)}} > that just rendered the text unchanged, but could be updated to use logic > similar to {{InterWiki}} if we had to uninstall the extension in future. The extension seems fine to me. Putting actual emojis also should work fine. > # Macros [...] > The MediaWiki equivalent of <<TableOfContents([maxdepth])>> seems to be > <div class="toclevel-[maxdepth]">__TOC__</div>[4], but the MediaWiki > convention is to decide automatically whether pages get a TOC, and what > depth it should have. [...] I think letting MediaWiki handle TOCs by itself is fine. If a page really needs one or really doesn't need one, then we can explicitly add or remove it. > <<StatsChart(type)>> only seems to be used on some MoinMoin internal pages > (e.g. EventStats/UserAgents). It might be better just not to convert > those pages at all. I don't think this is needed. [...] > ## Debian Macros > > <<MessageId(foo-1234@example.com)>> / <<mid(foo-1234@example.com)>> > > These seem to be InterWiki links to https://lists.debian.org/msgid-search/<arg> Also should be okay as a template. > <<Debian{Codename,CodenameLink,Date,Version}(suite)>> > > For example, Template:DebianCodename might look something like: > > {{#switch: {{{1}}} > | testing = trixie > | stable = bookworm > | oldstable = bullseye > | default (error: no such codename) > }} Pretty much. > # HelpOnParsers > > I've only ever seen this used for highlighting ({{{#!highlight foo}}}), > where the equivalent is the SyntaxHighlight extension[5]. Personally, > I set `numbers=disable` in all pages I edit, because moin's line numbers > break copy/pasting. MediaWiki lacks that bug, so there's an argument > for removing (or at least manually reviewing) `numbers=disable` during > conversion. > > Rather than search for other parsers with the site search functionality, > could somebody do `grep {{{#! | sort -u` on the moin database? I've done that and all I've found other than highlight is {{{#!wiki This is for hints. > # HelpOnAdmonitions > > The MediaWiki equivalent is Template:Hint[6]. Importing these will probably > spiral into importing most or all of the MW templates, which will be a big > ugly job, but will make it easier for newbies to come here from Wikipedia. > I'd argue for grasping this nettle earlier rather than later. Not necessarily; the Hint template you've linked appears to be self- contained and we should be able to add it easily enough. Even for other ones that do import other templates, it's easy enough to reproduce it ourselves. Currently, we're waiting on the TemplateStyles extension to be installed. -- Maytham > [1] https://www.mediawiki.org/wiki/Manual:Interwiki > [2] https://www.mediawiki.org/wiki/Extension:Gadgets > [3] https://www.mediawiki.org/wiki/Extension:Emoticons > [4] https://www.mediawiki.org/wiki/Manual:Table_of_contents#Depth > [5] https://www.mediawiki.org/wiki/Extension:SyntaxHighlight > [6] https://www.mediawiki.org/wiki/Template:Hint [7] https://wiki2025.debian.org/wiki/Template:DebianIRC [8] https://wiki2025.debian.org/wiki/User:Maytha8 [9] https://salsa.debian.org/Maytha8/iwservice [10] https://www.mediawiki.org/wiki/Manual:$wgEnableScaryTranscluding
Attachment:
signature.asc
Description: This is a digitally signed message part