enable translated output for this report
svn: r22132
This commit is contained in:
parent
bdafcda182
commit
eca2313b31
@ -56,7 +56,6 @@ _ = glocale.translation.gettext
|
|||||||
from gramps.gen.lib import EventRoleType, EventType, Person
|
from gramps.gen.lib import EventRoleType, EventType, Person
|
||||||
from gramps.gen.utils.file import media_path_full
|
from gramps.gen.utils.file import media_path_full
|
||||||
from gramps.gui.thumbnails import get_thumbnail_path
|
from gramps.gui.thumbnails import get_thumbnail_path
|
||||||
from gramps.gen.datehandler import displayer as _dd
|
|
||||||
from gramps.gen.plug.report import Report
|
from gramps.gen.plug.report import Report
|
||||||
from gramps.gen.plug.report import utils as ReportUtils
|
from gramps.gen.plug.report import utils as ReportUtils
|
||||||
from gramps.gen.plug.report import MenuReportOptions
|
from gramps.gen.plug.report import MenuReportOptions
|
||||||
@ -143,6 +142,8 @@ class FamilyLinesOptions(MenuReportOptions):
|
|||||||
'"family lines".'))
|
'"family lines".'))
|
||||||
add_option('removeextra', remove_extra_people)
|
add_option('removeextra', remove_extra_people)
|
||||||
|
|
||||||
|
stdoptions.add_localization_option(menu, category_name)
|
||||||
|
|
||||||
# ----------------------------
|
# ----------------------------
|
||||||
add_option = partial(menu.add_option, _('Family Colors'))
|
add_option = partial(menu.add_option, _('Family Colors'))
|
||||||
# ----------------------------
|
# ----------------------------
|
||||||
@ -360,6 +361,8 @@ class FamilyLinesReport(Report):
|
|||||||
if name_format != 0:
|
if name_format != 0:
|
||||||
self._name_display.set_default_format(name_format)
|
self._name_display.set_default_format(name_format)
|
||||||
|
|
||||||
|
self.set_locale(menu.get_option_by_name('trans').get_value())
|
||||||
|
|
||||||
# convert the 'surnamecolors' string to a dictionary of names and colors
|
# convert the 'surnamecolors' string to a dictionary of names and colors
|
||||||
self._surnamecolors = {}
|
self._surnamecolors = {}
|
||||||
tmp = get_value('surnamecolors')
|
tmp = get_value('surnamecolors')
|
||||||
@ -761,7 +764,7 @@ class FamilyLinesReport(Report):
|
|||||||
if self._just_years and date.get_year_valid():
|
if self._just_years and date.get_year_valid():
|
||||||
birthStr = '%i' % date.get_year()
|
birthStr = '%i' % date.get_year()
|
||||||
else:
|
else:
|
||||||
birthStr = _dd.display(date)
|
birthStr = self._get_date(date)
|
||||||
|
|
||||||
# get birth place (one of: city, state, or country) we can use
|
# get birth place (one of: city, state, or country) we can use
|
||||||
birthplace = None
|
birthplace = None
|
||||||
@ -785,7 +788,7 @@ class FamilyLinesReport(Report):
|
|||||||
if self._just_years and date.get_year_valid():
|
if self._just_years and date.get_year_valid():
|
||||||
deathStr = '%i' % date.get_year()
|
deathStr = '%i' % date.get_year()
|
||||||
else:
|
else:
|
||||||
deathStr = _dd.display(date)
|
deathStr = self._get_date(date)
|
||||||
|
|
||||||
# get death place (one of: city, state, or country) we can use
|
# get death place (one of: city, state, or country) we can use
|
||||||
deathplace = None
|
deathplace = None
|
||||||
@ -812,7 +815,7 @@ class FamilyLinesReport(Report):
|
|||||||
if mediaMimeType[0:5] == "image":
|
if mediaMimeType[0:5] == "image":
|
||||||
imagePath = get_thumbnail_path(
|
imagePath = get_thumbnail_path(
|
||||||
media_path_full(self._db,
|
media_path_full(self._db,
|
||||||
media.get_path()),
|
media.get_path()),
|
||||||
rectangle=mediaList[0].get_rectangle())
|
rectangle=mediaList[0].get_rectangle())
|
||||||
|
|
||||||
# put the label together and output this person
|
# put the label together and output this person
|
||||||
@ -821,7 +824,8 @@ class FamilyLinesReport(Report):
|
|||||||
if bUseHtmlOutput:
|
if bUseHtmlOutput:
|
||||||
lineDelimiter = '<BR/>'
|
lineDelimiter = '<BR/>'
|
||||||
|
|
||||||
# if we have an image, then start an HTML table; remember to close the table afterwards!
|
# if we have an image, then start an HTML table;
|
||||||
|
# remember to close the table afterwards!
|
||||||
if imagePath:
|
if imagePath:
|
||||||
label = ('<TABLE BORDER="0" CELLSPACING="2" CELLPADDING="0" '
|
label = ('<TABLE BORDER="0" CELLSPACING="2" CELLPADDING="0" '
|
||||||
'CELLBORDER="0"><TR><TD><IMG SRC="%s"/></TD>'
|
'CELLBORDER="0"><TR><TD><IMG SRC="%s"/></TD>'
|
||||||
@ -911,7 +915,7 @@ class FamilyLinesReport(Report):
|
|||||||
if self._just_years and date.get_year_valid():
|
if self._just_years and date.get_year_valid():
|
||||||
weddingDate = '%i' % date.get_year()
|
weddingDate = '%i' % date.get_year()
|
||||||
else:
|
else:
|
||||||
weddingDate = _dd.display(date)
|
weddingDate = self._get_date(date)
|
||||||
# get the wedding location
|
# get the wedding location
|
||||||
if self._incplaces:
|
if self._incplaces:
|
||||||
place = self._db.get_place_from_handle(event.get_place_handle())
|
place = self._db.get_place_from_handle(event.get_place_handle())
|
||||||
@ -932,7 +936,7 @@ class FamilyLinesReport(Report):
|
|||||||
# if child_count == 1:
|
# if child_count == 1:
|
||||||
# childrenStr = _('1 child')
|
# childrenStr = _('1 child')
|
||||||
if child_count > 1:
|
if child_count > 1:
|
||||||
childrenStr = _('%d children') % child_count
|
childrenStr = self._('%d children') % child_count
|
||||||
|
|
||||||
label = ''
|
label = ''
|
||||||
if weddingDate:
|
if weddingDate:
|
||||||
|
Loading…
Reference in New Issue
Block a user