2356: add comments about genitive form issues under some locales

svn: r18915
This commit is contained in:
Jérôme Rapinat 2012-02-17 16:51:40 +00:00
parent 1560b0657d
commit f97a4f4511
25 changed files with 41 additions and 0 deletions

View File

@ -420,14 +420,17 @@ class WriterOptionBox(object):
gramps_id = self.person.get_gramps_id()
des = GenericFilter()
# feature request 2356: avoid genitive form
des.set_name(_("Descendants of %s") % name)
des.add_rule(Rules.Person.IsDescendantOf([gramps_id, 1]))
df = GenericFilter()
# feature request 2356: avoid genitive form
df.set_name(_("Descendant Families of %s") % name)
df.add_rule(Rules.Person.IsDescendantFamilyOf([gramps_id, 1]))
ans = GenericFilter()
# feature request 2356: avoid genitive form
ans.set_name(_("Ancestors of %s") % name)
ans.add_rule(Rules.Person.IsAncestorOf([gramps_id, 1]))

View File

@ -462,6 +462,7 @@ def find_locker_name(dirpath):
# Otherwise problems with non ASCII characters in
# username in Windows
username = unicode(username, sys.getfilesystemencoding())
# feature request 2356: avoid genitive form
last = _("Locked by %s") % username
ifile.close()
except (OSError, IOError):

View File

@ -268,14 +268,17 @@ def get_person_filters(person, include_single=True):
all.add_rule(Rules.Person.Everyone([]))
des = GenericFilter()
# feature request 2356: avoid genitive form
des.set_name(_("Descendants of %s") % name)
des.add_rule(Rules.Person.IsDescendantOf([gramps_id, 1]))
df = GenericFilter()
# feature request 2356: avoid genitive form
df.set_name(_("Descendant Families of %s") % name)
df.add_rule(Rules.Person.IsDescendantFamilyOf([gramps_id, 1]))
ans = GenericFilter()
# feature request 2356: avoid genitive form
ans.set_name(_("Ancestors of %s") % name)
ans.add_rule(Rules.Person.IsAncestorOf([gramps_id, 1]))

View File

@ -147,6 +147,7 @@ class TitleA(TitleBox):
if center is not None:
name = name_displayer.display(center)
# feature request 2356: avoid genitive form
self.text = _("Ancestor Graph for %s") % name
self.set_box_height_width()

View File

@ -242,7 +242,9 @@ class TimeLine(Report):
Draws the title for the page.
"""
width = self.doc.get_usable_width()
# feature request 2356: avoid genitive form
byline = _("Sorted by %s") % self.sort_name
# feature request 2356: avoid genitive form
title = _("Timeline Graph for %s") % self.filter.get_name()
self.doc.center_text('TLG-title', title + "\n" + byline, width / 2.0, 0)

View File

@ -136,6 +136,7 @@ class CalendarWriter(object):
if event.get_type() == EventType.MARRIAGE:
m_date = event.get_date_object()
place_handle = event.get_place_handle()
# feature requests 2356, 1657: avoid genitive form
text = _("Marriage of %s") % Utils.family_name(family,
self.db)
if place_handle:
@ -155,10 +156,12 @@ class CalendarWriter(object):
place_handle = birth.get_place_handle()
if place_handle:
place = self.db.get_place_from_handle(place_handle)
# feature requests 2356, 1657: avoid genitive form
self.write_vevent(_("Birth of %s") %
person.get_primary_name().get_name(),
b_date, place.get_title())
else:
# feature requests 2356, 1657: avoid genitive form
self.write_vevent(_("Birth of %s") %
person.get_primary_name().get_name(),
b_date)
@ -171,11 +174,13 @@ class CalendarWriter(object):
place_handle = death.get_place_handle()
if place_handle:
place = self.db.get_place_from_handle(place_handle)
# feature requests 2356, 1657: avoid genitive form
self.write_vevent(_("Death of %s") %
person.get_primary_name().get_name(),
d_date,
place.get_title())
else:
# feature requests 2356, 1657: avoid genitive form
self.write_vevent(_("Death of %s") %
person.get_primary_name().get_name(),
d_date)

View File

@ -67,6 +67,7 @@ class DescendantGramplet(Gramplet):
if self.center_person is None:
return
name = name_displayer.display(self.center_person)
# feature request 2356: avoid genitive form
title = _("Descendants of %s") % name
self.append_text(title)
self.append_text("\n\n")

View File

@ -80,7 +80,9 @@ CHILD_REL_MAP = {
"Unknown" : gen.lib.ChildRefType(gen.lib.ChildRefType.UNKNOWN),
}
# feature requests 2356, 1658: avoid genitive form
EVENT_FAMILY_STR = _("%(event_name)s of %(family)s")
# feature requests 2356, 1658: avoid genitive form
EVENT_PERSON_STR = _("%(event_name)s of %(person)s")
#-------------------------------------------------------------------------

View File

@ -6173,6 +6173,7 @@ class GedcomParser(UpdateCallback):
# We can't produce the 'Generated by' statement till the end of the SOUR
# level, because the name and version may come in any order
if self.use_def_src:
# feature request 2356: avoid genitive form
self.def_src.set_data_item(_("Generated by"), "%s %s" %
(self.genby, self.genvers))
@ -6273,6 +6274,7 @@ class GedcomParser(UpdateCallback):
"""
if self.use_def_src:
filename = os.path.basename(line.data).split('\\')[-1]
# feature request 2356: avoid genitive form
self.def_src.set_title(_("Import from %s") % filename)
def __header_copr(self, line, state):

