Page 1 of 1

Clean up Surname Capitalisation

Posted: 17 Jan 2022 13:15
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 1382 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.

Re: Clean up Surname Capitalisation

Posted: 17 Jan 2022 13:48
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...

Re: Clean up Surname Capitalisation

Posted: 17 Jan 2022 14:33
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.

Re: Clean up Surname Capitalisation

Posted: 17 Jan 2022 15:09
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.

Re: Clean up Surname Capitalisation

Posted: 17 Jan 2022 15:23
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

Re: Clean up Surname Capitalisation

Posted: 17 Jan 2022 15:25
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.

Re: Clean up Surname Capitalisation

Posted: 17 Jan 2022 15:25
by ColinMc
Mark1834 wrote:
17 Jan 2022 13:48
It checks every Individual, not just the latest addition.
Thanks, that was my question

Re: Clean up Surname Capitalisation

Posted: 17 Jan 2022 15:35
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...!