all non primary surnames as an option in the display of names in preferences
svn: r16235
This commit is contained in:
parent
d5f1a7e199
commit
de72ec184f
@ -34,6 +34,7 @@ Specific symbols for parts of a name are defined:
|
|||||||
'y' : patronymic surname (father)
|
'y' : patronymic surname (father)
|
||||||
'o' : surnames without patronymic
|
'o' : surnames without patronymic
|
||||||
'm' : primary surname (main)
|
'm' : primary surname (main)
|
||||||
|
'r' : non primary surnames (rest)
|
||||||
'p' : list of all prefixes
|
'p' : list of all prefixes
|
||||||
'q' : surnames without prefixes and connectors
|
'q' : surnames without prefixes and connectors
|
||||||
's' : suffix
|
's' : suffix
|
||||||
@ -148,12 +149,21 @@ def _raw_primary_surname(raw_surn_data_list):
|
|||||||
return ''
|
return ''
|
||||||
|
|
||||||
def _raw_primary_surname_only(raw_surn_data_list):
|
def _raw_primary_surname_only(raw_surn_data_list):
|
||||||
"""method for the 'm' symbol: primary surname"""
|
"""method to obtain the raw primary surname data"""
|
||||||
for raw_surn_data in raw_surn_data_list:
|
for raw_surn_data in raw_surn_data_list:
|
||||||
if raw_surn_data[_PRIMARY_IN_LIST]:
|
if raw_surn_data[_PRIMARY_IN_LIST]:
|
||||||
return raw_surn_data[_SURNAME_IN_LIST]
|
return raw_surn_data[_SURNAME_IN_LIST]
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
def _raw_nonprimary_surname(raw_surn_data_list):
|
||||||
|
"""method for the 'r' symbol: nonprimary surnames"""
|
||||||
|
result = ''
|
||||||
|
for raw_surn_data in raw_surn_data_list:
|
||||||
|
if not raw_surn_data[_PRIMARY_IN_LIST]:
|
||||||
|
result = "%s %s %s" % (result, raw_surn_data[_PREFIX_IN_LIST],
|
||||||
|
raw_surn_data[_SURNAME_IN_LIST])
|
||||||
|
return ' '.join(result.split())
|
||||||
|
|
||||||
def _raw_patro_surname(raw_surn_data_list):
|
def _raw_patro_surname(raw_surn_data_list):
|
||||||
"""method for the 'y' symbol: patronymic surname"""
|
"""method for the 'y' symbol: patronymic surname"""
|
||||||
for raw_surn_data in raw_surn_data_list:
|
for raw_surn_data in raw_surn_data_list:
|
||||||
@ -373,6 +383,7 @@ class NameDisplay(object):
|
|||||||
'y' : patronymic = patronymic surname (father)
|
'y' : patronymic = patronymic surname (father)
|
||||||
'o' : notpatronymic = surnames without patronymic
|
'o' : notpatronymic = surnames without patronymic
|
||||||
'm' : primary = primary surname (main)
|
'm' : primary = primary surname (main)
|
||||||
|
'r' : rest = non primary surnames
|
||||||
'p' : prefix = list of all prefixes
|
'p' : prefix = list of all prefixes
|
||||||
'q' : rawsurnames = surnames without prefixes and connectors
|
'q' : rawsurnames = surnames without prefixes and connectors
|
||||||
's' : suffix = suffix
|
's' : suffix = suffix
|
||||||
@ -408,6 +419,9 @@ class NameDisplay(object):
|
|||||||
"m": ("_raw_primary_surname(raw_data[_SURNAME_LIST])",
|
"m": ("_raw_primary_surname(raw_data[_SURNAME_LIST])",
|
||||||
"primary",
|
"primary",
|
||||||
_("Name|primary")),
|
_("Name|primary")),
|
||||||
|
"r": ("_raw_nonprimary_surname(raw_data[_SURNAME_LIST])",
|
||||||
|
"rest",
|
||||||
|
_("Remaining names|rest")),
|
||||||
"p": ("_raw_prefix_surname(raw_data[_SURNAME_LIST])",
|
"p": ("_raw_prefix_surname(raw_data[_SURNAME_LIST])",
|
||||||
"prefix",
|
"prefix",
|
||||||
_("prefix")),
|
_("prefix")),
|
||||||
@ -448,6 +462,7 @@ class NameDisplay(object):
|
|||||||
'y' : patronymic = patronymic surname (father)
|
'y' : patronymic = patronymic surname (father)
|
||||||
'o' : notpatronymic = surnames without patronymic
|
'o' : notpatronymic = surnames without patronymic
|
||||||
'm' : primary = primary surname (main)
|
'm' : primary = primary surname (main)
|
||||||
|
'r' : rest = non primary surnames
|
||||||
'p' : prefix = list of all prefixes
|
'p' : prefix = list of all prefixes
|
||||||
'q' : rawsurnames = surnames without prefixes and connectors
|
'q' : rawsurnames = surnames without prefixes and connectors
|
||||||
's' : suffix = suffix
|
's' : suffix = suffix
|
||||||
@ -480,6 +495,8 @@ class NameDisplay(object):
|
|||||||
_("notpatronymic")),
|
_("notpatronymic")),
|
||||||
"m": ("_raw_primary_surname(raw_surname_list)", "primary",
|
"m": ("_raw_primary_surname(raw_surname_list)", "primary",
|
||||||
_("Name|primary")),
|
_("Name|primary")),
|
||||||
|
"r": ("_raw_nonprimary_surname(raw_surname_list)", "rest",
|
||||||
|
_("Remaining names|rest")),
|
||||||
"p": ("_raw_prefix_surname(raw_surname_list)", "prefix",
|
"p": ("_raw_prefix_surname(raw_surname_list)", "prefix",
|
||||||
_("prefix")),
|
_("prefix")),
|
||||||
"q": ("_raw_single_surname(raw_surname_list)", "rawsurnames",
|
"q": ("_raw_single_surname(raw_surname_list)", "rawsurnames",
|
||||||
@ -628,6 +645,7 @@ def fn(%s):
|
|||||||
'%y' : patronymic surname (father)
|
'%y' : patronymic surname (father)
|
||||||
'%o' : surnames without patronymic
|
'%o' : surnames without patronymic
|
||||||
'%m' : primary surname (main)
|
'%m' : primary surname (main)
|
||||||
|
'%r' : non-primary surnames (rest)
|
||||||
'%p' : list of all prefixes
|
'%p' : list of all prefixes
|
||||||
'%q' : surnames without prefixes and connectors
|
'%q' : surnames without prefixes and connectors
|
||||||
'%s' : suffix
|
'%s' : suffix
|
||||||
|
@ -105,6 +105,7 @@ class DisplayNameEditor(ManagedWindow.ManagedWindow):
|
|||||||
<b>Primary</b> - primary surname (main) <b>Familynick</b> - family nick name
|
<b>Primary</b> - primary surname (main) <b>Familynick</b> - family nick name
|
||||||
<b>Patronymic</b> - father's surname <b>Notpatronymic</b>- all surnames, except patronymic
|
<b>Patronymic</b> - father's surname <b>Notpatronymic</b>- all surnames, except patronymic
|
||||||
<b>Prefix</b> - all prefixes (von, de) <b>Rawsurnames</b> - surnames (no prefixes and connectors)
|
<b>Prefix</b> - all prefixes (von, de) <b>Rawsurnames</b> - surnames (no prefixes and connectors)
|
||||||
|
<b>Rest</b> - non primary surnames
|
||||||
</tt>
|
</tt>
|
||||||
UPPERCASE keyword forces uppercase. Extra parentheses, commas are removed. Other text appears literally.
|
UPPERCASE keyword forces uppercase. Extra parentheses, commas are removed. Other text appears literally.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user