Opened 17 years ago

Closed 14 years ago

#5638 closed (duplicate)

Non-Western person names

Reported by: Wang Chun <wangchun@…> Owned by: nobody
Component: Internationalization Version: dev
Severity: Keywords: i18n-nofix
Cc: davidzhou@… Triage Stage: Design decision needed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Currently, django.contrib.auth have two fields for a person name: first name and last name. And make full name by combining the two with "%s %s". This is okay for Western names, but not good for internationalization.

References:

What is Yao Ming's "first name"? Is it Yao or Ming? An internationalized web framework should support name order, family name first or given name first. And besides, family name and given name not always have a space character between the two. Chinese and Japanese languages don't use space characters to separate words. As for verbose name, Chinese usually call someone by his/her full name ("Hello, Yao Ming", instead of "Hello, Ming"). So have considered of all these complicated things, I would prefer have only one field "full name" in database, and generate first name and last name from full name as an opposite from the current implementation. This is also benifical for non-person, for example, an organization or a pet usually does not have first/last name, but only one name.

Change History (16)

comment:1 by Jarek Zgoda <jarek.zgoda@…>, 17 years ago

Additionally, some localizations prefer using "last_name first_name" as verbose name (Hungary is the one I recall now).

comment:2 by anonymous, 17 years ago

Here is Taiwan, 'Hello, Ming' is more common than the more formal 'Hello, Yao Ming' Keep in mind, I am a foreigner and that might affect my perception.

When creating tables in prior projects, I usually created these columns: last_name, first_name, middle_name, and full_name. full_name is defaulted from the other names and, most importantly, should be overridden as necessary.

Then there is Romanization of Chinese names. I usually put these in last_name and first_name.

in reply to:  2 comment:3 by Wang Chun <wangchun@…>, 17 years ago

"Hello, Ming" may make sense in English, but Django is a multilingual web framework, what if the website not in English at all? I think "你好,明。" would sound odd even in Taiwan.

Replying to anonymous:

Here is Taiwan, 'Hello, Ming' is more common than the more formal 'Hello, Yao Ming' Keep in mind, I am a foreigner and that might affect my perception.

When creating tables in prior projects, I usually created these columns: last_name, first_name, middle_name, and full_name. full_name is defaulted from the other names and, most importantly, should be overridden as necessary.

Then there is Romanization of Chinese names. I usually put these in last_name and first_name.

comment:4 by Wang Chun <wangchun@…>, 17 years ago

comment:5 by Tony Becker, 17 years ago

How about this: we store last_name (surname or family name) and first_name (given name), and the generation of full_name is locale-dependent? It shouldn't be that hard to create a file with rules for generating full_name according to particular locales. That way, people viewing the site in a particular locale would always see what they're expecting to see -- family name first, given name first, etc. I don't like the idea of globbing everything together into full_name that is only occasionally changed from the default, because sorting conventions become more difficult to keep straight. A separate rule set could be used to provide locale-dependent sorting orders, separately from the display convention.

comment:6 by Wang Chun <wangchun@…>, 17 years ago

We could create another auth model called something like newuser (we already have newform right?) which would merge first name and last name as display_name, and people could still use olduser for backward-compatible. If we had finshed #3011 (Allow for extendable auth_user module)....

comment:7 by Tony Becker, 17 years ago

The thing I liked about my idea is that it would not require an API change. You ask for the full_name, and it gives you a full_name that's generated based on your locale. Might also add a function sort_name, which returns the "sorting order" name. For instance, for a hypothetical John Doe,

first_name: John
last_name: Doe
get_full_name: John Doe (computed based on en-US)
get_sort_name: Doe John (computed based on en-US)

whereas if someone's locale were different and used "eastern order" name sorting, it would be:

get_full_name: Doe John (computed)
get_sort_name: Doe John (I guess... right?)

comment:8 by Wang Chun <wangchun@…>, 17 years ago

No...

People's name order does not depend on your system's locale. It depends on where people come from. John Doe in Chinese is also known as John Doe (given family), Hu Jintao in English is also known as Hu Jintao (family given).

I like Mac OS X Leopard's Address Book, which has a new submenu "Reorder Last Name before First" under "Card" menu, unlike Tiger's overall preference, this submenu to reorder name for a specific card. It really helps. Maybe we can do in a similar way.

comment:9 by Simon G <dev@…>, 17 years ago

Triage Stage: UnreviewedDesign decision needed

comment:10 by Cliff Dyer, 17 years ago

I think to do this right (and being someone who goes by my middle name, I've never seen names done right), you really need to have an arbitrary number of name records for a person, with the following fields:
person_id, name, position, sort_position, source, role

So given the name Jemima Clifford Dyer, and an ID of 3, I would have the following records associated with my name:

3,Jemima,1,2,given,None
3,Clifford,2,3,given,informal
3,Dyer,3,1,family,formal

Except it's complicated by the fact that I go by Cliff instead of Clifford, so maybe add an optional nickname field to all that mess. And not all names are given or family names. There are also patronymics, names signifying your birth order, like "Cliff Third_Child Dyer."

I'm -0 on adding this much complexity. It would be fairly cool to see it done right, but can it be done without an unacceptable cost in usability?

comment:11 by david zhou <davidzhou@…>, 17 years ago

I don't think any of these changes are strictly necessary, as it's almost purely a semantic difference. Simply labeling "first name" and "last name" as "personal name" and "family name", respectively, would solve 90% of the issues.

Because of the different ways that names can be used, name ordering, etc., should be handled outside of the User object. Optionally, by default, User should return personal name+family name. An argument can be passed to User to switch the order.

"first name" and "last name" can be kept as legal identifiers that map to peronal name and family name, with a deprecation warning given out when used.

If we do it this way, there's no immediate API change, and it provides enough flexibility that should someone really need more, they should onsider creating custom fields in the user profile.

comment:12 by david zhou <davidzhou@…>, 17 years ago

Cc: davidzhou@… added

comment:13 by Ramiro Morales, 17 years ago

#6311 and #6429 were duplicates of this ticket

comment:14 by resplin, 15 years ago

In my projects I prefer two fields: "given names" and "family names". Then I make sure to allow spaces and hyphens in the fields. This allows (given, family): (John, Doe), (John Jacob, Doe), (John Jacob, Doe-Smith), (Mary Lou Gibbons, Smith), (Mary Lou, Gibbons Smith), etc. And it is really easy to reverse the ordering between given and family names. It is mostly a simple semantic change, but it is important.

comment:15 by Marc Garcia, 15 years ago

Keywords: i18n-nofix added

comment:16 by Malcolm Tredinnick, 14 years ago

Resolution: duplicate
Status: newclosed

We are in the process of discussing/designing a public interface for the auth user class. It's not an easy problem and requires care, but it will allow local solutions to problems like this for storing names. Direct patches to this ticket aren't going to be useful for now, so I'll close it in favour of #3011, which is our placeholder for the necessary customizations. Design discussions will happen on the mailing list.

Note: See TracTickets for help on using tickets.
Back to Top