* Clean up Surname Capitalisation

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
avatar
ColinMc
Superstar
Posts: 458
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Clean up Surname Capitalisation

Post by ColinMc »

The "Clean up Surname Capitalisation" plugin says
Process all Surnames, tidying the capitalisation for Surnames recorded in the file in ALL CAPS. Special Cases for Mac,Mc,de’ and O’ have been included more can be added in the capitalise function, also allows over-ride at runtime by prompting the converted surnames for confirmation
On running it I see three dialog boxes appear in order as below. As there is no help provided here or on the plugin store, I'm not sure if it is checking all records as it suggests.
Clean.jpg
Clean.jpg (37.69 KiB) Viewed 1553 times
If it does "Process all Surnames" what is the point of box 1? If I type in a name either in upper or lower case that is already in my database, is it not already being checked by the "All Surnames" check?

I'm not sure if this is the "Capitalise Function" for me to add a new special cases or something else. Box 2 appears to let me confirm each surname individually, so does make sense, but would benefit from adding the word "individually" or similar if that is the case, because even if I want all converted automatically, I still want to confirm with a yes! So yes is a valid answer for both possibilities.

But I'm really puzzled when I get to box 3, does this mean it has checked the one surname I typed in, or all surnames? I have no idea what has been checked.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families
User avatar
Mark1834
Megastar
Posts: 2458
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Clean up Surname Capitalisation

Post by Mark1834 »

I get exactly the same. I’ve had a quick look at the code, and it appears to indicate that there are no names that need updating. It checks every Individual, not just the latest addition.

Clearer feedback might be useful, but Jane will probably comment later...
Mark Draper
User avatar
tatewise
Megastar
Posts: 28341
Joined: 25 May 2010 11:00
Family Historian: V7
Location: Torbay, Devon, UK
Contact:

Re: Clean up Surname Capitalisation

Post by tatewise »

It says in the Plugin Store and in the Plugins window description box for this plugin that it:
"tidies the capitalisation for Surnames recorded in the file in ALL CAPS."
i.e. As shown in the Name: boxes of the Property Box Main tab.
So if none of your Individual records has their surname recorded entirely in /CAPITALS/ then the plugin does nothing.
That would be the normal scenario and explains why box 1 lists nobody.

Don't confuse that with the Tools > Preferences > General default option that Displays surnames in upper case.
Mike Tate ~ researching the Tate and Scott family history ~ tatewise ancestry
avatar
jelv
Megastar
Posts: 565
Joined: 03 Feb 2020 22:57
Family Historian: V7
Location: Mere, Wiltshire

Re: Clean up Surname Capitalisation

Post by jelv »

Unfortunately this doesn't catch dodgy capitalisation, e.g. SMith or all lower case.

I've started to look at what could be changed - so far managing to detect wronguns by changing line 55 from

Code: Select all

if strSurname == strSurname:upper() then
to

Code: Select all

if strSurname ~= captialise(strSurname) then
Trying this I've discovered I have some individuals with duff capitalisation that I didn't know about and the plugin hadn't detected.
Last edited by jelv on 17 Jan 2022 15:24, edited 1 time in total.
John Elvin
avatar
ColinMc
Superstar
Posts: 458
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Clean up Surname Capitalisation

Post by ColinMc »

tatewise wrote: 17 Jan 2022 14:33 It says in the Plugin Store and in the Plugins window description box for this plugin that it:
"tidies the capitalisation for Surnames recorded in the file in ALL CAPS."
i.e. As shown in the Name: boxes of the Property Box Main tab.
So if none of your Individual records has their surname recorded entirely in /CAPITALS/ then the plugin does nothing.
That would be the normal scenario and explains why box 1 lists nobody.
I know exactly what it says, I made a point of looking for help to check what it said, but that dialog not make clear that Box 1 was a RESULTS box. It could be asking for names you want checked. I was also fairly confident that I would get a Null answer.
Don't confuse that with the Tools > Preferences > General default option that Displays surnames in upper case.
I wasn't, this was a question about the plugin verifying my data, not about how Surnames are displayed in the program
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families
avatar
ColinMc
Superstar
Posts: 458
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Clean up Surname Capitalisation

Post by ColinMc »

jelv wrote: 17 Jan 2022 15:09 I've started to look at what could be changed - so far managing to detect wronguns by changing line 55 from
Unfortunately this is beyond my ability, I'll let the experts look at this.
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families
avatar
ColinMc
Superstar
Posts: 458
Joined: 17 Jan 2019 11:35
Family Historian: V7
Location: Edinburgh

Re: Clean up Surname Capitalisation

Post by ColinMc »

Mark1834 wrote: 17 Jan 2022 13:48 It checks every Individual, not just the latest addition.
Thanks, that was my question
Colin McDonald - Researching McDonald, McGillivray, Tait, Rountree families
User avatar
Mark1834
Megastar
Posts: 2458
Joined: 27 Oct 2017 19:33
Family Historian: V7
Location: South Cheshire, UK

Re: Clean up Surname Capitalisation

Post by Mark1834 »

A word of warning - some authors (including me) can be sensitive about uninvited "corrections" to their scripts...

It doesn't stop me changing my personal copy though - I haven't got a single store plugin in its original form. Usually, I tweak the UI to my preferences, or modify the scope to add new features or remove unnecessary ones (IMO of course!). I even write my own version if the original is too opaque to change easily!

The benefits of open-source coding...!
Mark Draper
Post Reply