Wikipedia:Bots/Requests for approval/DannyS712 bot 17
- 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: DannyS712 (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 07:13, Tuesday, March 19, 2019 (UTC)
Automatic, Supervised, or Manual: automatic
Programming language(s): AWB
Source code available: AWB
Function overview: Replace {{Expand language}} with the more appropriate language-specific template
Links to relevant discussions (where appropriate): Template talk:Expand language#Bot run,
Edit period(s): One time run, then as needed
Estimated number of pages affected: 54494 ~3000 ~1000 at first
Exclusion compliant (Yes/No): No
Already has a bot flag (Yes/No): Yes
Function details: Based on the |langcode=
parameter of the template, replace the template with that language's specific template, if it exists.
Discussion
[edit]Actually only three thousand pages ( Special:Search/insource:"Expand language" ) - each language specific template calls {{Expand language}} so it gets counted as a transclusion there too. Galobtter (pingó mió) 16:47, 19 March 2019 (UTC)[reply]
- @Galobtter: oh, that makes a lot of sense. I have changed the estimated number of pages accordingly. Thanks, --DannyS712 (talk) 16:52, 19 March 2019 (UTC)[reply]
- {{BAGAssistanceNeeded}} --DannyS712 (talk) 23:47, 27 March 2019 (UTC)[reply]
- @DannyS712: Could you please provide an example of an edit that this task would make? --TheSandDoctor Talk 20:54, 29 March 2019 (UTC)[reply]
- {{BAGAssistanceNeeded}} --DannyS712 (talk) 23:47, 27 March 2019 (UTC)[reply]
Approved for trial (25 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Thank you for the example, DannyS712. Let's start at 25 and go from there. --TheSandDoctor Talk 21:07, 29 March 2019 (UTC)[reply]
- @TheSandDoctor: is it okay if I use javascript instead of AWB. I realized that I probably need a dictionary for all of the language codes. Thanks, --DannyS712 (talk) 21:24, 29 March 2019 (UTC)[reply]
- @DannyS712: Not a problem, go ahead. All I ask is that you update the description accordingly. --TheSandDoctor Talk 21:25, 29 March 2019 (UTC)[reply]
- @TheSandDoctor: Okay. Once I figure out what I want to use, I will (I just found Help:Magic words#Other, which includes a language function). Thanks, --DannyS712 (talk) 21:26, 29 March 2019 (UTC)[reply]
- Actually its only ~1000 pages (I checked every page that transcluded the template for the string
{{expand language
since some of the search results didn't have the template. --DannyS712 (talk) 01:35, 30 March 2019 (UTC)[reply]
- @DannyS712: Not a problem, go ahead. All I ask is that you update the description accordingly. --TheSandDoctor Talk 21:25, 29 March 2019 (UTC)[reply]
- @TheSandDoctor: Trial complete. [1]. I ended up using AWB, and its just a find and replace regex: find
{{expand language(.*)\|langcode=(.*?)\|(.*?)}}
and replace it with{{expand {{subst:#language:$2|en}}$1|$3}}
. I ran it without genfixes enabled, but if I am already editing the page should I apply genfixes? --DannyS712 (talk) 01:58, 30 March 2019 (UTC)[reply]
- @DannyS712: don't add genfixes for this 'automatic' job. Also, as this doesn't really change the output of the page I'm a bit hesitant to approve it, though it does appear to assist in future maintenance and the volume isn't very high so it's not too concerning. Please use the "minor" tag in addition to the bot tag on this run. — xaosflux Talk 13:55, 2 April 2019 (UTC)[reply]
- Approved. Task approved. — xaosflux Talk 13:56, 2 April 2019 (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.