7276: translate some currently-untranslated punctuation marks

This commit is contained in:
Paul Franklin 2016-12-18 14:20:36 -08:00
parent 1e8ab3ec69
commit 6a6fe9b48d
12 changed files with 72 additions and 66 deletions

View File

@ -398,7 +398,8 @@ class CommandLineReport:
father = self.database.get_person_from_handle(fhandle) father = self.database.get_person_from_handle(fhandle)
if father: if father:
fname = name_displayer.display(father) fname = name_displayer.display(father)
text = "%s:\t%s, %s" % (family.get_gramps_id(), # translators: needed for French and Arabic, else ignore
text = _("%s:\t%s, %s") % (family.get_gramps_id(),
fname, mname) fname, mname)
id_list.append(text) id_list.append(text)
self.options_help[name].append(id_list) self.options_help[name].append(id_list)

View File

@ -156,7 +156,7 @@ def insert_image(database, doc, photo, user,
crop=photo.get_rectangle()) crop=photo.get_rectangle())
else: else:
user.warn(_("Could not add photo to page"), user.warn(_("Could not add photo to page"),
"%s: %s" % (filename, _('File does not exist'))) _("%s: %s") % (filename, _('File does not exist')))
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #

View File

@ -327,7 +327,7 @@ class ConfigureDialog(ManagedWindow):
""" """
if not config: if not config:
config = self.__config config = self.__config
lwidget = BasicLabel("%s: " %label) lwidget = BasicLabel(_("%s: ") % label) # needed for French, else ignore
hbox = Gtk.Box() hbox = Gtk.Box()
if path: if path:
entry.set_text(path) entry.set_text(path)
@ -351,7 +351,7 @@ class ConfigureDialog(ManagedWindow):
if not callback: if not callback:
callback = self.update_entry callback = self.update_entry
if label: if label:
lwidget = BasicLabel("%s: " % label) lwidget = BasicLabel(_("%s: ") % label) # translators: for French
entry = Gtk.Entry() entry = Gtk.Entry()
if localized_config: if localized_config:
entry.set_text(config.get(constant)) entry.set_text(config.get(constant))
@ -372,7 +372,7 @@ class ConfigureDialog(ManagedWindow):
""" """
if not config: if not config:
config = self.__config config = self.__config
lwidget = BasicLabel("%s: " % label) lwidget = BasicLabel(_("%s: ") % label) # needed for French, else ignore
entry = Gtk.Entry() entry = Gtk.Entry()
entry.set_text(str(config.get(constant))) entry.set_text(str(config.get(constant)))
entry.set_tooltip_markup(helptext) entry.set_tooltip_markup(helptext)
@ -385,7 +385,7 @@ class ConfigureDialog(ManagedWindow):
def add_color(self, grid, label, index, constant, config=None, col=0): def add_color(self, grid, label, index, constant, config=None, col=0):
if not config: if not config:
config = self.__config config = self.__config
lwidget = BasicLabel("%s: " % label) lwidget = BasicLabel(_("%s: ") % label) # needed for French, else ignore
hexval = config.get(constant) hexval = config.get(constant)
color = Gdk.color_parse(hexval) color = Gdk.color_parse(hexval)
entry = Gtk.ColorButton(color=color) entry = Gtk.ColorButton(color=color)
@ -410,7 +410,7 @@ class ConfigureDialog(ManagedWindow):
config = self.__config config = self.__config
if not callback: if not callback:
callback = self.update_combo callback = self.update_combo
lwidget = BasicLabel("%s: " % label) lwidget = BasicLabel(_("%s: ") % label) # needed for French, else ignore
store = Gtk.ListStore(int, str) store = Gtk.ListStore(int, str)
for item in opts: for item in opts:
store.append(item) store.append(item)
@ -447,7 +447,7 @@ class ConfigureDialog(ManagedWindow):
config = self.__config config = self.__config
if not callback: if not callback:
callback = self.update_slider callback = self.update_slider
lwidget = BasicLabel("%s: " % label) lwidget = BasicLabel(_("%s: ") % label) # needed for French, else ignore
adj = Gtk.Adjustment(value=config.get(constant), lower=range[0], adj = Gtk.Adjustment(value=config.get(constant), lower=range[0],
upper=range[1], step_increment=1, upper=range[1], step_increment=1,
page_increment=0, page_size=0) page_increment=0, page_size=0)
@ -469,7 +469,7 @@ class ConfigureDialog(ManagedWindow):
config = self.__config config = self.__config
if not callback: if not callback:
callback = self.update_spinner callback = self.update_spinner
lwidget = BasicLabel("%s: " % label) lwidget = BasicLabel(_("%s: ") % label) # needed for French, else ignore
adj = Gtk.Adjustment(value=config.get(constant), lower=range[0], adj = Gtk.Adjustment(value=config.get(constant), lower=range[0],
upper=range[1], step_increment=1, upper=range[1], step_increment=1,
page_increment=0, page_size=0) page_increment=0, page_size=0)
@ -978,7 +978,7 @@ class GrampsPreferences(ConfigureDialog):
self.fmt_obox.set_active(active) self.fmt_obox.set_active(active)
self.fmt_obox.connect('changed', self.cb_name_changed) self.fmt_obox.connect('changed', self.cb_name_changed)
# label for the combo # label for the combo
lwidget = BasicLabel("%s: " % _('Name format')) lwidget = BasicLabel(_("%s: ") % _('Name format'))
lwidget.set_use_underline(True) lwidget.set_use_underline(True)
lwidget.set_mnemonic_widget(self.fmt_obox) lwidget.set_mnemonic_widget(self.fmt_obox)
hbox = Gtk.Box() hbox = Gtk.Box()
@ -1006,7 +1006,7 @@ class GrampsPreferences(ConfigureDialog):
active = 0 active = 0
obox.set_active(active) obox.set_active(active)
obox.connect('changed', self.date_format_changed) obox.connect('changed', self.date_format_changed)
lwidget = BasicLabel("%s: " % _('Date format')) lwidget = BasicLabel(_("%s: ") % _('Date format'))
grid.attach(lwidget, 0, row, 1, 1) grid.attach(lwidget, 0, row, 1, 1)
grid.attach(obox, 1, row, 2, 1) grid.attach(obox, 1, row, 2, 1)
row += 1 row += 1
@ -1027,7 +1027,7 @@ class GrampsPreferences(ConfigureDialog):
obox.connect('changed', obox.connect('changed',
lambda obj: config.set('preferences.age-display-precision', lambda obj: config.set('preferences.age-display-precision',
obj.get_active() + 1)) obj.get_active() + 1))
lwidget = BasicLabel("%s: " lwidget = BasicLabel(_("%s: ")
% _('Age display precision (requires restart)')) % _('Age display precision (requires restart)'))
grid.attach(lwidget, 0, row, 1, 1) grid.attach(lwidget, 0, row, 1, 1)
grid.attach(obox, 1, row, 2, 1) grid.attach(obox, 1, row, 2, 1)
@ -1041,7 +1041,7 @@ class GrampsPreferences(ConfigureDialog):
active = 0 active = 0
obox.set_active(active) obox.set_active(active)
obox.connect('changed', self.date_calendar_changed) obox.connect('changed', self.date_calendar_changed)
lwidget = BasicLabel("%s: " % _('Calendar on reports')) lwidget = BasicLabel(_("%s: ") % _('Calendar on reports'))
grid.attach(lwidget, 0, row, 1, 1) grid.attach(lwidget, 0, row, 1, 1)
grid.attach(obox, 1, row, 2, 1) grid.attach(obox, 1, row, 2, 1)
row += 1 row += 1
@ -1054,7 +1054,7 @@ class GrampsPreferences(ConfigureDialog):
obox.connect('changed', obox.connect('changed',
lambda obj: config.set('behavior.surname-guessing', lambda obj: config.set('behavior.surname-guessing',
obj.get_active())) obj.get_active()))
lwidget = BasicLabel("%s: " % _('Surname guessing')) lwidget = BasicLabel(_("%s: ") % _('Surname guessing'))
grid.attach(lwidget, 0, row, 1, 1) grid.attach(lwidget, 0, row, 1, 1)
grid.attach(obox, 1, row, 2, 1) grid.attach(obox, 1, row, 2, 1)
row += 1 row += 1
@ -1067,7 +1067,7 @@ class GrampsPreferences(ConfigureDialog):
obox.connect('changed', obox.connect('changed',
lambda obj: config.set('preferences.family-relation-type', lambda obj: config.set('preferences.family-relation-type',
obj.get_active())) obj.get_active()))
lwidget = BasicLabel("%s: " % _('Default family relationship')) lwidget = BasicLabel(_("%s: ") % _('Default family relationship'))
grid.attach(lwidget, 0, row, 1, 1) grid.attach(lwidget, 0, row, 1, 1)
grid.attach(obox, 1, row, 2, 1) grid.attach(obox, 1, row, 2, 1)
row += 1 row += 1
@ -1091,7 +1091,7 @@ class GrampsPreferences(ConfigureDialog):
obox.set_active(1) obox.set_active(1)
obox.connect('changed', obox.connect('changed',
lambda obj: config.set('interface.statusbar', 2*obj.get_active())) lambda obj: config.set('interface.statusbar', 2*obj.get_active()))
lwidget = BasicLabel("%s: " % _('Status bar')) lwidget = BasicLabel(_("%s: ") % _('Status bar'))
grid.attach(lwidget, 0, row, 1, 1) grid.attach(lwidget, 0, row, 1, 1)
grid.attach(obox, 1, row, 2, 1) grid.attach(obox, 1, row, 2, 1)
row += 1 row += 1
@ -1148,7 +1148,7 @@ class GrampsPreferences(ConfigureDialog):
active = config.get('preferences.place-restrict') active = config.get('preferences.place-restrict')
obox.set_active(active) obox.set_active(active)
obox.connect('changed', self.place_restrict_changed) obox.connect('changed', self.place_restrict_changed)
lwidget = BasicLabel("%s: " % _('Restrict')) lwidget = BasicLabel(_("%s: ") % _('Restrict'))
grid2.attach(lwidget, 0, row, 1, 1) grid2.attach(lwidget, 0, row, 1, 1)
grid2.attach(obox, 1, row, 2, 1) grid2.attach(obox, 1, row, 2, 1)
self.place_widgets.append(obox) self.place_widgets.append(obox)
@ -1372,7 +1372,7 @@ class GrampsPreferences(ConfigureDialog):
active = config.get('behavior.check-for-updates') active = config.get('behavior.check-for-updates')
obox.set_active(active) obox.set_active(active)
obox.connect('changed', self.check_for_updates_changed) obox.connect('changed', self.check_for_updates_changed)
lwidget = BasicLabel("%s: " % _('Check for updates')) lwidget = BasicLabel(_("%s: ") % _('Check for updates'))
grid.attach(lwidget, 1, current_line, 1, 1) grid.attach(lwidget, 1, current_line, 1, 1)
grid.attach(obox, 2, current_line, 1, 1) grid.attach(obox, 2, current_line, 1, 1)
@ -1390,7 +1390,7 @@ class GrampsPreferences(ConfigureDialog):
elif "update" in whattype: elif "update" in whattype:
self.whattype_box.set_active(0) self.whattype_box.set_active(0)
self.whattype_box.connect('changed', self.check_for_type_changed) self.whattype_box.connect('changed', self.check_for_type_changed)
lwidget = BasicLabel("%s: " % _('What to check')) lwidget = BasicLabel(_("%s: ") % _('What to check'))
grid.attach(lwidget, 1, current_line, 1, 1) grid.attach(lwidget, 1, current_line, 1, 1)
grid.attach(self.whattype_box, 2, current_line, 1, 1) grid.attach(self.whattype_box, 2, current_line, 1, 1)
@ -1451,7 +1451,7 @@ class GrampsPreferences(ConfigureDialog):
current_line = 0 current_line = 0
if __debug__: if __debug__:
lwidget = BasicLabel("%s: " % _('Database backend')) lwidget = BasicLabel(_("%s: ") % _('Database backend'))
grid.attach(lwidget, 1, current_line, 1, 1) grid.attach(lwidget, 1, current_line, 1, 1)
obox = self.__create_backend_combo() obox = self.__create_backend_combo()
grid.attach(obox, 2, current_line, 1, 1) grid.attach(obox, 2, current_line, 1, 1)
@ -1495,7 +1495,7 @@ class GrampsPreferences(ConfigureDialog):
active = config.get('database.autobackup') active = config.get('database.autobackup')
obox.set_active(active) obox.set_active(active)
obox.connect('changed', self.autobackup_changed) obox.connect('changed', self.autobackup_changed)
lwidget = BasicLabel("%s: " % _('Autobackup')) lwidget = BasicLabel(_("%s: ") % _('Autobackup'))
grid.attach(lwidget, 1, current_line, 1, 1) grid.attach(lwidget, 1, current_line, 1, 1)
grid.attach(obox, 2, current_line, 1, 1) grid.attach(obox, 2, current_line, 1, 1)

