7276: translate some currently-untranslated punctuation marks

This commit is contained in:
Jérôme Rapinat 2016-12-23 12:59:06 -08:00 committed by Paul Franklin
parent f3053b19ca
commit 85e437d291
8 changed files with 1465 additions and 1391 deletions

View File

@ -398,9 +398,10 @@ class CommandLineReport:
father = self.database.get_person_from_handle(fhandle)
if father:
fname = name_displayer.display(father)
# translators: needed for French and Arabic, else ignore
text = _("%s:\t%s, %s") % (family.get_gramps_id(),
fname, mname)
# translators: needed for French, Hebrew and Arabic
text = _("%(id)s:\t%(father)s, %(mother)s"
) % {'id': family.get_gramps_id(),
'father': fname, 'mother': mname}
id_list.append(text)
self.options_help[name].append(id_list)
elif isinstance(option, NoteOption):

View File

@ -155,8 +155,10 @@ def insert_image(database, doc, photo, user,
alt=alt, style_name=style_name,
crop=photo.get_rectangle())
else:
no_file = _('File does not exist')
user.warn(_("Could not add photo to page"),
_("%s: %s") % (filename, _('File does not exist')))
_("%(str1)s: %(str2)s") % {'str1': filename,
'str2': no_file})
#-------------------------------------------------------------------------
#

View File

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

View File

@ -58,6 +58,9 @@ WIKI_HELP_PAGE = URL_MANUAL_SECT3
WIKI_HELP_SEC = _("manual|Merge_People")
_GLADE_FILE = "mergeperson.glade"
# translators: needed for French, ignore otherwise
KEYVAL = _("%(key)s:\t%(value)s")
sex = ( _("female"), _("male"), _("unknown") )
def name_of(person):
@ -176,18 +179,20 @@ class MergePerson(ManagedWindow):
title.set_property('weight', Pango.Weight.BOLD)
title.set_property('scale', 1.2)
self.add(tobj, title, name_displayer.display(person))
self.add(tobj, normal, _("%s:\t%s") % (_('ID'),
person.get_gramps_id()))
self.add(tobj, normal, _("%s:\t%s") % (_('Gender'),
sex[person.get_gender()]))
self.add(tobj, normal, KEYVAL % {'key': _('ID'),
'value': person.get_gramps_id()})
self.add(tobj, normal, KEYVAL % {'key': _('Gender'),
'value': sex[person.get_gender()]})
bref = person.get_birth_ref()
if bref:
self.add(tobj, normal, _("%s:\t%s") % (_('Birth'),
self.get_event_info(bref.ref)))
self.add(tobj, normal,
KEYVAL % {'key': _('Birth'),
'value': self.get_event_info(bref.ref)})
dref = person.get_death_ref()
if dref:
self.add(tobj, normal, _("%s:\t%s") % (_('Death'),
self.get_event_info(dref.ref)))
self.add(tobj, normal,
KEYVAL % {'key': _('Death'),
'value': self.get_event_info(dref.ref)})
nlist = person.get_alternate_names()
if len(nlist) > 0:
@ -204,24 +209,29 @@ class MergePerson(ManagedWindow):
role = event_ref.get_role()
name = str(
self.database.get_event_from_handle(event_handle).get_type())
ev_info = self.get_event_info(event_handle)
if role.is_primary():
# translators: needed for French, ignore otherwise
self.add(tobj, normal, _("%s:\t%s") %
(name, self.get_event_info(event_handle)))
self.add(tobj, normal,
KEYVAL % {'key': name, 'value': ev_info})
else:
self.add(tobj, normal, "%s (%s):\t%s" %
(name, role, self.get_event_info(event_handle)))
self.add(tobj, normal, # translators: needed for French
"%(name)s (%(role)s):\t%(info)s"
% {'name': name, 'role': role,
'info': ev_info})
plist = person.get_parent_family_handle_list()
if len(plist) > 0:
self.add(tobj, title, _("Parents"))
for fid in person.get_parent_family_handle_list():
(fname, mname, gid) = self.get_parent_info(fid)
self.add(tobj, normal, _("%s:\t%s") % (_('Family ID'), gid))
self.add(tobj, normal,
KEYVAL % {'key': _('Family ID'), 'value': gid)}
if fname:
self.add(tobj, indent, _("%s:\t%s") % (_('Father'), fname))
self.add(tobj, indent,
KEYVAL % {'key': _('Father'), 'value': fname}
if mname:
self.add(tobj, indent, _("%s:\t%s") % (_('Mother'), mname))
self.add(tobj, indent,
KEYVAL % {'key': _('Mother'), 'value': mname}
else:
self.add(tobj, normal, _("No parents found"))
@ -231,23 +241,25 @@ class MergePerson(ManagedWindow):
for fid in slist:
(fname, mname, pid) = self.get_parent_info(fid)
family = self.database.get_family_from_handle(fid)
self.add(tobj, normal, _("%s:\t%s") % (_('Family ID'), pid))
self.add(tobj, normal,
KEYVAL % {'key': _('Family ID'), 'value': pid})
spouse_id = utils.find_spouse(person, family)
if spouse_id:
spouse = self.database.get_person_from_handle(spouse_id)
self.add(tobj, indent, _("%s:\t%s") % (_('Spouse'),
name_of(spouse)))
self.add(tobj, indent, KEYVAL % {'key': _('Spouse'),
'value': name_of(spouse)))
relstr = str(family.get_relationship())
self.add(tobj, indent, _("%s:\t%s") % (_('Type'), relstr))
self.add(tobj, indent,
KEYVAL % {'key': _('Type'), 'value': relstr})
event = utils.find_marriage(self.database, family)
if event:
self.add(tobj, indent, _("%s:\t%s") % (
_('Marriage'),
self.get_event_info(event.get_handle())))
m_info = self.get_event_info(event.get_handle())
self.add(tobj, indent,
KEYVAL % {'key': _('Marriage'), 'value': m_info})
for child_ref in family.get_child_ref_list():
child = self.database.get_person_from_handle(child_ref.ref)
self.add(tobj, indent, _("%s:\t%s") % (_('Child'),
name_of(child)))
self.add(tobj, indent, KEYVAL % {'key': _('Child'),
'value': name_of(child)})
else:
self.add(tobj, normal, _("No spouses or children found"))

View File

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

View File

@ -117,7 +117,7 @@ def run_fam(database, document, family):
if document.has_data:
stab.write(sdoc)
else:
sdoc.header1(_("Not found\n"))
sdoc.header1(_("Not found") + "\n")
stab = QuickTable(sdb)
sdoc.header1(_("Personal events of the children"))
@ -131,4 +131,4 @@ def run_fam(database, document, family):
if document.has_data:
stab.write(sdoc)
else:
sdoc.header1(_("Not found\n"))
sdoc.header1(_("Not found") + "\n")

View File

@ -69,4 +69,4 @@ def run(database, document, person):
if document.has_data:
stab.write(sdoc)
else:
sdoc.header1(_("Not found\n"))
sdoc.header1(_("Not found") + "\n")

File diff suppressed because it is too large Load Diff