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) father = self.database.get_person_from_handle(fhandle)
if father: if father:
fname = name_displayer.display(father) fname = name_displayer.display(father)
# translators: needed for French and Arabic, else ignore # translators: needed for French, Hebrew and Arabic
text = _("%s:\t%s, %s") % (family.get_gramps_id(), text = _("%(id)s:\t%(father)s, %(mother)s"
fname, mname) ) % {'id': family.get_gramps_id(),
'father': fname, 'mother': mname}
id_list.append(text) id_list.append(text)
self.options_help[name].append(id_list) self.options_help[name].append(id_list)
elif isinstance(option, NoteOption): elif isinstance(option, NoteOption):

View File

@ -155,8 +155,10 @@ def insert_image(database, doc, photo, user,
alt=alt, style_name=style_name, alt=alt, style_name=style_name,
crop=photo.get_rectangle()) crop=photo.get_rectangle())
else: else:
no_file = _('File does not exist')
user.warn(_("Could not add photo to page"), 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()) 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 = _("%(str1)s: %(str2)s") % {'str1': _('Attribute'),
'str2': label}
return (label, _('Attribute Editor')) return (label, _('Attribute Editor'))
def save(self,*obj): def save(self,*obj):

View File

@ -58,6 +58,9 @@ WIKI_HELP_PAGE = URL_MANUAL_SECT3
WIKI_HELP_SEC = _("manual|Merge_People") WIKI_HELP_SEC = _("manual|Merge_People")
_GLADE_FILE = "mergeperson.glade" _GLADE_FILE = "mergeperson.glade"
# translators: needed for French, ignore otherwise
KEYVAL = _("%(key)s:\t%(value)s")
sex = ( _("female"), _("male"), _("unknown") ) sex = ( _("female"), _("male"), _("unknown") )
def name_of(person): def name_of(person):
@ -176,18 +179,20 @@ 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, KEYVAL % {'key': _('ID'),
person.get_gramps_id())) 'value': person.get_gramps_id()})
self.add(tobj, normal, _("%s:\t%s") % (_('Gender'), self.add(tobj, normal, KEYVAL % {'key': _('Gender'),
sex[person.get_gender()])) 'value': 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,
self.get_event_info(bref.ref))) KEYVAL % {'key': _('Birth'),
'value': 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,
self.get_event_info(dref.ref))) KEYVAL % {'key': _('Death'),
'value': self.get_event_info(dref.ref)})
nlist = person.get_alternate_names() nlist = person.get_alternate_names()
if len(nlist) > 0: if len(nlist) > 0:
@ -204,24 +209,29 @@ class MergePerson(ManagedWindow):
role = event_ref.get_role() role = event_ref.get_role()
name = str( name = str(
self.database.get_event_from_handle(event_handle).get_type()) self.database.get_event_from_handle(event_handle).get_type())
ev_info = self.get_event_info(event_handle)
if role.is_primary(): if role.is_primary():
# translators: needed for French, ignore otherwise self.add(tobj, normal,
self.add(tobj, normal, _("%s:\t%s") % KEYVAL % {'key': name, 'value': ev_info})
(name, self.get_event_info(event_handle)))
else: else:
self.add(tobj, normal, "%s (%s):\t%s" % self.add(tobj, normal, # translators: needed for French
(name, role, self.get_event_info(event_handle))) "%(name)s (%(role)s):\t%(info)s"
% {'name': name, 'role': role,
'info': ev_info})
plist = person.get_parent_family_handle_list() plist = person.get_parent_family_handle_list()
if len(plist) > 0: if len(plist) > 0:
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,
KEYVAL % {'key': _('Family ID'), 'value': gid)}
if fname: if fname:
self.add(tobj, indent, _("%s:\t%s") % (_('Father'), fname)) self.add(tobj, indent,
KEYVAL % {'key': _('Father'), 'value': fname}
if mname: if mname:
self.add(tobj, indent, _("%s:\t%s") % (_('Mother'), mname)) self.add(tobj, indent,
KEYVAL % {'key': _('Mother'), 'value': mname}
else: else:
self.add(tobj, normal, _("No parents found")) self.add(tobj, normal, _("No parents found"))
@ -231,23 +241,25 @@ 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,
KEYVAL % {'key': _('Family ID'), 'value': 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, KEYVAL % {'key': _('Spouse'),
name_of(spouse))) 'value': 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,
KEYVAL % {'key': _('Type'), 'value': 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") % ( m_info = self.get_event_info(event.get_handle())
_('Marriage'), self.add(tobj, indent,
self.get_event_info(event.get_handle()))) KEYVAL % {'key': _('Marriage'), 'value': m_info})
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, KEYVAL % {'key': _('Child'),
name_of(child))) 'value': 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,8 @@ 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 = _("%(str1)s: %(str2)s"
) % {'str1': _("Plugin Error"), 'str2': 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

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

File diff suppressed because it is too large Load Diff