View File

@ -132,7 +132,7 @@ class EditAttributeRoot(EditSecondary):
label = str(attrib.get_type()) label = str(attrib.get_type())
if not label.strip(): if not label.strip():
label = _("New Attribute") label = _("New Attribute")
label = "%s: %s" % (_('Attribute'),label) label = _("%s: %s") % (_('Attribute'), label)
return (label, _('Attribute Editor')) return (label, _('Attribute Editor'))
def save(self,*obj): def save(self,*obj):

View File

@ -941,13 +941,15 @@ class EditFamily(EditPrimary):
if birth: if birth:
#if event changes it view needs to update #if event changes it view needs to update
self.callman.register_handles({'event': [birth.get_handle()]}) self.callman.register_handles({'event': [birth.get_handle()]})
birth_label.set_label("%s:" % birth.get_type()) # translators: needed for French, ignore otherwise
birth_label.set_label(_("%s:") % birth.get_type())
death = get_death_or_fallback(db, person) death = get_death_or_fallback(db, person)
if death: if death:
#if event changes it view needs to update #if event changes it view needs to update
self.callman.register_handles({'event': [death.get_handle()]}) self.callman.register_handles({'event': [death.get_handle()]})
death_label.set_label("%s:" % death.get_type()) # translators: needed for French, ignore otherwise
death_label.set_label(_("%s:") % death.get_type())
btn_edit.set_tooltip_text(_('Edit %s') % name) btn_edit.set_tooltip_text(_('Edit %s') % name)
btn_index.hide() btn_index.hide()

