Page MenuHomePhabricator

Talk page general fixes incorrectly converts {{WPB}} to {{WikiProjectBanners}}
Closed, ResolvedPublic

Description

Talk page general fixes incorrectly converts {{WPB}} to {{WikiProjectBanners}}. Instead, it should convert the template to {{WikiProject banner shell}}
(e.g. [[Talk:Double Nickels on the Dime]], [[Talk:The Wild, the Innocent & the E Street Shuffle]])

Event Timeline

{{(WikiProjectBanners|WikiProject[ _]+Banners|WPB|WPBS|Wikiprojectbannershell|WikiProject[ _]+Banner[ _]+Shell|WPBannerShell|WP[ _]+Banner[ _]+Shell|Banner[ _]?shell|WikiProject[ _]+Banners[ _]+Shell|WikiProjectBanner[ _]+Shell|WikiProject[ _]+BannerShell)}} should all convert to {{WikiProject banner shell}}

Looks to me like all of the "BannerRedirects" here are actually "BannerShellRedirects"

https://en.wikipedia.org/w/index.php?title=Template:WikiProject%20Banners&redirect=no
https://en.wikipedia.org/w/index.php?title=Template:WikiProjectBanners&redirect=no
https://en.wikipedia.org/w/index.php?title=Template:WPB&redirect=no
https://en.wikipedia.org/w/index.php?title=Template:Wpb&redirect=no

Confirmed via https://en.wikipedia.org/w/index.php?title=Special%3AWhatLinksHere&target=Template%3AWikiProjectBanners&namespace=10

private static readonly List<string> BannerShellRedirects = new List<string>(new[] { "WPBS", "Wpbs", "WP banner shell", "WP Banner Shell", "WPBannerShell", "WikiProject Banner Shell", "Wikiprojectbannershell", "Bannershell", "Shell" });
private static readonly List<string> BannerRedirects = new List<string>(new[] { "WikiProject Banners", "WikiProjectBanners", "WPB", "Wpb" });
// rename redirects
articletext = BannerShellRedirects.Aggregate(articletext,
    (current, redirect) => Tools.RenameTemplate(current, redirect, "WikiProject banner shell", false));

articletext = BannerRedirects.Aggregate(articletext,
    (current, redirect) => Tools.RenameTemplate(current, redirect, "WikiProjectBanners", false));

https://en.wikipedia.org/w/index.php?title=Special%3AWhatLinksHere&target=Template%3AWikiProject+banner+shell&namespace=10

And never mind Template:WikiProjectBanners redirects to Template:WikiProject banner shell too

Fixed in rev 12453