Wikipedia:Bots/Requests for approval/BattyBot 31
- 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: GoingBatty (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 23:25, Friday June 20, 2014 (UTC)
Automatic, Supervised, or Manual: Automatic
Programming language(s): AutoWikiBrowser
Source code available: For two character templates, I plan to use the following find/replace rules:
- Find:
{{(\s*[Cc]it(?:e|ation))([^}]+)(\s*\|\s*language\s*=\s*){{(\w{2})\s?(?:icon)?}}(\s*[\|}<])
- Replace:
{{$1$2$3$4$5
For three character templates, a different substitution will be used.
Function overview: Remove language icon templates from citation templates
Links to relevant discussions (where appropriate): User talk:Dispenser/Reflinks#Issue with language parameter and Help talk:Citation Style 1/Archive 5#Icon templates in language
Edit period(s): One time run per template (presuming Reflinks is the only way these icons are being incorrectly added and that Reflinks goes away when the Toolserver is retired at the end of the month)
Estimated number of pages affected: hundreds
Exclusion compliant (Yes/No): Yes
Already has a bot flag (Yes/No): Yes
Function details: Remove language icon templates from citation templates. For two character templates such as {{sv icon}}, make a change such as:
- Before:
{{cite web|url=http://www.google.com|title=Hej världen|language=sv}}
generates "With template" (in Swedish). - After:
{{cite web|url=http://www.google.com|title=Hej världen|language=sv}}
generates "Without template" (in Swedish).
For maximum effectiveness, I plan to run BattyBot 24 and AWB general fixes at the same time. GoingBatty (talk) 23:25, 20 June 2014 (UTC)[reply]
Discussion
[edit]GoingBatty can you please make a database scan so that we know the exact number of pages affected? -- Magioladitis (talk) 11:04, 22 June 2014 (UTC)[reply]
- @Magioladitis: I have never done a database scan. Last time I tried to download the database I was unsuccessful. Before I invest time in trying again, could you please help me understand why you are asking me to provide this information? Thanks! GoingBatty (talk) 13:29, 22 June 2014 (UTC)[reply]
- GoingBatty how else are you going to construct the list of pages to fix? -- Magioladitis (talk) 14:10, 22 June 2014 (UTC)[reply]
- @Magioladitis: I plan to make the list by using Source: "What transcludes page" and What embeds: "Template:sv icon", then run with Skip if no find and replacement checked, and repeat for each icon template. GoingBatty (talk) 14:41, 22 June 2014 (UTC)[reply]
- @GoingBatty: any way to produce the list will do. -- Magioladitis (talk) 14:52, 22 June 2014 (UTC)[reply]
- @Magioladitis: I plan to make the list by using Source: "What transcludes page" and What embeds: "Template:sv icon", then run with Skip if no find and replacement checked, and repeat for each icon template. GoingBatty (talk) 14:41, 22 June 2014 (UTC)[reply]
- GoingBatty how else are you going to construct the list of pages to fix? -- Magioladitis (talk) 14:10, 22 June 2014 (UTC)[reply]
Approved for trial (50 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Magioladitis (talk) 15:05, 22 June 2014 (UTC)[reply]
This is related to Wikipedia_talk:AutoWikiBrowser/Feature_requests#Remove_language_icon_templates_from_citations too. -- Magioladitis (talk) 19:44, 22 June 2014 (UTC)[reply]
- @Magioladitis: Trial complete. - see diffs. GoingBatty (talk) 22:55, 22 June 2014 (UTC)[reply]
GoingBatty I added it as built-in AWB feature in rev 10262. Please do another 50 edits with this version so that we check there is no bug in it. Thanks, Magioladitis (talk) 07:30, 23 June 2014 (UTC)[reply]
- @Magioladitis: Trial complete. with AWB SVN 10268 - see diffs. Note that I still used the find and replace rule (tweaked above based on analysis of previously missed pages) to ensure that pages would be skipped if there were no language fixes. GoingBatty (talk) 03:52, 25 June 2014 (UTC)[reply]
- @GoingBatty: Please provide me the new regex so I can modify, if necessary, the AWB code. I would like not only to have your bot running but to ensure that AWB causes no bugs after the new addition. -- Magioladitis (talk) 11:21, 25 June 2014 (UTC)[reply]
Approved. Magioladitis (talk) 11:22, 25 June 2014 (UTC)[reply]
- @Magioladitis: Thank you for the approval. Is there something else that needs to be done here? (e.g. {{Bot Top}} & {{Bot Bottom}}) GoingBatty (talk) 20:24, 25 June 2014 (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.