View File

@ -176,17 +176,17 @@ class MergePerson(ManagedWindow):
title.set_property('weight', Pango.Weight.BOLD) title.set_property('weight', Pango.Weight.BOLD)
title.set_property('scale', 1.2) title.set_property('scale', 1.2)
self.add(tobj, title, name_displayer.display(person)) self.add(tobj, title, name_displayer.display(person))
self.add(tobj, normal, "%s:\t%s" % (_('ID'), self.add(tobj, normal, _("%s:\t%s") % (_('ID'),
person.get_gramps_id())) person.get_gramps_id()))
self.add(tobj, normal, "%s:\t%s" % (_('Gender'), self.add(tobj, normal, _("%s:\t%s") % (_('Gender'),
sex[person.get_gender()])) sex[person.get_gender()]))
bref = person.get_birth_ref() bref = person.get_birth_ref()
if bref: if bref:
self.add(tobj, normal, "%s:\t%s" % (_('Birth'), self.add(tobj, normal, _("%s:\t%s") % (_('Birth'),
self.get_event_info(bref.ref))) self.get_event_info(bref.ref)))
dref = person.get_death_ref() dref = person.get_death_ref()
if dref: if dref:
self.add(tobj, normal, "%s:\t%s" % (_('Death'), self.add(tobj, normal, _("%s:\t%s") % (_('Death'),
self.get_event_info(dref.ref))) self.get_event_info(dref.ref)))
nlist = person.get_alternate_names() nlist = person.get_alternate_names()
@ -205,7 +205,8 @@ class MergePerson(ManagedWindow):
name = str( name = str(
self.database.get_event_from_handle(event_handle).get_type()) self.database.get_event_from_handle(event_handle).get_type())
if role.is_primary(): if role.is_primary():
self.add(tobj, normal, "%s:\t%s" % # translators: needed for French, ignore otherwise
self.add(tobj, normal, _("%s:\t%s") %
(name, self.get_event_info(event_handle))) (name, self.get_event_info(event_handle)))
else: else:
self.add(tobj, normal, "%s (%s):\t%s" % self.add(tobj, normal, "%s (%s):\t%s" %
@ -216,11 +217,11 @@ class MergePerson(ManagedWindow):
self.add(tobj, title, _("Parents")) self.add(tobj, title, _("Parents"))
for fid in person.get_parent_family_handle_list(): for fid in person.get_parent_family_handle_list():
(fname, mname, gid) = self.get_parent_info(fid) (fname, mname, gid) = self.get_parent_info(fid)
self.add(tobj, normal, "%s:\t%s" % (_('Family ID'), gid)) self.add(tobj, normal, _("%s:\t%s") % (_('Family ID'), gid))
if fname: if fname:
self.add(tobj, indent, "%s:\t%s" % (_('Father'), fname)) self.add(tobj, indent, _("%s:\t%s") % (_('Father'), fname))
if mname: if mname:
self.add(tobj, indent, "%s:\t%s" % (_('Mother'), mname)) self.add(tobj, indent, _("%s:\t%s") % (_('Mother'), mname))
else: else:
self.add(tobj, normal, _("No parents found")) self.add(tobj, normal, _("No parents found"))
@ -230,22 +231,22 @@ class MergePerson(ManagedWindow):
for fid in slist: for fid in slist:
(fname, mname, pid) = self.get_parent_info(fid) (fname, mname, pid) = self.get_parent_info(fid)
family = self.database.get_family_from_handle(fid) family = self.database.get_family_from_handle(fid)
self.add(tobj, normal, "%s:\t%s" % (_('Family ID'), pid)) self.add(tobj, normal, _("%s:\t%s") % (_('Family ID'), pid))
spouse_id = utils.find_spouse(person, family) spouse_id = utils.find_spouse(person, family)
if spouse_id: if spouse_id:
spouse = self.database.get_person_from_handle(spouse_id) spouse = self.database.get_person_from_handle(spouse_id)
self.add(tobj, indent, "%s:\t%s" % (_('Spouse'), self.add(tobj, indent, _("%s:\t%s") % (_('Spouse'),
name_of(spouse))) name_of(spouse)))
relstr = str(family.get_relationship()) relstr = str(family.get_relationship())
self.add(tobj, indent, "%s:\t%s" % (_('Type'), relstr)) self.add(tobj, indent, _("%s:\t%s") % (_('Type'), relstr))
event = utils.find_marriage(self.database, family) event = utils.find_marriage(self.database, family)
if event: if event:
self.add(tobj, indent, "%s:\t%s" % ( self.add(tobj, indent, _("%s:\t%s") % (
_('Marriage'), _('Marriage'),
self.get_event_info(event.get_handle()))) self.get_event_info(event.get_handle())))
for child_ref in family.get_child_ref_list(): for child_ref in family.get_child_ref_list():
child = self.database.get_person_from_handle(child_ref.ref) child = self.database.get_person_from_handle(child_ref.ref)
self.add(tobj, indent, "%s:\t%s" % (_('Child'), self.add(tobj, indent, _("%s:\t%s") % (_('Child'),
name_of(child))) name_of(child)))
else: else:
self.add(tobj, normal, _("No spouses or children found")) self.add(tobj, normal, _("No spouses or children found"))

View File

@ -674,7 +674,7 @@ class PluginTrace(ManagedWindow):
def __init__(self, uistate, track, data, name): def __init__(self, uistate, track, data, name):
self.name = name self.name = name
title = "%s: %s" % (_("Plugin Error"), name) title = _("%s: %s") % (_("Plugin Error"), name)
ManagedWindow.__init__(self, uistate, track, self) ManagedWindow.__init__(self, uistate, track, self)
self.set_window(Gtk.Dialog("", uistate.window, self.set_window(Gtk.Dialog("", uistate.window,

View File

@ -320,7 +320,7 @@ class ReportDialog(ManagedWindow):
return return
# Styles Frame # Styles Frame
label = Gtk.Label(label="%s:" % _("Style")) label = Gtk.Label(label=_("%s:") % _("Style"))
label.set_halign(Gtk.Align.START) label.set_halign(Gtk.Align.START)
self.style_menu = StyleComboBox() self.style_menu = StyleComboBox()
@ -372,7 +372,8 @@ class ReportDialog(ManagedWindow):
for (text, widget) in self.widgets: for (text, widget) in self.widgets:
widget.set_hexpand(True) widget.set_hexpand(True)
if text: if text:
text_widget = Gtk.Label(label="%s:" % text) # translators: needed for French, ignore otherwise
text_widget = Gtk.Label(label=_("%s:") % text)
text_widget.set_halign(Gtk.Align.START) text_widget.set_halign(Gtk.Align.START)
grid.attach(text_widget, 1, row, 1, 1) grid.attach(text_widget, 1, row, 1, 1)
grid.attach(widget, 2, row, 1, 1) grid.attach(widget, 2, row, 1, 1)
@ -396,7 +397,7 @@ class ReportDialog(ManagedWindow):
for (text, widget) in flist: for (text, widget) in flist:
widget.set_hexpand(True) widget.set_hexpand(True)
if text: if text:
text_widget = Gtk.Label(label='%s:' % text) text_widget = Gtk.Label(label=_('%s:') % text)
text_widget.set_halign(Gtk.Align.START) text_widget.set_halign(Gtk.Align.START)
grid.attach(text_widget, 1, row, 1, 1) grid.attach(text_widget, 1, row, 1, 1)
if isinstance(widget, GuiTextOption): if isinstance(widget, GuiTextOption):
@ -467,7 +468,7 @@ class ReportDialog(ManagedWindow):
directory should be used.""" directory should be used."""
# Save Frame # Save Frame
self.doc_label = Gtk.Label(label="%s:" % _("Filename")) self.doc_label = Gtk.Label(label=_("%s:") % _("Filename"))
self.doc_label.set_halign(Gtk.Align.START) self.doc_label.set_halign(Gtk.Align.START)
self.grid.attach(self.doc_label, 1, self.row, 1, 1) self.grid.attach(self.doc_label, 1, self.row, 1, 1)
@ -615,7 +616,7 @@ class ReportDialog(ManagedWindow):
widget, has_label = make_gui_option(option, self.dbstate, widget, has_label = make_gui_option(option, self.dbstate,
self.uistate, self.track) self.uistate, self.track)
if has_label: if has_label:
widget_text = Gtk.Label('%s:' % option.get_label()) widget_text = Gtk.Label(_('%s:') % option.get_label())
widget_text.set_halign(Gtk.Align.START) widget_text.set_halign(Gtk.Align.START)
self.grid.attach(widget_text, 1, self.row, 1, 1) self.grid.attach(widget_text, 1, self.row, 1, 1)
self.doc_widgets.append(widget_text) self.doc_widgets.append(widget_text)

View File

@ -354,7 +354,7 @@ class NavigationView(PageView):
dialog.vbox.set_spacing(10) dialog.vbox.set_spacing(10)
dialog.vbox.set_border_width(12) dialog.vbox.set_border_width(12)
hbox = Gtk.Box() hbox = Gtk.Box()
hbox.pack_start(Gtk.Label(label="%s: " % _('ID')), True, True, 0) hbox.pack_start(Gtk.Label(label=_("%s: ") % _('ID')), True, True, 0)
text = Gtk.Entry() text = Gtk.Entry()
text.set_activates_default(True) text.set_activates_default(True)
hbox.pack_start(text, False, True, 0) hbox.pack_start(text, False, True, 0)

View File

@ -80,7 +80,8 @@ class LogGramplet(Gramplet):
continue continue
self.last_log = (ltype, action, handle) self.last_log = (ltype, action, handle)
self.timestamp() self.timestamp()
self.append_text("%s: " % _(action)) # translators: needed for French, ignore otherwise
self.append_text(_("%s: ") % _(action))
if action == 'Deleted': if action == 'Deleted':
transaction = self.dbstate.db.transaction transaction = self.dbstate.db.transaction
if ltype == 'Person': if ltype == 'Person':

View File

@ -102,43 +102,43 @@ class StatsGramplet(Gramplet):
'Filter', 'all people') 'Filter', 'all people')
self.append_text(" %s" % database.get_number_of_people()) self.append_text(" %s" % database.get_number_of_people())
self.append_text("\n") self.append_text("\n")
self.link("%s:" % _("Males"), 'Filter', 'males') self.link(_("%s:") % _("Males"), 'Filter', 'males')
self.append_text(" %s" % males) self.append_text(" %s" % males)
self.append_text("\n") self.append_text("\n")
self.link("%s:" % _("Females"), 'Filter', 'females') self.link(_("%s:") % _("Females"), 'Filter', 'females')
self.append_text(" %s" % females) self.append_text(" %s" % females)
self.append_text("\n") self.append_text("\n")
self.link("%s:" % _("Individuals with unknown gender"), self.link(_("%s:") % _("Individuals with unknown gender"),
'Filter', 'people with unknown gender') 'Filter', 'people with unknown gender')
self.append_text(" %s" % unknowns) self.append_text(" %s" % unknowns)
self.append_text("\n") self.append_text("\n")
self.append_text("\n%s\n" % _("Family Information")) self.append_text("\n%s\n" % _("Family Information"))
self.append_text("----------------------------\n") self.append_text("----------------------------\n")
self.link("%s:" % _("Number of families"), self.link(_("%s:") % _("Number of families"),
'Filter', 'all families') 'Filter', 'all families')
self.append_text(" %s" % database.get_number_of_families()) self.append_text(" %s" % database.get_number_of_families())
self.append_text("\n") self.append_text("\n")
if hasattr(database, 'surname_list'): if hasattr(database, 'surname_list'):
self.link("%s:" % _("Unique surnames"), self.link(_("%s:") % _("Unique surnames"),
'Filter', 'unique surnames') 'Filter', 'unique surnames')
self.append_text(" %s" % len(set(database.surname_list))) self.append_text(" %s" % len(set(database.surname_list)))
self.append_text("\n") self.append_text("\n")
self.append_text("\n%s\n" % _("Media Objects")) self.append_text("\n%s\n" % _("Media Objects"))
self.append_text("----------------------------\n") self.append_text("----------------------------\n")
self.link("%s:" % _("Total number of media object references"), self.link(_("%s:") % _("Total number of media object references"),
'Filter', 'media references') 'Filter', 'media references')
self.append_text(" %s" % total_media) self.append_text(" %s" % total_media)
self.append_text("\n") self.append_text("\n")
self.link("%s:" % _("Number of unique media objects"), self.link(_("%s:") % _("Number of unique media objects"),
'Filter', 'unique media') 'Filter', 'unique media')
self.append_text(" %s" % mobjects) self.append_text(" %s" % mobjects)
self.append_text("\n") self.append_text("\n")
self.link("%s:" % _("Total size of media objects"), self.link(_("%s:") % _("Total size of media objects"),
'Filter', 'media by size') 'Filter', 'media by size')
self.append_text(" %s %s" % (mbytes, _("Megabyte|MB"))) self.append_text(" %s %s" % (mbytes, _("Megabyte|MB")))
self.append_text("\n") self.append_text("\n")
self.link("%s:" % _("Missing Media Objects"), self.link(_("%s:") % _("Missing Media Objects"),
'Filter', 'missing media') 'Filter', 'missing media')
self.append_text(" %s\n" % len(notfound)) self.append_text(" %s\n" % len(notfound))
self.append_text("", scroll_to="begin") self.append_text("", scroll_to="begin")

View File

@ -535,7 +535,7 @@ class RelationshipView(NavigationView):
if family_handle: if family_handle:
self.write_parents(family_handle, person) self.write_parents(family_handle, person)
else: else:
self.write_label("%s:" % _('Parents'), None, True, person) self.write_label(_("%s:") % _('Parents'), None, True, person)
self.row += 1 self.row += 1
family_handle_list = person.get_family_handle_list() family_handle_list = person.get_family_handle_list()
@ -599,7 +599,7 @@ class RelationshipView(NavigationView):
self._set_draggable_person(eventbox, person.get_handle()) self._set_draggable_person(eventbox, person.get_handle())
# Gramps ID # Gramps ID
subgrid.attach(widgets.BasicLabel("%s:" % _('ID')), 1, 0, 1, 1) subgrid.attach(widgets.BasicLabel(_("%s:") % _('ID')), 1, 0, 1, 1)
label = widgets.BasicLabel(person.gramps_id) label = widgets.BasicLabel(person.gramps_id)
label.set_hexpand(True) label.set_hexpand(True)
subgrid.attach(label, 2, 0, 1, 1) subgrid.attach(label, 2, 0, 1, 1)
@ -611,7 +611,7 @@ class RelationshipView(NavigationView):
else: else:
birth_title = _("Birth") birth_title = _("Birth")
subgrid.attach(widgets.BasicLabel("%s:" % birth_title), 1, 1, 1, 1) subgrid.attach(widgets.BasicLabel(_("%s:") % birth_title), 1, 1, 1, 1)
subgrid.attach(widgets.BasicLabel(self.format_event(birth)), 2, 1, 1, 1) subgrid.attach(widgets.BasicLabel(self.format_event(birth)), 2, 1, 1, 1)
death = get_death_or_fallback(self.dbstate.db, person) death = get_death_or_fallback(self.dbstate.db, person)
@ -628,7 +628,7 @@ class RelationshipView(NavigationView):
death_date = death.get_date_object() death_date = death.get_date_object()
if (death_date and death_date.get_valid()): if (death_date and death_date.get_valid()):
age = death_date - birth_date age = death_date - birth_date
subgrid.attach(widgets.BasicLabel("%s:" % death_title), subgrid.attach(widgets.BasicLabel(_("%s:") % death_title),
1, 2, 1, 1) 1, 2, 1, 1)
subgrid.attach(widgets.BasicLabel("%s (%s)" % subgrid.attach(widgets.BasicLabel("%s (%s)" %
(self.format_event(death), age), (self.format_event(death), age),
@ -638,12 +638,12 @@ class RelationshipView(NavigationView):
if not showed_death: if not showed_death:
age = Today() - birth_date age = Today() - birth_date
if probably_alive(person, self.dbstate.db): if probably_alive(person, self.dbstate.db):
subgrid.attach(widgets.BasicLabel("%s:" % _("Alive")), subgrid.attach(widgets.BasicLabel(_("%s:") % _("Alive")),
1, 2, 1, 1) 1, 2, 1, 1)
subgrid.attach(widgets.BasicLabel("(%s)" % age, Pango.EllipsizeMode.END), subgrid.attach(widgets.BasicLabel("(%s)" % age, Pango.EllipsizeMode.END),
2, 2, 1, 1) 2, 2, 1, 1)
else: else:
subgrid.attach(widgets.BasicLabel("%s:" % _("Death")), subgrid.attach(widgets.BasicLabel(_("%s:") % _("Death")),
1, 2, 1, 1) 1, 2, 1, 1)
subgrid.attach(widgets.BasicLabel("%s (%s)" % (_("unknown"), age), subgrid.attach(widgets.BasicLabel("%s (%s)" % (_("unknown"), age),
Pango.EllipsizeMode.END), Pango.EllipsizeMode.END),
@ -651,7 +651,7 @@ class RelationshipView(NavigationView):
showed_death = True showed_death = True
if not showed_death: if not showed_death:
subgrid.attach(widgets.BasicLabel("%s:" % death_title), subgrid.attach(widgets.BasicLabel(_("%s:") % death_title),
1, 2, 1, 1) 1, 2, 1, 1)
subgrid.attach(widgets.BasicLabel(self.format_event(death)), subgrid.attach(widgets.BasicLabel(self.format_event(death)),
2, 2, 1, 1) 2, 2, 1, 1)
@ -859,7 +859,7 @@ class RelationshipView(NavigationView):
return return
if person and self.check_collapsed(person.handle, family_handle): if person and self.check_collapsed(person.handle, family_handle):
# don't show rest # don't show rest
self.write_label("%s:" % _('Parents'), family, True, person) self.write_label(_("%s:") % _('Parents'), family, True, person)
self.row -= 1 # back up one row for summary names self.row -= 1 # back up one row for summary names
active = self.get_active() active = self.get_active()
child_list = [ref.ref for ref in family.get_child_ref_list() child_list = [ref.ref for ref in family.get_child_ref_list()
@ -895,7 +895,7 @@ class RelationshipView(NavigationView):
_PDATA_STOP-_PDATA_START, 1) _PDATA_STOP-_PDATA_START, 1)
self.row += 1 # now advance it self.row += 1 # now advance it
else: else:
self.write_label("%s:" % _('Parents'), family, True, person) self.write_label(_("%s:") % _('Parents'), family, True, person)
self.write_person(_('Father'), family.get_father_handle()) self.write_person(_('Father'), family.get_father_handle())
self.write_person(_('Mother'), family.get_mother_handle()) self.write_person(_('Mother'), family.get_mother_handle())
@ -1375,7 +1375,7 @@ class RelationshipView(NavigationView):
# collapse button # collapse button
if self.check_collapsed(person.handle, family_handle): if self.check_collapsed(person.handle, family_handle):
# show "> Family: ..." and nothing else # show "> Family: ..." and nothing else
self.write_label("%s:" % _('Family'), family, False, person) self.write_label(_("%s:") % _('Family'), family, False, person)
self.row -= 1 # back up self.row -= 1 # back up
child_list = family.get_child_ref_list() child_list = family.get_child_ref_list()
if child_list: if child_list:
@ -1399,7 +1399,7 @@ class RelationshipView(NavigationView):
self.row += 1 # now advance it self.row += 1 # now advance it
else: else:
# show "V Family: ..." and the rest # show "V Family: ..." and the rest
self.write_label("%s:" % _('Family'), family, False, person) self.write_label(_("%s:") % _('Family'), family, False, person)
if (handle or if (handle or
family.get_relationship() != FamilyRelType.UNKNOWN): family.get_relationship() != FamilyRelType.UNKNOWN):
box = self.write_person(_('Spouse'), handle) box = self.write_person(_('Spouse'), handle)