Class handling language-specific displaying of names.
Specific symbols for parts of a name are defined:
Symbol Description ‘t’ title ‘f’ given (first names) ‘l’ full surname (lastname) ‘c’ callname ‘x’ nick name if existing, otherwise first first name (common name) ‘i’ initials of the first names ‘m’ primary surname (main) ‘0m’ primary surname prefix ‘1m’ primary surname surname ‘2m’ primary surname connector ‘y’ pa/matronymic surname (father/mother) - assumed unique ‘0y’ pa/matronymic prefix ‘1y’ pa/matronymic surname ‘2y’ pa/matronymic connector ‘o’ surnames without pa/matronymic and primary ‘r’ non primary surnames (rest) ‘p’ list of all prefixes ‘q’ surnames without prefixes and connectors ‘s’ suffix ‘n’ nick name ‘g’ family nick name
Bases: object
Base class for displaying of Name instances.
python 2 to 3 conversion, python recipe http://code.activestate.com/recipes/576653/ Convert a cmp() function into a key() function We use this in Gramps as understanding the old compare function is not trivial. This should be replaced by a proper key function
Return a text string representing the Person instance’s Name in a manner that should be used for normal displaying.
Parameters: | person (Person) – Person instance that contains the Name that is to be displayed. The primary name is used for the display. |
---|---|
Returns: | Returns the Person instance’s name |
Return type: | str |
Return a text string representing the Person instance’s Name in a manner that should be used for formal displaying.
Parameters: | person (Person) – Person instance that contains the Name that is to be displayed. The primary name is used for the display. |
---|---|
Returns: | Returns the Person instance’s name |
Return type: | str |
Return a text string representing the Name instance in a manner that should be used for normal displaying.
Parameters: | name (Name) – Name instance that is to be displayed. |
---|---|
Returns: | Returns the Name string representation |
Return type: | str |
Format a name from the raw name list. To make this as fast as possible this uses _gen_raw_func() to generate a new method for each new format_string.
Is does not call _format_str_base() because it would introduce an extra method call and we need all the speed we can squeeze out of this.
Get a list of tuples (num, name,fmt_str,act)
Return the name under which to group this person. This is defined as:
Return the name under which to group. This is defined as:
Parameters: | pn (tuple) – raw unserialized data of name |
---|---|
Returns: | Returns the groupname string representation |
Return type: | str |
Return the name under which to group. This is defined as:
Parameters: | pn (Name instance) – Name object |
---|---|
Returns: | Returns the groupname string representation |
Return type: | str |
Return a text string representing the Name instance in a manner that should be used for normal displaying.
Parameters: | name (tuple) – raw unserialized data of name that is to be displayed. |
---|---|
Returns: | Returns the Name string representation |
Return type: | str |
Return a text string representing the Name instance in a manner that should be used for sorting the name in a list.
Parameters: | name (tuple) – raw unserialized data of name that is to be displayed. |
---|---|
Returns: | Returns the Name string representation |
Return type: | str |
Return a text string representing the Person instance’s Name in a manner that should be used for displaying a sortedname.
Parameters: | person (Person) – Person instance that contains the Name that is to be displayed. The primary name is used for the display. |
---|---|
Returns: | Returns the Person instance’s name |
Return type: | str |