* data/gramps.schemas.in: Remove unused key.

* src/Config/_GrampsConfigKeys.py: Regenerate file.
* src/NameDisplay.py (NameDisplay._format_str_base): Document the
format string interface.

svn: r7003
This commit is contained in:
Alex Roitman
2006-07-06 23:45:15 +00:00
parent 712d0828e2
commit 30b8f1bce2
4 changed files with 30 additions and 27 deletions

View File

@ -283,7 +283,20 @@ class NameDisplay:
def _format_str_base(self,first,surname,prefix,suffix,patronymic,
title,call,format_str):
"""
Generates name from a format string, e.g. '%T. %p %F %L (%p)' .
Generates name from a format string.
The following substitutions are made:
%t -> title
%f -> given name (first name)
%p -> prefix
%s -> suffix
%l -> family name (last name, surname)
%y -> patronymic
%c -> call name
The capital letters are substituted for capitalized name components.
The %% is substituted with the single % character.
All the other characters in the fmt_str are unaffected.
"""
output = format_str
@ -295,6 +308,7 @@ class NameDisplay:
output = output.replace("%s",suffix)
output = output.replace("%y",patronymic)
output = output.replace("%c",call)
output = output.replace("%T",title.upper())
output = output.replace("%F",first.upper())
output = output.replace("%P",prefix.upper())