Compressed text some; changed common to mean 'nickname or first of given'

svn: r16215
This commit is contained in:
Doug Blank 2010-11-19 14:36:04 +00:00
parent 3ef4d169ff
commit 92758a5a69
2 changed files with 18 additions and 23 deletions

View File

@ -29,7 +29,7 @@ Specific symbols for parts of a name are defined:
'f' : given (first names) 'f' : given (first names)
'l' : full surname (lastname) 'l' : full surname (lastname)
'c' : callname 'c' : callname
'x' : callname if existing, otherwise first first name (common name) 'x' : nick name if existing, otherwise first first name (common name)
'i' : initials of the first names 'i' : initials of the first names
'y' : patronymic surname (father) 'y' : patronymic surname (father)
'o' : surnames without patronymic 'o' : surnames without patronymic
@ -368,7 +368,7 @@ class NameDisplay(object):
'f' : given = given (first names) 'f' : given = given (first names)
'l' : surname = full surname (lastname) 'l' : surname = full surname (lastname)
'c' : call = callname 'c' : call = callname
'x' : common = callname if existing, otherwise first first name (common name) 'x' : common = nick name if existing, otherwise first first name (common name)
'i' : initials = initials of the first names 'i' : initials = initials of the first names
'y' : patronymic = patronymic surname (father) 'y' : patronymic = patronymic surname (father)
'o' : notpatronymic = surnames without patronymic 'o' : notpatronymic = surnames without patronymic
@ -394,7 +394,7 @@ class NameDisplay(object):
_("suffix")), _("suffix")),
"c": ("raw_data[_CALL]", "call", "c": ("raw_data[_CALL]", "call",
_("Name|call")), _("Name|call")),
"x": ("(raw_data[_CALL] or raw_data[_FIRSTNAME].split(' ')[0])", "x": ("(raw_data[_NICK] or raw_data[_FIRSTNAME].split(' ')[0])",
"common", "common",
_("Name|common")), _("Name|common")),
"i": ("''.join([word[0] +'.' for word in ('. ' +" + "i": ("''.join([word[0] +'.' for word in ('. ' +" +
@ -443,7 +443,7 @@ class NameDisplay(object):
'f' : given = given (first names) 'f' : given = given (first names)
'l' : surname = full surname (lastname) 'l' : surname = full surname (lastname)
'c' : call = callname 'c' : call = callname
'x' : common = callname if existing, otherwise first first name (common name) 'x' : common = nick name if existing, otherwise first first name (common name)
'i' : initials = initials of the first names 'i' : initials = initials of the first names
'y' : patronymic = patronymic surname (father) 'y' : patronymic = patronymic surname (father)
'o' : notpatronymic = surnames without patronymic 'o' : notpatronymic = surnames without patronymic
@ -469,7 +469,7 @@ class NameDisplay(object):
_("suffix")), _("suffix")),
"c": ("call", "call", "c": ("call", "call",
_("Name|call")), _("Name|call")),
"x": ("(call or first.split(' ')[0])", "common", "x": ("(nick or first.split(' ')[0])", "common",
_("Name|common")), _("Name|common")),
"i": ("''.join([word[0] +'.' for word in ('. ' + first).split()][1:])", "i": ("''.join([word[0] +'.' for word in ('. ' + first).split()][1:])",
"initials", "initials",
@ -623,7 +623,7 @@ def fn(%s):
'%f' : given (first names) '%f' : given (first names)
'%l' : full surname (lastname) '%l' : full surname (lastname)
'%c' : callname '%c' : callname
'%x' : callname if existing, otherwise first first name (common name) '%x' : nick name if existing, otherwise first first name (common name)
'%i' : initials of the first names '%i' : initials of the first names
'%y' : patronymic surname (father) '%y' : patronymic surname (father)
'%o' : surnames without patronymic '%o' : surnames without patronymic

View File

@ -96,26 +96,21 @@ class DisplayNameEditor(ManagedWindow.ManagedWindow):
buttons=(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)), buttons=(gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)),
None, _('Display Name Editor'), None) None, _('Display Name Editor'), None)
table = self.dialog._build_custom_name_ui() table = self.dialog._build_custom_name_ui()
label = gtk.Label(_("""The following keywords will be replaced with the name: label = gtk.Label(_("""The following keywords are replaced with the appropriate name parts:
<tt> <tt>
<b>Given</b> - given name (first name) | <b>Surname</b> - surnames (with prefix and connectors) <b>Given</b> - given name (first name) <b>Surname</b> - surnames (with prefix and connectors)
<b>Title</b> - title (Dr., Mrs.) | <b>Suffix</b> - suffix (Jr., Sr.) <b>Title</b> - title (Dr., Mrs.) <b>Suffix</b> - suffix (Jr., Sr.)
<b>Call</b> - call name | <b>Nickname</b> - nick name <b>Call</b> - call name <b>Nickname</b> - nick name
<b>Initials</b> - first letters of Given | <b>Common</b> - Call, otherwise first of Given <b>Initials</b> - first letters of Given <b>Common</b> - nick name, otherwise first of Given
<b>Primary</b> - primary surname (main) | <b>Familynick</b> - Family nick name <b>Primary</b> - primary surname (main) <b>Familynick</b> - family nick name
Also: <b>Patronymic</b> - father's surname <b>Notpatronymic</b>- all surnames, except patronymic
<b>Patronymic</b> - patronymic surname (father's name) <b>Prefix</b> - all prefixes (von, de) <b>Rawsurnames</b> - surnames (no prefixes and connectors)
<b>Notpatronymic</b> - all surnames except patronymic
<b>Prefix</b> - all surnames prefixes (von, de, de la)
<b>Rawsurnames</b> - all surnames without prefixes and connectors
</tt> </tt>
Use the same keyword in UPPERCASE to force to upper. Parentheses and commas UPPERCASE keyword forces uppercase. Extra parentheses, commas are removed. Other text appears literally.
will be removed around empty fields. Other text will appear literally.
<b>Example fictituous name</b>: 'Dr. Edwin Jose von der Smith and Weston Wilson Sr ("Ed") - Underhills' <b>Example</b>: 'Dr. Edwin Jose von der Smith and Weston Wilson Sr ("Ed") - Underhills'
Here <i>Edwin Jose</i> are given names, <i>Smith</i> and <i>Weston</i> surnames, <i>Wilson</i> patronymic surname, <i>Edwin Jose</i> is given name, <i>Smith</i> and <i>Weston</i> surnames, <i>Wilson</i> patronymic surname,
<i>Dr.</i> a title, <i>Sr</i> a suffix, <i>Ed</i> the nick name, <i>Underhills</i> family nick name. <i>Dr.</i> title, <i>Sr</i> suffix, <i>Ed</i> nick name, <i>Underhills</i> family nick name, <i>Jose</i> callname.
Callname is <i>Jose</i>.
""")) """))
label.set_use_markup(True) label.set_use_markup(True)
self.window.vbox.pack_start(label, expand=False) self.window.vbox.pack_start(label, expand=False)