2007-06-24 Alex Roitman <shura@gramps-project.org>
* src/NameDisplay.py (_gen_cooked_func,_gen_raw_func): Do not replace %% with anything. svn: r8663
This commit is contained in:
parent
c0737ebfe3
commit
5d85545e79
@ -1,3 +1,7 @@
|
||||
2007-06-24 Alex Roitman <shura@gramps-project.org>
|
||||
* src/NameDisplay.py (_gen_cooked_func,_gen_raw_func): Do not
|
||||
replace %% with anything.
|
||||
|
||||
2007-06-24 Don Allingham <don@gramps-project.org>
|
||||
* configure.in: add files
|
||||
* src/DataViews/_RelationView.py: fix translation argument
|
||||
|
@ -281,7 +281,7 @@ class NameDisplay:
|
||||
"%S":"raw_data[_SUFFIX].upper()",
|
||||
"%Y":"raw_data[_PATRONYM].upper()",
|
||||
"%C":"raw_data[_CALL].upper()",
|
||||
"%%":"'%'"}
|
||||
}
|
||||
|
||||
new_fmt = format_str
|
||||
|
||||
@ -302,13 +302,12 @@ class NameDisplay:
|
||||
new_fmt = new_fmt.replace("%S","%s")
|
||||
new_fmt = new_fmt.replace("%Y","%s")
|
||||
new_fmt = new_fmt.replace("%C","%s")
|
||||
new_fmt = new_fmt.replace("%%",'%')
|
||||
|
||||
# find each format flag in the original format string
|
||||
# for each one we find the variable name that is needed to
|
||||
# replace it and add this to a list. This list will be used
|
||||
# generate the replacement tuple.
|
||||
pat = re.compile("%.")
|
||||
pat = re.compile('|'.join(d.keys()))
|
||||
|
||||
param = ()
|
||||
mat = pat.search(format_str)
|
||||
@ -356,8 +355,7 @@ class NameDisplay:
|
||||
"%S":"suffix.upper()",
|
||||
"%Y":"patronymic.upper()",
|
||||
"%C":"call.upper()",
|
||||
"%%":"'%'"}
|
||||
|
||||
}
|
||||
|
||||
new_fmt = format_str
|
||||
|
||||
@ -378,7 +376,6 @@ class NameDisplay:
|
||||
new_fmt = new_fmt.replace("%S","%s")
|
||||
new_fmt = new_fmt.replace("%Y","%s")
|
||||
new_fmt = new_fmt.replace("%C","%s")
|
||||
new_fmt = new_fmt.replace("%%",'%')
|
||||
|
||||
# find each format flag in the original format string
|
||||
# for each one we find the variable name that is needed to
|
||||
|
Loading…
Reference in New Issue
Block a user