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 Approved.

Operator: Anomie

Time filed: 19:17, Friday August 26, 2011 (UTC)

Automatic or Manual: Automatic, unsupervised

Programming language(s): Perl

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

Function overview: Remove flag icons from infoboxes or other layout templates, where consensus exists that the template should not contain flag icons.

Links to relevant discussions (where appropriate): User talk:AnomieBOT/Archive 3#Flag icons in infoboxes, Template talk:Infobox company#Flag icons, Template talk:Infobox power station#Flag icons, WT:MOSFLAG#Flag icons in company and power station infoboxes, Template talk:Infobox World Heritage Site#Gradual improvements, Template talk:Infobox World Heritage Site#Flags and links, WP:MOSFLAG#Avoid flag icons in infoboxes

Edit period(s): Periodic

Estimated number of pages affected: There are currently 7248 articles transcluding both one of the target infoboxes and a flag template. Not all of these will actually be edited, for example Eolica Mihai Viteazu Wind Farm contains both an infobox and a flag template but the flag template is not in the infobox. If additional templates are added, that would increase the number of pages to be affected.

Exclusion compliant (Y/N): Yes

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

Function details: The bot will do the following:

  1. Get a list of articles that transclude both one of its target templates and any of the templates in Category:Flag templates or Category:Flag template system.
  2. Load the text of each article.
  3. Go through all the parameters of the target infoboxes in the text.
  4. Use action=expandtemplates to obtain the wikitext of any flag template invocations found, and replace the flag template invocation with this wikitext minus any flag icon images.

Discussion[edit]

Just to be 100% clear, this will not remove flag icons arbitrarily. It will only remove flag icons within the parameters of certain specific infoboxes or other layout templates. At the moment, the target templates are ((Infobox company)), ((Infobox power station)), and ((Infobox World Heritage Site)). If discussions show consensus for this same task to be done for more infoboxes or other layout templates, those may be added to the list.

What I am calling a "layout template" is a template that displays structured data, even if it isn't technically an infobox. For example, ((Video game table)) would be a layout template. I don't know if there are any that will want this treatment, but if one comes up it would be nice to be able to handle it.

There may be cases where consensus determines that WP:IAR applies to the general rule to not use flag icons in these templates. I'm open to suggestions on how to handle this; options I see are adding a comment such as <!-- keep flag per consensus --> next to the flag template (simple but difficult to search for); adding a dummy parameter to the flag template invocation, e.g. ((flag|US|consensus to keep=yes)) (somewhat cryptic, possible to search for if someone adds a tracking category to the template); or adding another template such as ((keep flag per consensus)) next to the flag template (a whole extra template, but easily tracked using Special:WhatLinksHere). Anomie 19:17, 26 August 2011 (UTC)[reply]

Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Discussions suggest consenus for this. Also, I prefer ((flag|US|consensus to keep=yes)) method. —  HELLKNOWZ  ▎TALK 14:01, 28 August 2011 (UTC)[reply]

Trial complete. [1] Also, a sandbox edit to test |consensus to keep=yes. Anomie 23:44, 28 August 2011 (UTC)[reply]
Edits seem good. Will leave open for a little longer to gather some feedback/input may be. —  HELLKNOWZ  ▎TALK 07:17, 29 August 2011 (UTC)[reply]
Looks good to me too, maybe the edit summary could be a bit shorter. --Elekhh (talk) 01:02, 4 September 2011 (UTC)[reply]
I'm open to suggestions, but do keep in mind this recent discussion. Anomie 01:32, 4 September 2011 (UTC)[reply]
I see, and agree it should stay as informative as is. I was thinking that maybe the the instructions for the exceptional IAR cases could be simply linked to (for instance to this page per Sven's suggestion), rather then repeating it in each edit summary. Is so much nicer when an edit summary fits into one line. It is a minor thing though which should not defer the implementation. --Elekhh (talk) 01:53, 4 September 2011 (UTC)[reply]
After some reflection, I've decided to take your suggestion. Except I'll create User:AnomieBOT/docs/FlagIconRemover instead of linking to fragmented discussions. Anomie 00:14, 12 September 2011 (UTC)[reply]

((BAGAssistanceNeeded)) It seems no one cared enough to comment on the removals. Shall we proceed? Anomie 00:14, 12 September 2011 (UTC)[reply]

 Approved. All appears to be in order, no further core task related comments were made after the trial. Trusted bot-op, task follows only consensus discussions. —  HELLKNOWZ  ▎TALK 08:07, 12 September 2011 (UTC)[reply]

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.