Wikipedia:Bots/Requests for approval/Monkbot 6
- 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: Trappist the monk (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 10:17, Thursday October 9, 2014 (UTC)
Automatic, Supervised, or Manual: automatic
Programming language(s): AutoWikiBrowser
Source code available: yes (source)
Function overview: Replace |title=
in CS1 citations with new parameter |script-title=
when adjacent {{xx icon}}
and |title=
language are in agreement; add |language=
parameter and delete {{xx icon}}
template.
Links to relevant discussions (where appropriate):
Edit period(s): periodically
Estimated number of pages affected: As of 2014-10-05 the subset of categories in Category:Articles with non-English-language external links that will be examined contained approximately 251,000 pages.
Exclusion compliant (Yes/No): yes
Already has a bot flag (Yes/No): yes
Function details: Here is a link to the full description.
Discussion
[edit]GoingBatty what do you think about this task? -- Magioladitis (talk) 22:49, 19 October 2014 (UTC)[reply]
- @Magioladitis: No objections - it just took me a while to realize that the function overview above is describing two different tasks. (i.e.
|language=
could be added in citations where|script-title=
is not appropriate). GoingBatty (talk) 00:11, 20 October 2014 (UTC)[reply] - @Magioladitis and Trappist the monk: Would there be any benefit to having the icon template replacements done in WP:AWB/TR instead of this custom module? GoingBatty (talk) 00:13, 20 October 2014 (UTC)[reply]
- None so far as task 6 is concerned because Monkbot never does general fixes. For the icon templates it cares about, task 6 will adjust those redirects to get them into the proper format.
- —Trappist the monk (talk) 00:36, 20 October 2014 (UTC)[reply]
- @Magioladitis: Is WP:AWB/TR part of general fixes? (i.e. Does unclicking the Apply general fixes stop WP:AWB/TR from running? GoingBatty (talk) 18:40, 20 October 2014 (UTC)[reply]
- @Trappist the monk: If I understand your request properly, this bot task would also clear the maintenance Category:CS1 maint: English language specified, correct? GoingBatty (talk) 18:40, 20 October 2014 (UTC)[reply]
- Task 6 would go some way toward clearing that category but accomplishing that is not defined as one of the task 6 functions.
{{BAG assistance needed}}
—Trappist the monk (talk) 13:26, 27 October 2014 (UTC)[reply]
- @Trappist the monk: If I'm not wrong: Your module has some minor problems. If you run your module against articles that doesn't contain {{Cite}} but contains {{fi}} then it will change [fi is just an example] {{fi}} to {{fi icon}} which is totally unnecessary (This type of edits doesn't help the encyclopedia). What will you do to stop changing {{fi}} to {{fi icon}} when there is no {{Cite}}? Thanks! Jim Carter 10:08, 28 October 2014 (UTC)[reply]
- The module is subsidiary to an AWB settings file which now includes a rule to skip the page if the page does not contain Module:Citation/CS1-supported templates.
- —Trappist the monk (talk) 10:55, 28 October 2014 (UTC)[reply]
- @Trappist the monk: Can you add the AWB settings file source code here? It will help us better understand the task before we procced. Thanks! Jim Carter 15:41, 28 October 2014 (UTC)[reply]
- Done.
- @Trappist the monk: Can you add the AWB settings file source code here? It will help us better understand the task before we procced. Thanks! Jim Carter 15:41, 28 October 2014 (UTC)[reply]
- —Trappist the monk (talk) 10:55, 28 October 2014 (UTC)[reply]
- —Trappist the monk (talk) 16:03, 28 October 2014 (UTC)[reply]
- Thanks Trappist the monk. I found another minor issue. If I'm not wrong, the module changes [for example]:
{{Cite book|language=xx|title=aaaabbbb cccc|author=Example|publisher=Example production company|location=San Diego|date=18 March 1997|isbn=8888888888}}
to{{Cite book|title=aaaabbbb cccc|author=Example|publisher=Example production company|location=San Diego|date=18 March 1997|isbn=8888888888|language=xx}}
This change is totally unnecessary. I randomly searched and found 10 out of 100 such cases. How will you skip such changes? Thanks! Jim Carter 04:56, 30 October 2014 (UTC)[reply]
- Thanks Trappist the monk. I found another minor issue. If I'm not wrong, the module changes [for example]:
- —Trappist the monk (talk) 16:03, 28 October 2014 (UTC)[reply]
- Are you using an older version of the script?
- Where
|language=
precedes|title=
, task 6 moves|language=
to the end of the CS1 template so that duplicate rules for each of the specific languages is not required. When|language=
positioning is all that is done to a page, then the page is skipped. When other changes are made –{{xx icon}}
replaced with|language=
,|title=
replaced with|script-title=
– then all of the moved|language=
parameters will remain at their new positions.
- Where
|language=
and nothing else? I haven't found anything in your settings or module that can skip pages if only positioning of |language=
is to be done. Jim Carter 11:53, 30 October 2014 (UTC)[reply]
- I thought I answered that when I wrote:
When
Does that not answer your question?|language=
positioning is all that is done to a page, then the page is skipped.
- —Trappist the monk (talk) 12:14, 30 October 2014 (UTC)[reply]
- @Trappist the monk: Sorry if I'm messing everything but I want to know the Skip system. How will AWB determine if there is only positioning change and the page should be skipped? for example "skip if contain X" "skip if no changes where made" etc. How will the skip process work? Jim Carter 14:03, 30 October 2014 (UTC)[reply]
Refer to the module: At the top of the module is this (line 3):
Skip = true;
That tells awb to skip the page. The rule for moving |language=
does not change the Skip
value (line 334):
ArticleText = Regex.Replace(ArticleText, @"(\{\{\s*" + IS_CS1 + @"[^\}]+)(\|\s*language\s*=\s*[^\|\}]*)([^\}]*)(\|\s*title\s*=[^\}]*)(\}\})", "$1$3$4$2$5");
Compare that to this portion of a rule that makes more substantive changes (line 345):
if (Regex.Match (ArticleText, pattern).Success)
{
ArticleText = Regex.Replace(ArticleText, pattern, "$1script-title=$5:$2$3|language=$5$4");
Skip = false;
}
Skip = false;
Skip
will still have it's initial value and the page will be skipped.
—Trappist the monk (talk) 14:33, 30 October 2014 (UTC)[reply]
- Support - seems useful.--BabbaQ (talk) 14:22, 31 October 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) 18:50, 31 October 2014 (UTC)[reply]
Trial complete.
For source lists I chose 10 What transcludes page: Template:xx icon where xx is ar, zh, el, he, ja, ko, fa, ru, th, uk. For each of these I loaded a new list and let the script run for 5 edits. At the end I should have completed 50 edits. I got 51. Apparently, awb did not count the edit to Married and maiden names yet there it is in Special:Contributions/Monkbot. That page is not listed in awb's successfully saved log. Is this a bug in awb? I don't see how it can be a bug in Monkbot task 6.
AWB successfully saved log
|
---|
|
—Trappist the monk (talk) 22:44, 31 October 2014 (UTC)[reply]
- Seem to work and the trial was a success. --BabbaQ (talk) 00:10, 1 November 2014 (UTC)[reply]
((BAG assistance needed)) —Trappist the monk (talk) 11:28, 9 November 2014 (UTC)[reply]
Approved. -- Magioladitis (talk) 00:43, 12 November 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.