Templates for surname categories and articles[]
Let's talk about surnames. We have many pages involving surnames. I have an idea on how we can simplify what we already have.
In many of the surname categories, we have a whole bunch of information. Section headers for variants, orgin, meaning, external links, etc. Thing is, most of these are empty. Of course, we do want to expand and have a lot of history of surnames. And when we do the actual pages in the category gets pushed to the bottom of the page.
A solution brought up multiple times is to have an article separate from the category. Meaning, Smith contains information on the origin, meaning, variants, etc. of the surname, while Category:Smith Surname only lists the articles that are categorized with it.
Take a look at Help:Surname. Perhaps it could be more simple? How about just one method of surname page standardization? Which one? I have an idea for a new one I have been developing:
Template:SurnameArticle provides an infobox, which can link to variants of a surname, to Wikipedia's article on the surname, and, categorize the article with the Surname, and put it into the Category:Surname articles categories. This template is used on articles such as Smith. Use the template, fill in the infobox, and under the infobox goes all the background info, history, etc. On the very top of the article, a link to the surname's category. Example: Ferguson
Template:SurnameCategory is used on surname categories and provides a link to the article describing the surname (see above paragraph) and a brief sentence telling the readers what the page is about. Just a link, brief description and all the categorized subcategories and articles. Example: Category:Ferguson Surname
If we use this method, we can simplify the Help:Surname article, because having one method that uses the solution mentioned in paragraph 2 and being able to link both pages will be a lot simpler. -AMK152(talk • contribs) 03:24, 28 July 2008 (UTC)
- I'm pleased you have been convinced that we want separate articles so as not to push subcategories and articles out of sight on the surname category pages. I agree with the overall proposal 100%. I couldn't see how "Template:SurnameArticle is used on surname categories" if it's also used on the article page; study of the Ferguson example shows that you meant a new Template:SurnameCategory; in my opinion not as good as the standard Template:Catmore, particularly because yours invites readers to see something "here" when in fact they have to look on another page. Robin Patterson 04:44, 28 July 2008 (UTC)
- Your last paragraph is a bit short on logic. We can simplify Help:Surname by cutting out two of the three currently offered options; nothing to do with "If we use this method". Rewriting the remaining option so that it refers to the article instead of the category may simplify the help page further but I doubt if it will unless we put all the explanatory bits under the template or on its talk page or "/doc" subpage. Robin Patterson 04:44, 28 July 2008 (UTC)
Before we go too far - we cannot have just the plain name[]
Okay, just realized something. We can't just use Smith anymore. We should use Smith (surname) and be consistent with all the other surnames.
I realized this when I thought of my great-great-great-great-grandmother, Sarah England (1814-1897). Her surname "England" page would be at England, but England is the name of a country. Same goes for George Washington and other surnames that come from place names or just are place names. Or even people whose last name is May, which is also a month. So, what we should do is this:
England (surname) - about the surname
Then have some sort of disambiguation system for stuff like this.
For surnames that don't have a disambiguation to it, the article with the surname only can be redirected to the surname article.
Example: Smith redirects to Smith (surname) until "Smith" becomes a disambiguation for other things.
Unless someone thinks we don't need to do this, I'm going to start to transfer the templates and articles to the new format. -AMK152(talk • contribs) 03:12, 30 July 2008 (UTC)
- On the whole, I agree that the plain name would not be good. Too many exceptions or conflicts, as you say: England, Spain, Washington, London, March, May, Adam, and so on. But why bother with parentheses? England surname, Washington surname, May surname, Adam surname, etc. Will require us to abandon some of the use of PAGENAME but you can handle the coding there! ... Robin Patterson 03:40, 30 July 2008 (UTC)
- They will need the links from their categories changed eventually, but the automatically created redirects will do for now. Robin Patterson 05:08, 30 July 2008 (UTC)
I think use of (surname) looks better than just surname. (Smith (surname)/Smith surname) Wikipedia uses this too. (Wikipedia:Smith (surname)). ..... I have adjusted Template:SurnameArticle and added the needed additions to the template on the pages. -AMK152(talk • contribs) 14:16, 30 July 2008 (UTC)
- A bit slow on the change of mind there! But it is indeed the WP way where WP uses anything, so it's OK with me. You can fix the pages I've already changed to " surname". Robin Patterson 15:16, 30 July 2008 (UTC)
- Are we going to use the method on categories too? (Category:Smith (surname)) I think we should. You only mentineed it briefly in the edit summary. If so, I can start transferring them. -AMK152(talk • contribs) 22:38, 30 July 2008 (UTC)
Renaming the categories?[]
(Extracting some sentences from the above section)
I would like (and have for a couple of years wanted) to give the category names "surname" instead of "Surname" too. Your bot could do that; that would simplify the coding of the link in {{SurnameCategory}}. Robin Patterson 03:40, 30 July 2008 (UTC)
- I have been thinking of a transfer to lowercase "surname" instead of using "Surname" for category names for quite a while (why hasn't that been brought up before? or has it?). Anyway, I will try to figure out how to make the bot do that. One method would be to change categories for all 2,300+ categories individually. I'm not sure if there is another way, but I will look into it. ..... -AMK152(talk • contribs) 03:52, 30 July 2008 (UTC)
There is, of course, more to changing the surname category names than I said. Each old one would need to become a category redirect, and we would need to do thousands of category redirect fixes for the articles in those categories. That goes back to what's now the first proposal left on User talk:AMK152Bot. Robin Patterson 05:08, 30 July 2008 (UTC)
- I can get the bot to move pages to a new category, but I don't know how to do the category redirects. ..... -AMK152(talk • contribs) 14:16, 30 July 2008 (UTC)
Now what do you mean by "how to do the category redirects"? Robin Patterson 15:16, 30 July 2008 (UTC)
- I don't know how to use a bot to change the content of the category to {{category redirect|new cat name}} since "new cat name" is different for all the surnames. Unless can think of soem clever way to use the replace.py script, since that's what looks liek Phlox used when the YEAR births categories were changed. -AMK152(talk • contribs) 19:45, 30 July 2008 (UTC)
How the bot might do the whole job[]
I'm not sure precisely what the bot can do, but this looks like a way that should be possible:
- Find page with name in form "Category: Zxcv whatever Surname" that does not contain "category redirect"; refer to it as "Oldcat"; delete from it [[Category:Surnames]] and/or [[category:Surnames]] and/or [[category:surnames]] and/or [[Category:surnames]].
- Create (unless it already exists) new category page with the same name as Oldcat except changing Surname to (surname); refer to it as "Newcat".
- Move, from Oldcat to Newcat, any remaining category link. (Most will have had just Category:Surnames, but some have extras such as Category:Surnames of Poland.)
- Add, to top of Newcat, Template:SurnameCategory. (Ensuring that that template still includes Category:Surnames; I suggest renaming the template Template:SurnameCat or even Template:SCat because nearly every contributor will later be using it and some cannot spell "category".)
- Follow link in Newcat to article ("[[{{PAGENAME}}]]") (and create page if not existing); refer to it as "Art".
- Move all remaining content from Oldcat to the top of Art and add Template:SurnameArticle (which must include "[[Category:{{PAGENAME}}]]") above that. (People can then manually delete empty headings etc while moving items into Template:SurnameArticle.)
- Add to Oldcat "{{category redirect|}}" with the PAGENAME of Newcat following the pipe.
- Return to instruction #1 (only about 2300 times; better than if we waited a few years!)
- When no more Oldcats to be worked on, search every page of the database (including Template:Surname and Template:Categories) for a category link that contains "Surname]]" and change that to "(surname)]]".
I think that's all, but I composed it in outline while trying to get to sleep so there may be the odd omission. Any flaws apparent? Now can the bot do it?
Try a couple of Oldcats so that several of us can look at the results. Then if OK please give us all 24 hours' notice so that I can switch off my relevant Preference so as not to get hundreds of unwanted emails for changes to pages on my watchlist.
Robin Patterson 00:52, 31 July 2008 (UTC)
- Okay, I'm going to try this out with Category:Wilson Surname as a test. -AMK152(talk • contribs) 02:53, 31 July 2008 (UTC)
- I got as far as step three. There's not any script that I know of that can add a template to the top of the article or to transfer certain content from a category page to an article page and add a template. The next section I will present the best way I figure this can be done. -AMK152(talk • contribs) 03:11, 31 July 2008 (UTC)
Process[]
- 1. Adjust all templates so that they categorize articles usign the (surname) format. There are a few templates out there, so this isn't that hard to do.
- 2. Move all categories. (Category:SURNAME Surname to Category:SURNAME (surname). All exact text will be moved.
- 3. Remove the Category:Surnames fro mthe retired categories.
- 4. The bot gives a choice to delete the category. If not, we would have to manually create category redirects for the retired categories.
- 5. Use the SCat template on the new categories.
- 6. Move text on surname categories to its surname article.
- -AMK152(talk • contribs) 03:30, 31 July 2008 (UTC)
- I can get this going at any time. Just tell me when you are ready so you don't get hundreds or thousands of unwanted emails due to rapid changes. -AMK152(talk • contribs) 13:26, 31 July 2008 (UTC)
Queries on 6 steps and what's left[]
Please reply below each one. Robin Patterson 00:55, 1 August 2008 (UTC)
step 1[]
Please list them for reference.
step 2[]
What do you mean by "All exact text will be moved"? Surely a move involves all text, including category links?
- All the text and articles categorized in Category:XXXXX Surname will be moved to Category:XXXXX (surname). -AMK152(talk • contribs) 02:27, 1 August 2008 (UTC)
- Allowing for a word correction from "moved" to "copied" (as noted below), what is "text and articles categorized in Category:XXXXX Surname"? Does that mean all the editable text of that category will be copied to the new category? Then what articles are we talking about? What will happen to them? Robin Patterson 03:49, 1 August 2008 (UTC)
That's definitely progress. That takes care of my step 9 (and what I said below might be your step 7). So we have every Newcat looking just as the Oldcat did, while the Oldcat has unchanged text and parent categories but no subcategories or articles "in it". Just waiting for another run (or part of the same run) that will delete all the editable text, replacing it with that invariable message telling readers the cat has gone and telling them how to find where (without giving them a link, because that would require a different instruction for each cat). We could do all of that now, I think. That can be step 3 for each cat, though you may be able to do it in the same pass for every one. Robin Patterson 14:43, 1 August 2008 (UTC)
step 3[]
In view of step 2, how will "Category:Surnames" be still there?
The information is not copied and removed; it is just copied. Thus, the text needs to be removed and replaced with the category redirect template.OK, step 2 and your reply on it should have said "copied", not "moved". Steady progress, I suppose. Robin Patterson 03:49, 1 August 2008 (UTC)
If the second part of step 2 removes all text from every Oldcat, there's nothing more to delete.
step 4[]
Instead of manually creating 2300 category redirects, how about asking the bot to add to each page a note about the move (inviting people to change "Surname" to "%28surname%29" in the address bar)?
- Would a category redirect be easier? Just click on it. I don't know how to add text to a page.
- You said earlier that the bot could not add a category redirect because the part after the pipe is different for each page. I believed that. Now what are you saying might be easier and could be just clicked on? Robin Patterson 03:49, 1 August 2008 (UTC)
- I cannot get the bot to add {{category redirect|surname (surname)}} to the OldCat. You suggested adding a note to the page to tell the reader to change the address in the address bar (I think). The category redirect template will provide a link to the new category. But the cat redirects have to be done manually. -AMK152(talk • contribs) 04:25, 1 August 2008 (UTC)
- That's why I suggested a note, not a category redirect. There will be so few people finding the Oldcats (possibly by following a link we had not tracked down) that we don't need to spend loads of time on them. Just give them all the same notice as outlined above. Robin Patterson 14:43, 1 August 2008 (UTC)
- I cannot get the bot to add {{category redirect|surname (surname)}} to the OldCat. You suggested adding a note to the page to tell the reader to change the address in the address bar (I think). The category redirect template will provide a link to the new category. But the cat redirects have to be done manually. -AMK152(talk • contribs) 04:25, 1 August 2008 (UTC)
- You said earlier that the bot could not add a category redirect because the part after the pipe is different for each page. I believed that. Now what are you saying might be easier and could be just clicked on? Robin Patterson 03:49, 1 August 2008 (UTC)
step 5[]
What does "Use...template on ... categories" mean? Can the bot add text to a page?
- Put {{SCat|}} on the new category pages. -AMK152(talk • contribs) 02:27, 1 August 2008 (UTC)
- You have said "There's not any script that I know of that can add a template to the top of the article" and "I don't know how to add text to a page." - so how can I understand "Put {{SCat|}} on the new category pages"? Robin Patterson 03:49, 1 August 2008 (UTC)
- Oops, I meant manually put the template on the category page. -AMK152(talk • contribs) 04:25, 1 August 2008 (UTC)
- Surely if a bot can delete all text from a page it can add an invariable bit of text to a page? Phlox could not add all those 3100+ identical navboxes to county pages by hand. But hold fire, because we don't want to do this till the text has been moved to the articles. See step 6. Robin Patterson 14:43, 1 August 2008 (UTC)
- Oops, I meant manually put the template on the category page. -AMK152(talk • contribs) 04:25, 1 August 2008 (UTC)
- You have said "There's not any script that I know of that can add a template to the top of the article" and "I don't know how to add text to a page." - so how can I understand "Put {{SCat|}} on the new category pages"? Robin Patterson 03:49, 1 August 2008 (UTC)
step 6[]
"Move text" - how much? can you move less than everything? (Remember what you did on step 5.)
- Copy and paste the text that should be on the article page (Smith (surname)) -AMK152(talk • contribs) 02:27, 1 August 2008 (UTC)
- Yes, well, clearly you can't move less than everything. If we have put template:SCat on the page, it will go too. So do this before that. But your step 6 doesn't actually create surname articles. So create them before you try to move anything to them. Ummmm - there is a problem. The only obvious way to create the articles is to add Template:SCat then follow the link it creates. Maybe there is a variation on the "category move" process that lets the bot create an article with the same PAGENAME as a category? Robin Patterson 14:43, 1 August 2008 (UTC)
- I'm off to bed very soon. How about putting together (below this) your revised procedure and trying it on another Oldcat? Robin Patterson 14:57, 1 August 2008 (UTC)
What's left?[]
Plenty: 2300 uncategorised new surname articles and 10,000+ person articles that are still in their old categories not accessible via Category:Surnames. My procedure dealt with them.
I suggest that you try the process with one more surname category so that we can see exactly what it did. Robin Patterson 00:55, 1 August 2008 (UTC)
- The person articles will be recategorized via a bot. -AMK152(talk • contribs) 02:27, 1 August 2008 (UTC)
- That's what I presumed. My step 9. Your step 7, I suppose, when you rewrite. I see that you have done a few. Robin Patterson 03:49, 1 August 2008 (UTC)
More study?[]
I was wondering when you would wake up! (What timezone are you in?) But it's now past my bedtime so I'll have to chew this over after some sleep. Are you certain that the bot can move categories? (I'm practically certain that PhloxBot was able to insert text, so could you ask around to check?) Robin Patterson 15:35, 31 July 2008 (UTC)
- Eastern Standard/Daylight Time. The category.py script moves categories:
C:\pywikipedia>category.py move
Then asks for old cat and new cat, then it moves it. -AMK152(talk • contribs) 15:50, 31 July 2008 (UTC)
Revised process/Possible other solution[]
- 1. Adjust all templates to use the NewCat format.
- 2. Program bot to move all articles from OldCat to NewCat. The bot will also copy text from OldCat to NewCat. What we are left with is all people articles have been recategorized with the new categories and Category:SURNAME Surname (OldCat) and Category:SURNAME (surname) (NewCat) will have the exact same text.
- 3A. You said: "There will be so few people finding the Oldcats (possibly by following a link we had not tracked down) that we don't need to spend loads of time on them." Instead of creating a category redirect, delete OldCat since everything has been duplicated to NewCat. A bot can find any sign left of the OldCats. It is much easier to monitor red link categories than to check if OldCat is empty. Special:Wantedcategories lists all redlinked categories. We can also notify people who incorrectly use OldCat and direct them to the new format.
- OK, good logic, delete OldCats. We can put warning notices in several places telling people what has happened. Robin Patterson 00:26, 2 August 2008 (UTC)
- 3B. Bot puts Template:SCat at the top of every NewCat (as the easiest way to create the articles?). Robin Patterson 00:26, 2 August 2008 (UTC)
- 3C. Bot creates articles and gives each one the expanded and annotated form of Template:SurnameArticle ready for folks to fill in. Robin Patterson 00:26, 2 August 2008 (UTC)
- 4. Manually move all text that should be on an article page, to the article page and use the {{SCat|}} template on the NewCat pages. -AMK152(talk • contribs) 15:28, 1 August 2008 (UTC)
- Result: Use of new format, and all background info/roots/variants/history of each surname on its own page and OldCats no longer exist. -AMK152(talk • contribs) 15:28, 1 August 2008 (UTC)
- I don't like that "manually" bit. Surely there's an easier way to move most of the contents of 2300 pages. No hurry, though - having all that old stuff on the NewCat is no worse than having it on the OldCat (and we have the new streamlined way of linking from NewCat to article and we can think about how to move the text). So - give bot a trial on one OldCat up to the revised step 3C and we'll talk if there's a problem. Robin Patterson 00:26, 2 August 2008 (UTC)
- I figured out a way to make the bot put the SCat template. It's quite complex, but it will work. I tested it with the the Abel surname:
As all these categories contain Category:Surnames, the bot is going to take the followign procedures:
PROCESS 1: Replace all [[Category:Surnames]] with {{SCat|{{subst:PAGENAME}}}}
EXAMPLE 1: [[Category:Surnames]] changes to {{SCat|Smith (surname)}}
PROCESS 2: Replace all (surname)}} with }}
EXAMPLE 2: {{SCat|Smith (surname)}} changes to {{SCat|Smith}}
All we gotta do manually is transfer text to article page. -AMK152(talk • contribs) 02:35, 2 August 2008 (UTC)
- Seems unnecessarily complex and it leaves contributors having to paste the surname in (which was going to be unnecessary once we got the cats and the articles having the same PAGENAME). See Template:CatS. Robin Patterson 05:17, 2 August 2008 (UTC)
Final word on deletion of OldCats[]
We can put a warning message on the main page warning people there is a major change for the surname categories. Have them linked to this discussion. Then proceed to fully execute the process. -AMK152(talk • contribs) 15:56, 2 August 2008 (UTC)
- I've changed MediaWiki:Sitenotice to do that in a more obvious way - if every skin shows the sitenotice. Who is and who is not seeing a big notice at the top of every page? Robin Patterson 06:37, 3 August 2008 (UTC)
- Regrettably, there's no sign of it on the default skin, to which I have now switched. We should be working on that, I suppose. Robin Patterson 00:58, 13 August 2008 (UTC)
- No, that was just me, having turned the message off and not done enough to re-view it. The message does appear if one (even someone with my cache history) is not logged in. Robin Patterson 00:19, 14 August 2008 (UTC)
- Now, how about that "fully execute the process" - are we seeing the bot "moving" all the OldCats? That should happen fast; adding Template:SCat (and deleting OldCats, or giving them a note about how to find the new ones) can come later, at leisure, if it can't be easily done in the same pass. And has the bot checked that every template anybody could use to create an OldCat has been changed? Robin Patterson 00:19, 14 August 2008 (UTC)
Category:Unknown Surname[]
This category is for use for people whose surname is unknown. As it is not a surname, it should not change to Category:Unknown (surname). I think it should be at Category:Unknown surname. -AMK152(talk • contribs) 13:29, 31 July 2008 (UTC)
- Excellent. Robin Patterson 14:42, 31 July 2008 (UTC)
Bot with AWB[]
I just found out that the bot works with AWB and I have been adding {{SCat}} to the new surname categories.
Two other bot runs can do similar things. It will add
{{SurnameArticle | Surname = {{subst:PAGENAME}} | Image = | Origin = | Meaning = | Variant1 = | Variant2 = | Variant3 = | Variant4 = | Variant5 = }} {{surname-stub}}
to the uncreated surname articles. A second bot run will take out the " (surname) that will result on the template part from the page name. -AMK152Bot 02:30, 7 August 2008 (UTC)
- That looks very positive, although I would prefer to see the annotated version of template:SurnameArticle because most users will want it or will make work for others by messing up if the guidance is not there. Robin Patterson 00:58, 13 August 2008 (UTC)
Status[]
- Templates have been adjusted.
- The proposal was then to do this: "Program bot to move all articles from OldCat to NewCat. The bot will also copy text from OldCat to NewCat. What we are left with is all people articles have been recategorized with the new categories and Category:SURNAME Surname (OldCat) and Category:SURNAME (surname) (NewCat) will have the exact same text". But instead the new categories started life blank (which should require some change to the instructions that were revised under Help:Surname and possibly elsewhere, and has the disadvantage that the OldCats will hang around until manually adjusted and may get people editing them without realising they should not). Robin Patterson 12:02, 18 August 2008 (UTC)
- {{SCat}} has been add to all new surname categories.
- All the existing (few) person articles' surname categories have been updated to the new categories.
- Currently I am manually creating the surname article pages and transferring information from the old categories to their article page. Assistance from others would probably be welcome!?
-AMK152(talk • contribs) 02:16, 14 August 2008 (UTC)
- Great work! Robin Patterson 09:13, 14 August 2008 (UTC)
Further progress: the OldCats are now in a separate category under Wikia maintenance. A few of them somehow managed to stay in Category:Surnames too, but they can be weeded out as we come across them. Robin Patterson 12:02, 18 August 2008 (UTC)