View File

@ -53,6 +53,7 @@ def run(database, document, person):
# display the results
# feature request 2356: avoid genitive form
sdoc.title(_("Sorted events of %s") % sdb.name(person))
sdoc.paragraph("")

View File

@ -48,6 +48,7 @@ def run_father(database, document, person):
# display the results
# feature request 2356: avoid genitive form
sd.title(_("Father lineage for %s") % sa.name(person))
sd.paragraph("")
sd.paragraph(_(""
@ -78,6 +79,7 @@ def run_mother(database, document, person):
# display the results
# feature request 2356: avoid genitive form
sd.title(_("Mother lineage for %s") % sa.name(person))
sd.paragraph("")
sd.paragraph(_(""

View File

@ -42,6 +42,7 @@ def run(database, document, person):
rel_class = Relationship.get_relationship_calculator()
# display the title
# feature request 2356: avoid genitive form
sdoc.title(_("Siblings of %s") % sdb.name(person))
sdoc.paragraph("")
stab.columns(_("Sibling"), _("Gender"), _("Birth Date"), _("Type"))

View File

@ -187,6 +187,7 @@ class AncestorReport(Report):
# identified as a major category if this is included in a Book report.
name = self._name_display.display_formal(self.center_person)
# feature request 2356: avoid genitive form
title = self._("Ahnentafel Report for %s") % name
mark = IndexMark(title, INDEX_TYPE_TOC, 1)
self.doc.start_paragraph("AHN-Title")

View File

@ -169,6 +169,7 @@ class CalendarReport(Report):
if self.relationships:
name = self.center_person.get_primary_name()
self.doc.start_paragraph('BIR-Text3style')
# feature request 2356: avoid genitive form
self.doc.write_text(_("Relationships shown are to %s") %
self._name_display.display_name(name))
self.doc.end_paragraph()

View File

@ -363,6 +363,7 @@ class DescendantReport(Report):
def write_report(self):
self.doc.start_paragraph("DR-Title")
name = self._name_display.display(self.center_person)
# feature request 2356: avoid genitive form
title = _("Descendants of %s") % name
mark = IndexMark(title, INDEX_TYPE_TOC, 1)
self.doc.write_text(title, mark)

View File

@ -193,6 +193,7 @@ class DetAncestorReport(Report):
name = self._name_display.display_name(self.center_person.get_primary_name())
self.doc.start_paragraph("DAR-Title")
# feature request 2356: avoid genitive form
title = self._("Ancestral Report for %s") % name
mark = IndexMark(title, INDEX_TYPE_TOC, 1)
self.doc.write_text(title, mark)
@ -313,6 +314,7 @@ class DetAncestorReport(Report):
notelist = person.get_note_list()
if len(notelist) > 0 and self.includenotes:
self.doc.start_paragraph("DAR-NoteHeader")
# feature request 2356: avoid genitive form
self.doc.write_text(self._("Notes for %s") % name)
self.doc.end_paragraph()
for notehandle in notelist:

View File

@ -286,6 +286,7 @@ class DetDescendantReport(Report):
self.doc.start_paragraph("DDR-Title")
# feature request 2356: avoid genitive form
title = self._("Descendant Report for %(person_name)s") % {
'person_name' : name }
mark = IndexMark(title, INDEX_TYPE_TOC, 1)
@ -774,6 +775,7 @@ class DetDescendantReport(Report):
notelist = person.get_note_list()
if len(notelist) > 0 and self.inc_notes:
self.doc.start_paragraph("DDR-NoteHeader")
# feature request 2356: avoid genitive form
self.doc.write_text(self._("Notes for %s") % name)
self.doc.end_paragraph()
for notehandle in notelist:

View File

@ -146,12 +146,14 @@ class EndOfLineReport(Report):
pname = self._name_display.display(self.center_person)
self.doc.start_paragraph("EOL-Title")
# feature request 2356: avoid genitive form
title = _("End of Line Report for %s") % pname
mark = IndexMark(title, INDEX_TYPE_TOC, 1)
self.doc.write_text(title, mark)
self.doc.end_paragraph()
self.doc.start_paragraph("EOL-Subtitle")
# feature request 2356: avoid genitive form
title = _("All the ancestors of %s who are missing a parent") % pname
self.doc.write_text(title)
self.doc.end_paragraph()

View File

@ -549,6 +549,7 @@ class IndivCompleteReport(Report):
media_list = self.person.get_media_list()
name = self._name_display.display(self.person)
# feature request 2356: avoid genitive form
title = _("Summary of %s") % name
mark = IndexMark(title, INDEX_TYPE_TOC, 1)
self.doc.start_paragraph("IDS-Title")

View File

@ -113,6 +113,7 @@ class KinshipReport(Report):
pname = self._name_display.display(self.person)
self.doc.start_paragraph("KIN-Title")
# feature request 2356: avoid genitive form
title = _("Kinship Report for %s") % pname
mark = IndexMark(title, INDEX_TYPE_TOC, 1)
self.doc.write_text(title, mark)

View File

@ -100,6 +100,7 @@ class NumberOfAncestorsReport(Report):
self.doc.start_paragraph("NOA-Title")
name = self._name_display.display(self.__person)
# feature request 2356: avoid genitive form
title = _("Number of Ancestors for %s") % name
mark = IndexMark(title, INDEX_TYPE_TOC, 1)
self.doc.write_text(title, mark)

View File

@ -81,6 +81,7 @@ class TagReport(Report):
def write_report(self):
self.doc.start_paragraph("TR-Title")
# feature request 2356: avoid genitive form
title = _("Tag Report for %s Items") % self.tag
mark = IndexMark(title, INDEX_TYPE_TOC, 1)
self.doc.write_text(title, mark)

View File

@ -123,7 +123,9 @@ class EventNames(tool.BatchTool, ManagedWindow.ManagedWindow):
#
#-------------------------------------------------------------------------
# feature requests 2356, 1658: avoid genitive form
EVENT_FAMILY_STR = _("%(event_name)s of %(family)s")
# feature requests 2356, 1658: avoid genitive form
EVENT_PERSON_STR = _("%(event_name)s of %(person)s")
def person_event_name(event, person):

View File

@ -173,6 +173,7 @@ class NotRelated(tool.ActivePersonTool, ManagedWindow.ManagedWindow) :
# populate the treeview model with the names of unrelated people
if self.numberOfUnrelatedPeople == 0:
# feature request 2356: avoid genitive form
title.set_text(_('Everyone in the database is related to %s') % self.name)
else:
self.populateModel()

View File

@ -2948,6 +2948,7 @@ class SurnamePage(BasePage):
# section title
surnamedetail += Html("h3", html_escape(surname), inline = True)
# feature request 2356: avoid genitive form
msg = _("This page contains an index of all the individuals in the "
"database with the surname of %s. Selecting the person’s name "
"will take you to that person’s individual page.") % surname