Wikipedia:Bots/Requests for approval/DannyS712 bot 17

DannyS712 bot 17

[[User:DannyS712 bot|DannyS712 bot 17]]

{{Newbot|DannyS712 bot|17}}

Operator: {{botop|DannyS712}}

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 {{tl|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=

Actually only three thousand pages ( Special:Search/insource:"Expand language" ) - each language specific template calls {{t|Expand language}} so it gets counted as a transclusion there too. Galobtter (pingó mió) 16:47, 19 March 2019 (UTC)

:{{ping|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)

::{{tl|BAGAssistanceNeeded}} --DannyS712 (talk) 23:47, 27 March 2019 (UTC)

:::{{re|DannyS712}} Could you please provide an example of an edit that this task would make? --TheSandDoctor Talk 20:54, 29 March 2019 (UTC)

::::{{ping|TheSandDoctor}} Special:Diff/890068700 --DannyS712 (talk) 20:58, 29 March 2019 (UTC)

{{BotTrial|edits=25}} Thank you for the example, {{u|DannyS712}}. Let's start at 25 and go from there. --TheSandDoctor Talk 21:07, 29 March 2019 (UTC)

:{{ping|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)

::{{re|DannyS712}} Not a problem, go ahead. All I ask is that you update the description accordingly. --TheSandDoctor Talk 21:25, 29 March 2019 (UTC)

:::{{ping|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)

:::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)

:{{ping|TheSandDoctor}} {{BotTrialComplete}} [https://en.wikipedia.org/w/index.php?limit=1000&title=Special%3AContributions&contribs=user&target=DannyS712+bot&namespace=0&tagfilter=AWB&hideMinor=1&start=2019-03-30&end=2019-03-30]. 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)

  • {{ping|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)

:{{BotApproved}} Task approved. — xaosflux Talk 13:56, 2 April 2019 (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.