Please do NOT expect all Feature Requests to be actioned automatically. Describing your proposal here will ensure the development team are aware of it, and they will give it careful consideration.
  • Page:
  • 1

TOPIC:

Surnames full capitalization 6 months 1 week ago #1

  • yann64
  • yann64's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 23
I regularly import Gedcom from different sources and sometimes surnames are fully capitalized, sometimes not.
As a matter of consistency, I try to keep all surnames fully capitalized.

It would be very handy if as an additional "Data fix" it could be possible to "Capitalize all surnames", as unless mistaken I don't think webtrees allows automating this tasks?

Please Log in or Create an account to join the conversation.

Surnames full capitalization 6 months 1 week ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 16208
You can change the display, rather than change the data.

Control panel -> Custom CSS and JS.
Add the following CSS:
<style>
.SURN { text-transform: uppercase }
</style>
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Surnames full capitalization 6 months 1 week ago #3

  • hermann
  • hermann's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 610
The suggestion of Greg is much better than capitalizing the names. They should be written in the data in upper and lower case as usual. McNamara is ok, MCNAMARA is not ok for me.
Hermann
Designer of the custom module "Extended Family"

webtrees 2.0.23 (all custom modules installed, php 7.4.15, MySQL 5.6) @ ahnen.hartenthaler.eu

Please Log in or Create an account to join the conversation.

Surnames full capitalization 6 months 1 week ago #4

  • Sir Peter
  • Sir Peter's Avatar
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 330
Hermann is correct. On page 54 GEDCOM 5.5.1 explicity says: Capitalize the name of a person or place in the conventional manner— capitalize the first letter of each part and lowercase the other letters, unless conventional usage is otherwise. For example: McMurray.

Changing all surnames to all uppercase like in MCMURRAY would elevate an error to the new standard.

@Greg, what about implementing a data fix that allows an admin to correct the all uppercase surnames - providing the admin with a list of "surname=uppercase(surname)" and corresponding checkboxes so that surnames like MCMURRAY could be excluded from the bulk change and handled manually.
Peter

Please Log in or Create an account to join the conversation.

Surnames full capitalization 6 months 1 week ago #5

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 16208
You can "fix" a single name using the search/replace datafix. e.g. "/SMITH/" => '/Smith/'.

(A more advance search would only do this on lines beginning "1 NAME")

But I can see complications trying to convert all names automatically.

We cannot convert certain letters to lowercase. For example, see en.wikipedia.org/wiki/Dotted_and_dotless_I
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Surnames full capitalization 5 months 3 weeks ago #6

  • Bogie
  • Bogie's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Life is good!
  • Posts: 744

It would be very handy if as an additional "Data fix" it could be possible to "Capitalize all surnames", as unless mistaken I don't think webtrees allows automating this tasks?

If you would like to find the records with capitalized surnames you could use a RegEx like
(2 SURN )([A-Z ]*$)
Bogie
webtrees 2.1.7 | PHP 8.1.7 | MariaDB 10.5.16 | Apache on Ubuntu 12.9
chart modules of @magicsunday, AutoComplete places of @tkempf

Please Log in or Create an account to join the conversation.

Surnames full capitalization 5 months 3 weeks ago #7

  • WGroleau
  • WGroleau's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 1895

If you would like to find the records with capitalized surnames you could use a RegEx like
(2 SURN )([A-Z ]*$)
That doesn’t work if, like me, you delete the completely redundant clutter of SURN (and every other subrecord of NAME except NICK and AKA).
--
Wes Groleau
UniGen.us/

Please Log in or Create an account to join the conversation.

Surnames full capitalization 5 months 3 weeks ago #8

  • Bogie
  • Bogie's Avatar
  • Offline
  • Premium Member
  • Premium Member
  • Life is good!
  • Posts: 744
It was only meant as a means for finding surnames all capitalized which was brought up by yann64.

What are you looking for?
Bogie
webtrees 2.1.7 | PHP 8.1.7 | MariaDB 10.5.16 | Apache on Ubuntu 12.9
chart modules of @magicsunday, AutoComplete places of @tkempf

Please Log in or Create an account to join the conversation.

Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 

Surnames full capitalization 5 months 3 days ago #9

  • WGroleau
  • WGroleau's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 1895

… But I can see complications trying to convert all names automatically.

We cannot convert certain letters to lowercase. For example, see en.wikipedia.org/wiki/Dotted_and_dotless_I

Related: I recently encountered a large quantity of Greek text where a search function could not find word I knew were there. Eventually figured out every word that should have stated with one of the Greek letters ΕΥΙΟΚΗΑΖΧΒΝΜ instead started with the look-alike ASCII letter!
--
Wes Groleau
UniGen.us/

Please Log in or Create an account to join the conversation.

Surnames full capitalization 3 months 2 weeks ago #10

  • WGroleau
  • WGroleau's Avatar
  • Offline
  • Elite Member
  • Elite Member
  • Posts: 1895
The problem with the Turkish "Iiıİİ ıs a flaw ın Unicode. They use the ASCII value for Ii which means that a capitalization routine would have to look at context to decide what to do.

They should have done what they did with Greek. Using different code points for glyphs that look the same allows this to work:
~ echo "ΕΡΤΥΙΟΑΗΚΖΧΒΝΜ" | tr "[:upper:]" "[:lower:]"
ερτυιοαηκζχβνμ
 ~ echo "ερτυιοαηκζχβνμ" | tr "[:lower:]" "[:upper:]"
ΕΡΤΥΙΟΑΗΚΖΧΒΝΜ
~ echo "EPTYIOAHKZXBNM" | tr "[:upper:]" "[:lower:]"
eptyioahkzxbnm
--
Wes Groleau
UniGen.us/

Please Log in or Create an account to join the conversation.

Surnames full capitalization 5 days 19 hours ago #11

  • yann64
  • yann64's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 23
Sorry for reviving this old thread.

Here is the compromise I implemented on CSS:
<style>
.SURN { text-transform: bolder }
</style>
This way, we have a clear difference between first-names and surnames in languages where first-names can be used as surnames (like French).

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum