7276: translate some punctuation marks -- partial

This commit is contained in:
Paul Franklin 2014-03-17 08:40:58 -07:00
parent bfcf062368
commit 82078e6956
7 changed files with 24 additions and 12 deletions

View File

@ -50,6 +50,7 @@ src/gen/lib/familyreltype.py
src/gen/lib/grampstype.py
src/gen/lib/ldsord.py
src/gen/lib/markertype.py
src/gen/lib/name.py
src/gen/lib/nametype.py
src/gen/lib/nameorigintype.py
src/gen/lib/notetype.py

View File

@ -124,7 +124,6 @@ src/gen/lib/locationbase.py
src/gen/lib/mediaobj.py
src/gen/lib/mediabase.py
src/gen/lib/mediaref.py
src/gen/lib/name.py
src/gen/lib/note.py
src/gen/lib/notebase.py
src/gen/lib/personref.py

View File

@ -39,6 +39,7 @@ from gen.lib.datebase import DateBase
from gen.lib.surnamebase import SurnameBase
from gen.lib.nametype import NameType
from gen.lib.const import IDENTICAL, EQUAL, DIFFERENT
from gen.ggettext import gettext as _
#-------------------------------------------------------------------------
#
@ -401,9 +402,11 @@ class Name(SecondaryObject, PrivacyBase, SurnameBase, CitationBase, NoteBase,
first = self.first_name
surname = self.get_surname()
if self.suffix:
return "%s, %s %s" % (surname, first, self.suffix)
# translators: needed for Arabic, ignore otherwise
return _("%s, %s %s") % (surname, first, self.suffix)
else:
return "%s, %s" % (surname, first)
# translators: needed for Arabic, ignore otherwise
return _("%s, %s") % (surname, first)
def get_upper_name(self):
"""
@ -413,9 +416,11 @@ class Name(SecondaryObject, PrivacyBase, SurnameBase, CitationBase, NoteBase,
first = self.first_name
surname = self.get_surname().upper()
if self.suffix:
return "%s, %s %s" % (surname, first, self.suffix)
# translators: needed for Arabic, ignore otherwise
return _("%s, %s %s") % (surname, first, self.suffix)
else:
return "%s, %s" % (surname, first)
# translators: needed for Arabic, ignore otherwise
return _("%s, %s") % (surname, first)
def get_regular_name(self):
"""
@ -427,7 +432,8 @@ class Name(SecondaryObject, PrivacyBase, SurnameBase, CitationBase, NoteBase,
if (self.suffix == ""):
return "%s %s" % (first, surname)
else:
return "%s %s, %s" % (first, surname, self.suffix)
# translators: needed for Arabic, ignore otherwise
return _("%s %s, %s") % (first, surname, self.suffix)
def get_gedcom_parts(self):
"""

View File

@ -230,7 +230,8 @@ def get_address_str(addr):
if str == "":
str = info
else:
str = "%s, %s" % (str, info)
# translators: needed for Arabic, ignore otherwise
str = _("%s, %s") % (str, info)
return str
#-------------------------------------------------------------------------

View File

@ -380,7 +380,8 @@ class DetAncestorReport(Report):
date = addr.get_date_object().get_year()
if date:
self.doc.write_text( '%s, ' % date )
# translators: needed for Arabic, ignore otherwise
self.doc.write_text(self._('%s, ') % date )
self.doc.write_text( text )
self.doc.write_text_citation( self.endnotes(addr) )
self.doc.end_paragraph()

View File

@ -833,7 +833,8 @@ class DetDescendantReport(Report):
self.doc.write_text(self._('Address: '))
if date:
self.doc.write_text( '%s, ' % date )
# translators: needed for Arabic, ignore otherwise
self.doc.write_text(self._('%s, ') % date )
self.doc.write_text( text )
self.doc.write_text_citation( self.endnotes(addr) )
self.doc.end_paragraph()

View File

@ -262,11 +262,14 @@ class Verify(tool.Tool, ManagedWindow, UpdateCallback):
# print data for the user, no GUI
(msg,gramps_id, name, the_type, rule_id, severity, handle) = results
if severity == Rule.WARNING:
print "W: %s, %s: %s, %s" % (msg,the_type, gramps_id, name)
# translators: needed for Arabic, ignore otherwise
print _("W: %s, %s: %s, %s") % (msg, the_type, gramps_id, name)
elif severity == Rule.ERROR:
print "E: %s, %s: %s, %s" % (msg,the_type,gramps_id, name)
# translators: needed for Arabic, ignore otherwise
print _("E: %s, %s: %s, %s") % (msg, the_type, gramps_id, name)
else:
print "S: %s, %s: %s, %s" % (msg,the_type,gramps_id, name)
# translators: needed for Arabic, ignore otherwise
print _("S: %s, %s: %s, %s") % (msg, the_type,gramps_id, name)
def init_gui(self):
# Draw dialog and make it handle everything