Wikipedia:Bots/Requests for approval/AnomieBOT 37


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Symbol keep vote.svg Approved.

AnomieBOT 37
Operator: Anomie⚔

Automatic or Manually assisted: Automatic, unsupervised

Programming language(s): Perl

Source code available: User:AnomieBOT/source/tasks/SafesubstFixer.pm

Function overview: Replace in templates with safesubst:, and related edits.

Links to relevant discussions (where appropriate): Wikipedia talk:Template messages/User talk namespace

Edit period(s): As needed

Estimated number of pages affected: Up to ~600 for the first run

Exclusion compliant (Y/N): Yes

Already has a bot flag (Y/N): Yes

Function details: Until recently, the only way to make a template work both when substed and when not substed while also not cluttering the substed output with parser functions (e.g. #if, #switch) was to require a parameter "subst=subst:" be specified when substing. Now we have safesubst: which can be used for the same purpose, and without requiring the oft-forgotten "subst" parameter.

Upon request, the bot will go through a well-defined list of templates and replace parameter uses with the new safesubst: or  keyword. It may also insert the new keyword into parser functions lacking any substitution and/or into specifically-named template invocations, as requested.

Discussion
The first run will be for the user warning templates (i.e. Special:PrefixIndex/Template:Uw-). I'm making a generic request in case anyone comes up with another well-defined set of templates that need the same treatment. Anomie⚔ 16:54, 20 April 2010 (UTC)

&mdash; The Earwig   (talk)  19:13, 25 April 2010 (UTC)
 * Anomie⚔ 20:20, 25 April 2010 (UTC)
 * What's the reason for the  at the bottom of  and ? &mdash;  The Earwig   (talk)  22:54, 26 April 2010 (UTC)
 * Hmm, I didn't consider that Mediawiki doesn't support nested includeonlys (and I missed seeing it looking at the diffs). This should fix it. Anomie⚔ 01:33, 27 April 2010 (UTC)
 * FWIW, I would recommend using " " instead of " safesubst: " next time: It's shorter, and has no issue with nested includeonly tags. Amalthea  16:10, 3 May 2010 (UTC)
 * How interesting that that works. Although it does have an issue if someone manages to type " ". Anomie⚔ 23:29, 3 May 2010 (UTC)
 * I got it from meta:Help:Safesubst, but it's really just the same mechanics the old subst=subst: thing used. And FWIW, someone at meta considers it a feature that one can opt for one-level substitution by using, cryptic as it may be. :) I just use it because it's significantly shorter, and makes for clearer code.  Amalthea  23:42, 3 May 2010 (UTC)
 * Note though that this is only a suggestion and basically a matter of taste, and should not delay approval. In fact, seeing that MC10 had already manually made that change to a number of templates, which due to a misunderstanding led to some unnecessary reverts (WP:Administrators' noticeboard/Incidents), I urge that this job be approved so that it can be wrapped up cleanly. :) Amalthea  11:24, 4 May 2010 (UTC)

BAG assistance needed

Will the bot operate per the Function details, or per the Discussion? Josh Parris 14:20, 4 May 2010 (UTC)
 * I can do it either way, I have no preference which. As far as the uw template edits, I'll probably finish them with the includeonly style for consistency with the 50 already done. Anomie⚔ 23:16, 4 May 2010 (UTC)

Josh Parris 04:42, 5 May 2010 (UTC)
 * The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.