Wikipedia:Bots/Requests for approval/DASHBot 12
- 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: Tim1357 (talk · contribs)
Automatic or Manually assisted: Auto
Programming language(s): Python
Source code available: Not unless someone wants it
Function overview: Solve redirects on templates that use navbox.
Links to relevant discussions (where appropriate): MOS: Wikipedia:Redirect :* It is preferable to change redirected links in navigational templates, such as those found at the bottom of many articles (e.g. {{US Presidents}} at the end of George Washington). In this case, when the template is placed on an article, and contains a direct link to that article (not a redirect), the direct link will display in bold (and not as a link), making it easier to navigate through a series of articles using the template.
Edit period(s): Monthly
Estimated number of pages affected: On first run: 113302 replacements on 32619 pages.
Exclusion compliant (Y/N): Yes
Already has a bot flag (Y/N): Yes
Function details: Using a database query, find redirects in templates that transclude {{Navbox}}. Replace those redirects with their target. The bot will preserve the title of the link, so the name of the link will not change after the bot's edit.
The Query
|
---|
SELECT concat('Template:',main.page_title), link.page_title, rd_title
FROM page AS main
JOIN templatelinks on tl_namespace= 10 and tl_title = 'Navbox' and tl_from = main.page_id
JOIN pagelinks on pl_from = main.page_id
JOIN page as link on link.page_title = pl_title and link.page_namespace=pl_namespace
JOIN redirect on rd_from = link.page_id
WHERE
main.page_namespace = 10
AND
link.page_namespace = 0
GROUP BY main.page_title;
|
Discussion
editApproved for trial (30 edits). Please provide a link to the relevant contributions and/or diffs when the trial is complete. given the lack of objections. Josh Parris 09:56, 15 May 2010 (UTC)[reply]
I'd prefer to see a more explanatory edit summary than "Solving redirects in a Navbox"; perhaps "Use direct link so it will display in bold (and not as a link), making it easier to navigate through a series of articles". Josh Parris 10:58, 16 May 2010 (UTC)[reply]
- With regards to the edit summary, what about something along the lines of:
- Tim1357 talk 13:46, 16 May 2010 (UTC)[reply]
- I find that too brief; I'd like to see an edit summary that reassures me that the bot has done nothing interesting and that I need not inspect the edit. Perhaps "Bypass redirect in navigation template, making navigation through the series of articles clearer" Josh Parris 05:09, 17 May 2010 (UTC)[reply]
Having seen all the edits, are there any circumstances where changing the display text would be appropriate? I'm specifically thinking about en- to em-dashes (or vice versa), but there might be a general case that's applicable? Josh Parris 11:07, 16 May 2010 (UTC)[reply]
- I agree, there were some instances where the link name should have been changed. However, I do not think that'd be an appropriate job. I think it is not the bot's place to determine when it is OK to change the name. It is a job best left for humans. Tim1357 talk 13:41, 16 May 2010 (UTC)[reply]
- I agree; at the same time, I found the bypasses from one dash-version to another dash-version seemed on first inspection to have no effect; it was only after some head scratching that I figured out what had happened. If the redirect was marked {{R from modification}} I think you might have reason to change the text in the navbox - I'd personally find that less confusing, and presume others would. Josh Parris 05:09, 17 May 2010 (UTC)[reply]
- Well, if we are only looking at the en/em dash link thing:I could run the bot-safe general-fixes on the navboxes which I believe covers converting spaced hyphens to em-dashes. Tim1357 talk 10:51, 17 May 2010 (UTC)[reply]
- If you're willing to add that functionality, please go ahead. If you'd prefer not, I think I'm ready to run with this once everyone's happy with the edit sumary. Josh Parris 05:09, 17 May 2010 (UTC)[reply]
- Well, if we are only looking at the en/em dash link thing:I could run the bot-safe general-fixes on the navboxes which I believe covers converting spaced hyphens to em-dashes. Tim1357 talk 10:51, 17 May 2010 (UTC)[reply]
- I agree; at the same time, I found the bypasses from one dash-version to another dash-version seemed on first inspection to have no effect; it was only after some head scratching that I figured out what had happened. If the redirect was marked {{R from modification}} I think you might have reason to change the text in the navbox - I'd personally find that less confusing, and presume others would. Josh Parris 05:09, 17 May 2010 (UTC)[reply]
A user has requested the attention of the operator. Once the operator has seen this message and replied, please deactivate this tag. (user notified) Where are we at Tim1357? —Preceding unsigned comment added by Josh Parris (talk • contribs)
- I am pretty much ready to go, but I need to come up with a better edit summary. How about:
Bot: Bypassing redirects in navboxes in order to improve article navigability;details/shutoff
- Or:
Bypassing redirects in navboxes, in order to improve article navigability;details/shutoff
- Because redirects and navbox don't need links, but the reasoning for the bypass does. Josh Parris 04:01, 29 May 2010 (UTC)[reply]
- Sure, I like that one. Tim1357 talk 02:08, 31 May 2010 (UTC)[reply]
- Because redirects and navbox don't need links, but the reasoning for the bypass does. Josh Parris 04:01, 29 May 2010 (UTC)[reply]
Approved. Josh Parris 02:12, 31 May 2010 (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.