gramps-web icon indicating copy to clipboard operation
gramps-web copied to clipboard

Please add support for custom name display formats

Open syominsergey opened this issue 1 year ago • 9 comments

Hi!

In my culture preferrable order of names looks like this:

<given name> <patronymic surname> <surname>

Or another order also possible:

<surname> <given name> <patronymic surname>

But in GrampsWeb another order of names is widely used:

<given name> <surname> <patronymic surname>

Or another possible order of such set of names in GrampsWeb:

<surname> <patronymic surname> <given name>

All these order existing in GrampsWeb are looks very strange and unusual in my culture.

Lets look at some examples.

List of persons (https://<domain>/people): image

Info about concrete person (https://<domain>/person/<person_id>): image

Ancestor tree and other types of trees (https://<domain>/tree): image

Maybe some other views exists with same order of names unusual for my culture.

Desktop Gramps application has elegant way to solve this problem. It has setting for for custom name display format: https://gramps-project.org/wiki/index.php/Gramps_5.2_Wiki_Manual_-_Settings#Display_Name_Editor

I can set it to desired value and after it order of names looks natively to my culture in all views I have found in desktop app. For example some screenshots from Desktop Gramps 5.2.2 after setting of custom name display format (sorry for screenshots from desktop app - they are in translation to my language, I can't find howto change translation to English in desktop app).

List of persons: image

Info about concrete person: image

Tree: image

Please, implement ability to change default order of names in all views in GrampsWeb according to setting of custom name display format in GrampsWeb, just like works in desktop Gramps.

P.s.

Version of GrampsWeb where I created screenshots:

Gramps 5.2.2
Gramps Web API 2.3.0
Gramps Web Frontend 24.5.0
Gramps QL 0.3.0
locale: en
multi-tree: false
task queue: false

P.p.s. I have discussed this feature request at gramps discourse group. Also I found another feature request is very close to current: https://github.com/gramps-project/gramps-web/issues/411. It is about ability to change names order from Surname, FirstName to FirstName Surname in tree, graph & Chart view. I think, it is a part of current more generic feature request. So, after discussion in gramps discourse group I decided to open this new feature request.

syominsergey avatar May 22 '24 20:05 syominsergey

When this is implemented would this allow us to change the display to show married names by default?

andye2801 avatar Oct 22 '24 11:10 andye2801

No, I don't think so. Gramps treats married names as alternative names and Gramps Web uses the primary name everywhere, because otherwise it's difficult to determine which altnernative name to pick in which case.

DavidMStraub avatar Oct 22 '24 11:10 DavidMStraub

Is it possible to select which name is the primary name manually?

andye2801 avatar Oct 22 '24 12:10 andye2801

Not right now. It's part of this feature request. But that one is simple to implement.

DavidMStraub avatar Oct 22 '24 12:10 DavidMStraub

Also it would be very good to have an ability to show person in this format: <given name> <patronymic surname> <married surname> (<maiden surname>)

Ex: Natalia Alexandrovna Smirnova (Ivanova)

nikallass avatar Jan 02 '25 09:01 nikallass

Is it possible to select which name is the primary name manually?

I ended up creating a separate issue for that one after all, as it's a simple UI change, while the name display formats are more work.

https://github.com/gramps-project/gramps-web/issues/562

DavidMStraub avatar Jan 02 '25 13:01 DavidMStraub

I see three options for implementing custom name display formats:

  • Adding a custom name format query parameter to the person endpoint, adding the formatted name to the person profile, and using the person profile for all displayed names in the frontend
  • Adding a new endpoint where a raw name object can be posted and a formatted name is returned
  • Reimplementing gramps.gen.display.name in Javascript

I haven't investigated this in detail enough to judge which is the best road.

I think this feature is very well motivated, but I'm personally not likely to work on this anytime soon for purely egoistic reasons (I don't need it). If anyone wants to take it on, I can provide more detailed instructions.

DavidMStraub avatar Jan 02 '25 13:01 DavidMStraub