Changed some formatted strings to named variables for 'make distcheck' to work properly.

svn: r14483
This commit is contained in:
Rob G. Healey 2010-02-25 15:52:32 +00:00
parent b2cfa9c776
commit 36a91b6cb9
19 changed files with 393 additions and 183 deletions

View File

@ -924,9 +924,8 @@ class RelationshipCalculator(object):
#loop, keep one message in storage!
self.__loopDetected = True
self.__msg += [_("Relationship loop detected:") + \
_("Person %s connects to himself via %s") % \
(person.get_primary_name().get_name(),
rel2[len(rel1):])]
_("Person %(person)s connects to himself via %(relation)s") ] % {
'person' : person.get_primary_name().get_name(), 'relation' : rel2[len(rel1):] }
return
elif store:
pmap[person.handle] = [[rel_str], [rel_fam]]

View File

@ -0,0 +1,84 @@
/*
**************************************************************************************************
Copyright Holder and License
**************************************************************************************************
GRAMPS Cascading Style Sheet
Style Name: Web_Alphabet-Horizontal.css
**************************************************************************************************
This website was created with GRAMPS
http://www.gramps-project.org
--------------------------------------------------------------------------------------------------
GRAMPS is a Free Software Project for Genealogy, offering a professional genealogy program,
and a wiki open to all. It is a community project, created, developed and governed by genealogists.
Go to http://gramps-project.org to learn more!
--------------------------------------------------------------------------------------------------
Copyright (C) 2009 Rob G. Healey <robhealey1@gmail.com>
This file is part of the GRAMPS program.
GRAMPS is free software: you can redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation, version 2 of the License.
GRAMPS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GRAMPS. If not,
see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------------------------------
# $Id: $
Header
----------------------------------------------------- */
div#header {
position: fixed;
top: 0px;
left: 0px;
overflow: auto;
width: 100%;
margin: 0;
}
/* NarrativeWeb Navigation
--------------------------------------------------------------------------------------- */
body#NarrativeWeb div#navigation {
position: fixed;
left: 0px;
width: 100%;
}
/* Alphabet Navigation
----------------------------------------------------- */
div#alphabet {
position: fixed;
top: 130px;
left: 0px;
width: 100%;
margin: 0;
}
div#alphabet ul {
list-style:none;
min-width:770px;
height:24px;
margin:0;
padding: 0px 0px 0px 16px;
border-width: 2px 0px 4px 0px;
border-style: solid;
}
div#alphabet ul li:after {
content:" |";
}
div#alphabet ul li {
margin:0;
float:left;
}
div#alphabet ul li a {
display:block;
padding: 4px 8px 4px 8px;
float:left;
font:bold 16px/100% sans;
margin:0;
text-decoration:none;
}

View File

@ -0,0 +1,174 @@
/*
**************************************************************************************************
Copyright Holder and License
**************************************************************************************************
GRAMPS Cascading Style Sheet
Style Name: Web_Alphabet-Vertical.css
**************************************************************************************************
This website was created with GRAMPS
http://www.gramps-project.org
--------------------------------------------------------------------------------------------------
GRAMPS is a Free Software Project for Genealogy, offering a professional genealogy program,
and a wiki open to all. It is a community project, created, developed and governed by genealogists.
Go to http://gramps-project.org to learn more!
--------------------------------------------------------------------------------------------------
Copyright (C) 2009 Rob G. Healey <robhealey1@gmail.com>
This file is part of the GRAMPS program.
GRAMPS is free software: you can redistribute it and/or modify it under the terms of the GNU General
Public License as published by the Free Software Foundation, version 2 of the License.
GRAMPS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with GRAMPS. If not,
see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------------------------------
# $Id: $
Body Element
----------------------------------------------------- */
body {
font-family: Arial, sans, sans-serif, Helvetica;
color: #000;
background-color: #FFF;
padding: 60px 0px 0px 108px;
}
/* Header
----------------------------------------------------- */
#header {
position: fixed;
top: 0px;
left: 0px;
overflow: auto;
width: 100%;
}
/* Navigation/ SubNavigation
----------------------------------------------------- */
div#navigation, div#subnavigation {
position: fixed;
left: 0px;
width: 108px;
height: 500px;
overflow-x: auto;
border-width: 2px 4px 2px 4px;
border-style: solid;
}
div#navigation ul, div#subnavigation ul {
display: inline;
list-style: none;
padding: 0px 9px 0px 9px;
margin: 0;
}
div#navigation ul li, div#subnavigation ul li {
font: bold 14px/100% sans;
padding: 10px 10px 10px 0px;
margin:0;
float: left;
border-width: 0px 0px 2px 0px;
border-style: solid;
}
div#navigation ul li:first-child, div#subnavigation ul li:first-child {
border-top: 0;
}
div#navigation ul li:last-child, div#subnavigation ul li:last-child {
border-bottom: 0;
}
div#navigation ul li a, div#subnavigation ul li a {
text-decoration: none;
display: block;
padding: 10px 0px 6px 10px;
}
div#navigation ul li a:hover, div#subnavigation ul li a:hover {
background-color: #C1B398;
}
div#navigation ul li.CurrentSection a, div#subnavigation ul li.CurrentSection a {
font-weight:bold;
font-style: italic;
background-color: #453619;
color: #FFF;
}
div#navigation ul li.CurrentSection a:hover {
background-color: #000;
color: #FFF;
}
div#subnavigation ul li.CurrentSection a {
border-width: 0px 0px 2px 0px;
border-color: #5D835F;
}
/* Alphabet Navigation
----------------------------------------------------- */
div#alphabet {
width: 100%;
margin: 0;
padding: 0;
}
div#alphabet ul {
list-style:none;
min-width: 900px;
height: 40px;
margin:0;
padding: 0px 0px 0px 16px;
border-bottom: solid 2px #5D835F;
}
div#alphabet ul li {
float:left;
}
div#alphabet ul li a {
display: block;
padding: 12px 16px 14px 1px;
float:left;
font: .8em bold italic small-caps verdana, serif;
color: #000;
text-decoration:none;
margin:0;
}
div#alphabet ul li a:hover {
background-color: #C1B398;
}
/* Alphabet Navigation
----------------------------------------------------- */
div#alphabet {
width: 100%;
margin: 0;
background-color: #6AF364;
}
div#alphabet ul {
list-style:none;
min-width:770px;
height:24px;
margin:0;
padding: 0px 0px 0px 16px;
border-width: 1px 0px 1px 0px;
border-style: solid;
border-color: #5D835F;
}
div#alphabet ul li:after {
content:" |";
}
div#alphabet ul li {
margin:0;
float:left;
}
div#alphabet ul li a {
display:block;
padding: 4px 8px 4px 8px;
float:left;
font: normal 16px/100% sans;
margin:0;
text-decoration:none;
color: #000;
}
div#alphabet ul li a:hover {
background-color: #000;
color: #FFF;
}

View File

@ -49,11 +49,6 @@ Females Web_Gender_Female.png
NarrativeWeb Styles
-------------------------------------------------------------------------------------------- */
body {
font-family: Arial, sans, sans-serif, Helvetica;
color: #000;
background-color: #FFF;
}
/* General Elements
----------------------------------------------------- */
@ -268,90 +263,6 @@ div#footer p#copyright img {
padding:0;
}
/* Navigation
----------------------------------------------------- */
div#navigation, div#subnavigation {
width: 100%;
margin: 0;
padding: 0;
}
div#navigation ul, div#subnavigation ul {
list-style:none;
min-width: 900px;
height: 40px;
margin:0;
padding: 0px 0px 0px 16px;
border-bottom: solid 2px #5D835F;
}
div#navigation ul li, div#subnavigation ul li {
float:left;
}
div#navigation ul li a, div#subnavigation ul li a {
display: block;
padding: 12px 16px 14px 1px;
float:left;
font: .8em bold italic small-caps verdana, serif;
color: #000;
text-decoration:none;
margin:0;
}
div#navigation ul li a:hover, div#subnavigation ul li a:hover {
background-color: #C1B398;
}
div#navigation ul li.CurrentSection a, div#subnavigation ul li.CurrentSection a {
font-weight:bold;
font-style: italic;
background-color: #453619;
color: #FFF;
}
div#navigation ul li.CurrentSection a:hover {
background-color: #000;
color: #FFF;
}
div#subnavigation ul li.CurrentSection a {
border-width: 0px 0px 2px 0px;
border-color: #5D835F;
}
i0
/* Alphabet Navigation
----------------------------------------------------- */
div#alphabet {
width: 100%;
margin: 0;
background-color: #6AF364;
}
div#alphabet ul {
list-style:none;
min-width:770px;
height:24px;
margin:0;
padding: 0px 0px 0px 16px;
border-width: 1px 0px 1px 0px;
border-style: solid;
border-color: #5D835F;
}
div#alphabet ul li:after {
content:" |";
}
div#alphabet ul li {
margin:0;
float:left;
}
div#alphabet ul li a {
display:block;
padding: 4px 8px 4px 8px;
float:left;
font: normal 16px/100% sans;
margin:0;
text-decoration:none;
color: #000;
}
div#alphabet ul li a:hover {
background-color: #000;
color: #FFF;
}
/* Main Table
----------------------------------------------------- */
table.infolist {

View File

@ -176,7 +176,8 @@ def _get_subject(options, dbase):
else:
mother_name = _("unknown mother")
name = _("%s and %s (%s)") % (father_name, mother_name, family_id)
name = _("%(father)s and %(mother)s (%(id)s)") % {
'father' : father_name, 'mother' : mother_name, 'id' : family_id }
return name
return _("Not Applicable")

View File

@ -210,9 +210,9 @@ def _find_records(db, filter, callname):
father = db.get_person_from_handle(father_handle)
mother = db.get_person_from_handle(mother_handle)
name = _("%s and %s") % (
_person_get_display_name(father, callname),
_person_get_display_name(mother, callname))
name = _("%(father)s and %(mother)s") % {
'father' : _person_get_display_name(father, callname),
'mother' : _person_get_display_name(mother, callname) }
_record(None, family_mostchildren,
len(family.get_child_ref_list()),

View File

@ -81,6 +81,6 @@ class LogGramplet(Gramplet):
if mother_handle:
mother = self.dbstate.db.get_person_from_handle(mother_handle)
mother_name = name_displayer.display(mother)
name = _("%s and %s") % (mother_name, father_name)
name = _("%(mother)s and %(father)s") % { 'mother' : mother_name, 'father' : father_name }
self.link(name, ltype, handle)
self.append_text("\n")

View File

@ -330,8 +330,8 @@ class CSVParser(object):
try:
data = [[r.strip() for r in row] for row in reader]
except csv.Error, e:
ErrorDialog(_('format error: file %s, line %d: %s') %
(self.filename, reader.line_num, e))
ErrorDialog(_('format error: file %(fname)s, line %(line)d: %(zero)s')) % {
'fname' : self.filename, 'line' : reader.line_num, 'zero' : e }
try:
fp.close()
except:

View File

@ -2825,9 +2825,9 @@ def importData(database, filename, callback=None, cl=0):
if database.has_name_group_key(key) :
present = database.get_name_group_mapping(key)
if not value == present:
msg = _("Your family tree groups name %s together"
" with %s, did not change this grouping to %s") % (
key, present, value)
msg = _("Your family tree groups name %(key)s together"
" with %(present)s, did not change this grouping to %(value)s") % {
'key' : key, 'present' : present, 'value' : value }
LOG.warn(msg)
else:
database.set_name_group_mapping(key, value)

View File

@ -688,7 +688,8 @@ class ProgenParser(object):
date.set(gen.lib.Date.QUAL_NONE, gen.lib.Date.MOD_ABOUT, gen.lib.Date.CAL_GREGORIAN, (0, month, year, None))
return date
log.warning(_("date did not match: '%s' (%s)") % (txt.encode('utf-8'), diag_msg or ''))
log.warning(_("date did not match: '(text)%s' (%(msg)s)")) % {
'text' : txt.encode('utf-8'), 'msg' : diag_msg or '' }
# Hmmm. Just use the plain text.
date.set_as_text(txt)
return date
@ -1238,9 +1239,11 @@ class ProgenParser(object):
father_handle = father > 0 and self.__find_person_handle("I%d" % father) or None
mother_handle = mother > 0 and self.__find_person_handle("I%d" % mother) or None
if father > 0 and not father_handle:
log.warning(_("cannot find father for I%s (father=%d)") % (pers_id, father))
log.warning(_("cannot find father for I%(person)s (father=%(id)d)")) % {
'person' : pers_id, 'id' : father }
elif mother > 0 and not mother_handle:
log.warning(_("cannot find mother for I%s (mother=%d)") % (pers_id, mother))
log.warning(_("cannot find mother for I(person)%s (mother=%(mother)d)")) % {
'person' : pers_id, 'mother' : mother }
else:
fam = self.fm2fam.get((father_handle, mother_handle), None)
if not fam:

View File

@ -1310,9 +1310,9 @@ class GrampsParser(UpdateCallback):
if self.db.has_name_group_key(key) :
present = self.db.get_name_group_mapping(key)
if not value == present:
msg = _("Your family tree groups name %s together"
" with %s, did not change this grouping to %s") % (
key, present, value)
msg = _("Your family tree groups name %(key)s together"
" with %(parent)s, did not change this grouping to %(value)s") % {
'key' : key, 'parent' : present, 'value' : value }
self.errmsg(msg)
else:
self.db.set_name_group_mapping(key, value)
@ -2479,11 +2479,11 @@ def version_is_valid(filename, cli):
parser = VersionParser(filename)
if parser.get_xmlns_version() > libgrampsxml.GRAMPS_XML_VERSION:
msg = _("The .gramps file you are importing was made by version %s of "
"Gramps, while you are running an older version %s. "
msg = _("The .gramps file you are importing was made by version %(newer)s of "
"Gramps, while you are running an older version %(older)s. "
"The file will not be imported. Please upgrade to the latest "
"version of Gramps and try again."
) % (parser.get_gramps_version(), const.VERSION)
"version of Gramps and try again." ) % {
'newer' : parser.get_gramps_version(), 'older' : const.VERSION }
if cli:
LOG.warn(msg)
return False

View File

@ -5494,8 +5494,8 @@ class GedcomParser(UpdateCallback):
line = self.__get_next_line()
if self.__level_is_finished(line, level):
if skips and self.want_parse_warnings:
msg = _("skipped %d subordinate(s) at line %d")\
% (skips, line.line - skips)
msg = _("skipped %(skip)d subordinate(s) at line %(line)d") % {
'skip' : skips, 'line' : line.line - skips }
self.__warn(msg)
return
skips += 1
@ -5929,4 +5929,4 @@ def __build_date_string(day, mon, year, bce, mmap):
retval = "(%d %s)" % (day, mmap[mon])
else:
retval = "%d %s %d%s" % (day, mmap[mon], year, bce)
return retval
return retval

View File

@ -95,9 +95,8 @@ def run_fam(database, document, family):
# display the results
sdoc.title(_("Sorted events of family\n %s - %s") %
(sdb.name(sdb.father(family)),
sdb.name(sdb.mother(family))))
sdoc.title(_("Sorted events of family\n %(father)s - %(mother)s")) % {
'father' : sdb.name(sdb.father(family)), 'mother' : sdb.name(sdb.mother(family)) }
sdoc.paragraph("")
stab.columns(_("Family Member"), _("Event Type"),

View File

@ -77,8 +77,8 @@ class AllRelReport():
p1 = self.sdb.name(self.person)
if self.person.handle == self.home_person.handle :
self.sdoc.paragraph(_FMT_VOID % (
_("%s and %s are the same person.") % ( p1, p2))
)
_("%(person)s and %(active_person)s are the same person."))) % {
'person' : p1, 'active_person' : p2 }
return
#check if not a family too:
@ -203,7 +203,8 @@ class AllRelReport():
"""
p2 = self.sdb.name(self.home_person)
p1 = self.sdb.name(self.person)
self.sdoc.title(_("Relationships of %s to %s") % (p1 ,p2))
self.sdoc.title(_("Relationships of %(person)s to %(active_person)s")) % {
'person' : p1 ,'active_person' : p2 }
self.sdoc.paragraph("")
def print_details_header(self, relations, pers1, pers2,

View File

@ -127,7 +127,8 @@ class SimpleBookTitleOptions(MenuReportOptions):
dateinfo = time.localtime(time.time())
rname = self.__db.get_researcher().get_name()
footer_string = _('Copyright %d %s') % (dateinfo[0], rname)
footer_string = _('Copyright %(year)d %(name)s') % {
'year' : dateinfo[0], 'name' : rname }
footer = StringOption(_('Footer'), footer_string )
footer.set_help(_("Footer string for the page."))
menu.add_option(category_name, "footer", footer)

View File

@ -444,7 +444,8 @@ class CalcToolManagedWindow(PluginWindows.ToolManagedWindowBatch):
if not birth_ref and add_birth_event:
other_name = self.sdb.name(other)
if other_name:
explanation = _("Added birth event based on %s, from %s") % (evidence, other_name)
explanation = _("Added birth event based on %(evidence)s, from %(name)s") % {
'evidence' : evidence, 'name ' : other_name }
else:
explanation = _("Added birth event based on %s") % evidence
modifier = self.get_modifier("birth")
@ -459,7 +460,8 @@ class CalcToolManagedWindow(PluginWindows.ToolManagedWindowBatch):
if not death_ref and add_death_event:
other_name = self.sdb.name(other)
if other_name:
explanation = _("Added death event based on %s, from %s") % (evidence, other_name)
explanation = _("Added death event based on %(evidence)s, from %(person)s") % {
'evidence' : evidence, 'person' : other_name }
else:
explanation = _("Added death event based on %s") % evidence
modifier = self.get_modifier("death")

View File

@ -1286,9 +1286,11 @@ class CheckIntegrity(object):
self.db.get_number_of_places() +
self.db.get_number_of_media_objects() +
self.db.get_number_of_sources() +
self.db.get_number_of_repositories() )
self.db.get_number_of_repositories()
)
self.progress.set_pass(_('Looking for note reference problems'), total )
self.progress.set_pass(_('Looking for note reference problems'),
total)
for handle in self.db.person_map.keys():
self.progress.step()
@ -1451,13 +1453,13 @@ class CheckIntegrity(object):
_('The database has passed internal checks'),
parent=uistate.window)
else:
print "No errors were found: the database has passed internal checks."
print("No errors were found: the database has passed internal checks.")
return 0
self.text = cStringIO.StringIO()
if blink > 0:
self.text.write(ngettext("%d broken child/family link was fixed\n", \
"%d broken child-family links were found\n", blink) % blink)
self.text.write(ngettext("%(quantity)d broken child/family link was fixed\n", \
"%(quantity)d broken child-family links were found\n", blink) % { 'quantity' : blink } )
for (person_handle, family_handle) in self.broken_links:
person = self.db.get_person_from_handle(person_handle)
if person:
@ -1470,12 +1472,12 @@ class CheckIntegrity(object):
except:
pn = _("Unknown")
self.text.write('\t')
self.text.write(_("%s was removed from the family of %s\n") % (cn, pn))
self.text.write(_("%(person)s was removed from the family of %(family)s\n")) % {
'person' : cn, 'family' : pn }
if plink > 0:
self.text.write(ngettext("%(quantity)d broken spouse/family link was fixed\n", \
"%(quantity)d broken spouse/family links were found\n", plink)) % {
'quantity' : plink }
"%(quantity)d broken spouse/family links were found\n", plink)) % { 'quantity' : plink }
for (person_handle, family_handle) in self.broken_parent_links:
person = self.db.get_person_from_handle(person_handle)
if person:
@ -1488,11 +1490,12 @@ class CheckIntegrity(object):
else:
pn = family_handle
self.text.write('\t')
self.text.write(_("%s was restored to the family of %s\n") % (cn, pn))
self.text.write(_("%(person)s was restored to the family of %(family)s\n")) % {
'person' : cn, 'family' : pn }
if slink > 0:
self.text.write(ngettext("%d duplicate spouse/family link was found\n", \
"%d duplicate spouse/family links were found\n", slink) % slink)
self.text.write(ngettext("%(quantity)d duplicate spouse/family link was found\n", \
"%(quantity)d duplicate spouse/family links were found\n", slink)) % { 'quantity' : slink }
for (person_handle, family_handle) in self.broken_parent_links:
person = self.db.get_person_from_handle(person_handle)
if person:
@ -1505,78 +1508,91 @@ class CheckIntegrity(object):
else:
pn = _("None")
self.text.write('\t')
self.text.write(_("%s was restored to the family of %s\n") % (cn, pn))
self.text.write(_("%(person)s was restored to the family of %(family)s\n")) % {
'person' : cn, 'family' : pn }
if efam == 1:
self.text.write(_("%d family with no parents or children found, removed.\n"))
self.text.write("\t%(empty_family)s\n") % {'empty_family' : self.empty_family[0] }
self.text.write("\t%s\n" % self.empty_family[0])
elif efam > 1:
self.text.write(_("%(quantity)d families with no parents or children, removed.\n")) % {
'quantity' : efam }
if rel:
self.text.write(ngettext("%d corrupted family relationship fixed\n", \
"%d corrupted family relationship fixed\n", rel) % rel )
self.text.write(ngettext("%(quantity)d corrupted family relationship fixed\n", \
"%(quantity)d corrupted family relationship fixed\n", rel)) % { 'quantity' : rel }
if person_references:
self.text.write(ngettext("%d person was referenced but not found\n", \
"%d persons were referenced, but not found\n", person_references) % person_references)
self.text.write(ngettext("%(quantity)d person was referenced but not found\n", \
"%(quantity)d persons were referenced, but not found\n", person_references)) % {
'quantity' : person_references }
if invalid_dates:
self.text.write(ngettext("%d date was corrected\n", \
"%d dates were corrected\n", invalid_dates) % invalid_dates)
self.text.write(ngettext("%(quantity)d date was corrected\n", \
"%(quantity)d dates were corrected\n", invalid_dates)) % { 'quantity' : invalid_dates }
if repo_references:
self.text.write(ngettext("%d repository was referenced but not found\n", \
"%d repositories were referenced, but not found\n", repo_references) % repo_references)
self.text.write(ngettext("%(quantity)d repository was referenced but not found\n", \
"%(quantity)d repositories were referenced, but not found\n", repo_references)) % {
'quantity' : repo_references }
if photos:
self.text.write(ngettext("%d media object was referenced, but not found\n", \
"%d media objects were referenced, but not found\n", photos) % photos)
self.text.write(ngettext("%(quantity)d media object was referenced, but not found\n", \
"%(quantity)d media objects were referenced, but not found\n", photos)) % { 'quantity' : photos }
if bad_photos:
self.text.write(ngettext("Reference to %d missing media object was kept\n", \
"References to %d media objects were kept\n", bad_photos) % bad_photos)
self.text.write(ngettext("Reference to %(quantity)d missing media object was kept\n", \
"References to %(quantity)d media objects were kept\n", bad_photos)) % {
'quantity' : bad_photos }
if replaced_photos:
self.text.write(ngettext("%d missing media object was replaced\n", \
"%d missing media objects were replaced\n", replaced_photos) % replaced_photos)
self.text.write(ngettext("%(quantity)d missing media object was replaced\n", \
"%(quantity)d missing media objects were replaced\n", replaced_photos)) % {
'quantity' : replaced_photos }
if removed_photos:
self.text.write(ngettext("%d missing media object was removed\n", \
"%d missing media objects were removed\n", removed_photos) % removed_photos)
self.text.write(ngettext("%(quantity)d missing media object was removed\n", \
"%(quantity)d missing media objects were removed\n", removed_photos)) % {
'quantity' : removed_photos }
if event_invalid:
self.text.write(ngettext("%d invalid event reference was removed\n", \
"%d invalid event references were removed\n", event_invalid) % event_invalid)
self.text.write(ngettext("%(quantity)d invalid event reference was removed\n", \
"%(quantity)d invalid event references were removed\n", event_invalid)) % {
'quantity' : event_invalid }
if birth_invalid:
self.text.write(ngettext("%d invalid birth event name was fixed\n", \
"%d invalid birth event names were fixed\n", birth_invalid) % birth_invalid)
self.text.write(ngettext("%(quantity)d invalid birth event name was fixed\n", \
"%(quantity)d invalid birth event names were fixed\n", birth_invalid)) % {
'quantity' : birth_invalid }
if death_invalid:
self.text.write(ngettext("%d invalid death event name was fixed\n", \
"%d invalid death event names were fixed\n", death_invalid) % death_invalid)
self.text.write(ngettext("%(quantity)d invalid death event name was fixed\n", \
"%(quantity)d invalid death event names were fixed\n", death_invalid)) % {
'quantity' : death_invalid }
if place_references:
self.text.write(ngettext("%d place was referenced but not found\n", \
"%d places were referenced, but not found\n", place_references) % place_references)
self.text.write(ngettext("%(quantity)d place was referenced but not found\n", \
"%(quantity)d places were referenced, but not found\n", place_references)) % {
'quantity' : place_references }
if source_references:
self.text.write(ngettext("%d source was referenced but not found\n", \
"%d sources were referenced, but not found\n", source_references) % source_references)
self.text.write(ngettext("%(quantity)d source was referenced but not found\n", \
"%(quantity)d sources were referenced, but not found\n", source_references)) % {
'quantity' : source_references }
if media_references:
self.text.write(ngettext("%d media object was referenced but not found\n", \
"%d media objects were referenced but not found\n", media_references) % media_references)
if note_references:
self.text.write(ngettext("%d note object was referenced but not found\n", \
"%d note objects were referenced but not found\n", note_references) % note_references)
self.text.write(ngettext("%(quantity)d note object was referenced but not found\n", \
"%(quantity)d note objects were referenced but not found\n", note_references)) % {
'quantity' : note_references }
if name_format:
self.text.write(ngettext("%d invalid name format reference was removed\n", \
"%d invalid name format references were removed\n", name_format) % name_format)
self.text.write(ngettext("%(quantity)d invalid name format reference was removed\n", \
"%(quantity)d invalid name format references were removed\n", name_format)) % {
'quantity' : name_format }
if empty_objs > 0 :
self.text.write(_("%(empty_obj)d empty objects removed:\n"
@ -1587,7 +1603,7 @@ class CheckIntegrity(object):
" %(media)d media objects\n"
" %(place)d place objects\n"
" %(repo)d repository objects\n"
" %(note)d note objects\n" ) % {
" %(note)d note objects\n" )) % {
'empty_obj' : empty_objs,
'person' : len(self.empty_objects['persons']),
'family' : len(self.empty_objects['families']),
@ -1596,7 +1612,7 @@ class CheckIntegrity(object):
'media' : len(self.empty_objects['media']),
'place' : len(self.empty_objects['places']),
'repo' : len(self.empty_objects['repos']),
'note' : len(self.empty_objects['notes']) } )
'note' : len(self.empty_objects['notes']) }
return errors

View File

@ -43,7 +43,7 @@ import gtk
# GRAMPS modules
#
#-------------------------------------------------------------------------
from gen.display.name import displayer as _nd
from gen.display.name import displayer as name_displayer
import ManagedWindow
from gui.views.treemodels import PeopleBaseModel, PersonTreeModel
from libpersonview import BasePersonView
@ -100,7 +100,7 @@ class RelCalc(Tool.Tool, ManagedWindow.ManagedWindow):
uistate.get_active('Person'))
name = ''
if self.person:
name = _nd.display(self.person)
name = name_displayer.display(self.person)
self.title = _('Relationship calculator: %(person_name)s'
) % {'person_name' : name}
window = self.glade.toplevel
@ -178,15 +178,15 @@ class RelCalc(Tool.Tool, ManagedWindow.ManagedWindow):
rel_strings, common_an = self.relationship.get_all_relationships(
self.db, self.person, other_person)
p1 = _nd.display(self.person)
p2 = _nd.display(other_person)
p1 = name_displayer.display(self.person)
p2 = name_displayer.display(other_person)
text = []
if other_person is None:
pass
elif self.person.handle == other_person.handle:
rstr = _("%(person)s and %(active_person)s are the same person.") % {
'person' : p1, 'active_person' : p2}
rstr = _("%(person)s and %(active_person)s are the same person.")) % {
'person' : p1, 'active_person' : p2 }
text.append((rstr, ""))
elif len(rel_strings) == 0:
rstr = _("%(person)s and %(active_person)s are not related.") % {
@ -203,15 +203,15 @@ class RelCalc(Tool.Tool, ManagedWindow.ManagedWindow):
if common[0] in [other_person.handle, self.person.handle]:
commontext = ''
else :
name = _nd.display(person)
name = name_displayer.display(person)
commontext = " " + _("Their common ancestor is %s.") % name
elif length == 2:
p1c = self.db.get_person_from_handle(common[0])
p2c = self.db.get_person_from_handle(common[1])
p1str = _nd.display(p1c)
p2str = _nd.display(p2c)
commontext = " " + _("Their common ancestors are %s and %s."
) % (p1str,p2str)
p1str = name_displayer.display(p1c)
p2str = name_displayer.display(p2c)
commontext = " " + _("Their common ancestors are %(acentor1)s and %(ancestor2)s.")
% { 'ancestor1' : p1str, 'ancestor2' : p2str }
elif length > 2:
index = 0
commontext = " " + _("Their common ancestors are: ")
@ -219,7 +219,7 @@ class RelCalc(Tool.Tool, ManagedWindow.ManagedWindow):
person = self.db.get_person_from_handle(person_handle)
if index:
commontext += ", "
commontext += _nd.display(person)
commontext += name_displayer.display(person)
index += 1
commontext += "."
else:

View File

@ -942,6 +942,10 @@ class BasePage(object):
fname = "/".join(["styles", _NARRATIVESCREEN])
url2 = self.report.build_url_fname(fname, None, self.up)
# link to Navigation stylesheet
fname = "/".join(["styles", "Web_Alphabet-Vertical.css"])
url5 = self.report.build_url_fname(fname, None, self.up)
# Link to _NARRATIVEPRINT stylesheet
fname = "/".join(["styles", _NARRATIVEPRINT])
url3 = self.report.build_url_fname(fname, None, self.up)
@ -2137,8 +2141,11 @@ class PlaceListPage(BasePage):
table += thead
trow = Html("tr") + (
Html("th", _("Letter"), class_ = "ColumnLetter", inline = True),
Html("th", _("Place name | Name"), class_ = "ColumnName", inline = True)
Html("th", _("Letter"), class_ = "ColumnLetter", inline = True),
Html("th", _("Place name | Name"), class_ = "ColumnName", inline = True),
Html("th", _("State"), class_ = "ColumnState", inline = True),
Html("th", _("Country"), class_ = "ColumnCtry", inline = True),
Html("th", _("Latitude/ Longitude"), class_ = "ColumnCoordinates", inline = True)
)
thead += trow
@ -2158,6 +2165,7 @@ class PlaceListPage(BasePage):
continue
letter = first_letter(place_title)
ml = place.get_main_location()
trow = Html("tr")
tbody += trow
@ -2176,6 +2184,13 @@ class PlaceListPage(BasePage):
trow += Html("td", self.place_link(place.handle, place_title, place.gramps_id),
class_ = "ColumnName")
trow.extend( Html("td", data, class_ = "Column" + colclass, inline = True)
for (colclass, data) in [
["State", ml.state],
["Country", ml.country],
["Coordinates", place.lat + "," + place.long] ]
if data or "&nbsp;" )
# add clearline for proper styling
# add footer section
footer = self.write_footer()
@ -5114,6 +5129,10 @@ class NavWebReport(Report):
fname = os.path.join(const.DATA_DIR, self.css)
self.copy_file(fname, _NARRATIVESCREEN, "styles")
# copy Navigation stylesheet
fname = os.path.join(const.DATA_DIR, "Web_Alphabet-Vertical.css")
self.copy_file(fname, "Web_Alphabet-Vertical.css", "styles")
# copy printer stylesheet
fname = os.path.join(const.DATA_DIR, "Web_Print-Default.css")
self.copy_file(fname, _NARRATIVEPRINT, "styles")