Fixed event types not being translated in IndividualPages, Events section. Made some spacial alignment in eventtypes.py for better visual aid.
svn: r13748
This commit is contained in:
parent
072826bc90
commit
c544e79b22
@ -139,52 +139,52 @@ class EventType(GrampsType):
|
|||||||
_DEFAULT = BIRTH
|
_DEFAULT = BIRTH
|
||||||
|
|
||||||
_DATAMAP = [
|
_DATAMAP = [
|
||||||
(UNKNOWN , _("Unknown"), "Unknown"),
|
(UNKNOWN , _("Unknown"), "Unknown"),
|
||||||
(CUSTOM , _("Custom"), "Custom"),
|
(CUSTOM , _("Custom"), "Custom"),
|
||||||
(ADOPT , _("Adopted"), "Adopted"),
|
(ADOPT , _("Adopted"), "Adopted"),
|
||||||
(BIRTH , _("Birth"), "Birth"),
|
(BIRTH , _("Birth"), "Birth"),
|
||||||
(DEATH , _("Death"), "Death"),
|
(DEATH , _("Death"), "Death"),
|
||||||
(ADULT_CHRISTEN , _("Adult Christening"), "Adult Christening"),
|
(ADULT_CHRISTEN , _("Adult Christening"), "Adult Christening"),
|
||||||
(BAPTISM , _("Baptism"), "Baptism"),
|
(BAPTISM , _("Baptism"), "Baptism"),
|
||||||
(BAR_MITZVAH , _("Bar Mitzvah"), "Bar Mitzvah"),
|
(BAR_MITZVAH , _("Bar Mitzvah"), "Bar Mitzvah"),
|
||||||
(BAS_MITZVAH , _("Bas Mitzvah"), "Bas Mitzvah"),
|
(BAS_MITZVAH , _("Bas Mitzvah"), "Bas Mitzvah"),
|
||||||
(BLESS , _("Blessing"), "Blessing"),
|
(BLESS , _("Blessing"), "Blessing"),
|
||||||
(BURIAL , _("Burial"), "Burial"),
|
(BURIAL , _("Burial"), "Burial"),
|
||||||
(CAUSE_DEATH , _("Cause Of Death"), "Cause Of Death"),
|
(CAUSE_DEATH , _("Cause Of Death"), "Cause Of Death"),
|
||||||
(CENSUS , _("Census"), "Census"),
|
(CENSUS , _("Census"), "Census"),
|
||||||
(CHRISTEN , _("Christening"), "Christening"),
|
(CHRISTEN , _("Christening"), "Christening"),
|
||||||
(CONFIRMATION , _("Confirmation"), "Confirmation"),
|
(CONFIRMATION , _("Confirmation"), "Confirmation"),
|
||||||
(CREMATION , _("Cremation"), "Cremation"),
|
(CREMATION , _("Cremation"), "Cremation"),
|
||||||
(DEGREE , _("Degree"), "Degree"),
|
(DEGREE , _("Degree"), "Degree"),
|
||||||
(EDUCATION , _("Education"), "Education"),
|
(EDUCATION , _("Education"), "Education"),
|
||||||
(ELECTED , _("Elected"), "Elected"),
|
(ELECTED , _("Elected"), "Elected"),
|
||||||
(EMIGRATION , _("Emigration"), "Emigration"),
|
(EMIGRATION , _("Emigration"), "Emigration"),
|
||||||
(FIRST_COMMUN , _("First Communion"), "First Communion"),
|
(FIRST_COMMUN , _("First Communion"), "First Communion"),
|
||||||
(IMMIGRATION , _("Immigration"), "Immigration"),
|
(IMMIGRATION , _("Immigration"), "Immigration"),
|
||||||
(GRADUATION , _("Graduation"), "Graduation"),
|
(GRADUATION , _("Graduation"), "Graduation"),
|
||||||
(MED_INFO , _("Medical Information"), "Medical Information"),
|
(MED_INFO , _("Medical Information"), "Medical Information"),
|
||||||
(MILITARY_SERV , _("Military Service"), "Military Service"),
|
(MILITARY_SERV , _("Military Service"), "Military Service"),
|
||||||
(NATURALIZATION , _("Naturalization"), "Naturalization"),
|
(NATURALIZATION , _("Naturalization"), "Naturalization"),
|
||||||
(NOB_TITLE , _("Nobility Title"), "Nobility Title"),
|
(NOB_TITLE , _("Nobility Title"), "Nobility Title"),
|
||||||
(NUM_MARRIAGES , _("Number of Marriages"), "Number of Marriages"),
|
(NUM_MARRIAGES , _("Number of Marriages"), "Number of Marriages"),
|
||||||
(OCCUPATION , _("Occupation"), "Occupation"),
|
(OCCUPATION , _("Occupation"), "Occupation"),
|
||||||
(ORDINATION , _("Ordination"), "Ordination"),
|
(ORDINATION , _("Ordination"), "Ordination"),
|
||||||
(PROBATE , _("Probate"), "Probate"),
|
(PROBATE , _("Probate"), "Probate"),
|
||||||
(PROPERTY , _("Property"), "Property"),
|
(PROPERTY , _("Property"), "Property"),
|
||||||
(RELIGION , _("Religion"), "Religion"),
|
(RELIGION , _("Religion"), "Religion"),
|
||||||
(RESIDENCE , _("Residence"), "Residence"),
|
(RESIDENCE , _("Residence"), "Residence"),
|
||||||
(RETIREMENT , _("Retirement"), "Retirement"),
|
(RETIREMENT , _("Retirement"), "Retirement"),
|
||||||
(WILL , _("Will"), "Will"),
|
(WILL , _("Will"), "Will"),
|
||||||
(MARRIAGE , _("Marriage"), "Marriage"),
|
(MARRIAGE , _("Marriage"), "Marriage"),
|
||||||
(MARR_SETTL , _("Marriage Settlement"), "Marriage Settlement"),
|
(MARR_SETTL , _("Marriage Settlement"), "Marriage Settlement"),
|
||||||
(MARR_LIC , _("Marriage License"), "Marriage License"),
|
(MARR_LIC , _("Marriage License"), "Marriage License"),
|
||||||
(MARR_CONTR , _("Marriage Contract"), "Marriage Contract"),
|
(MARR_CONTR , _("Marriage Contract"), "Marriage Contract"),
|
||||||
(MARR_BANNS , _("Marriage Banns"), "Marriage Banns"),
|
(MARR_BANNS , _("Marriage Banns"), "Marriage Banns"),
|
||||||
(ENGAGEMENT , _("Engagement"), "Engagement"),
|
(ENGAGEMENT , _("Engagement"), "Engagement"),
|
||||||
(DIVORCE , _("Divorce"), "Divorce"),
|
(DIVORCE , _("Divorce"), "Divorce"),
|
||||||
(DIV_FILING , _("Divorce Filing"), "Divorce Filing"),
|
(DIV_FILING , _("Divorce Filing"), "Divorce Filing"),
|
||||||
(ANNULMENT , _("Annulment"), "Annulment"),
|
(ANNULMENT , _("Annulment"), "Annulment"),
|
||||||
(MARR_ALT , _("Alternate Marriage"), "Alternate Marriage"),
|
(MARR_ALT , _("Alternate Marriage"), "Alternate Marriage"),
|
||||||
]
|
]
|
||||||
|
|
||||||
def __init__(self, value=None):
|
def __init__(self, value=None):
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
#
|
#
|
||||||
@ -509,8 +508,6 @@ class BasePage(object):
|
|||||||
@param: evt_ref = eent reference
|
@param: evt_ref = eent reference
|
||||||
@param: showplc = show the event place or not?
|
@param: showplc = show the event place or not?
|
||||||
@param: showdescr = to show the event description or not?
|
@param: showdescr = to show the event description or not?
|
||||||
@param: showsrc = to show the event source references or not?
|
|
||||||
@param: shownote = show notes or not?
|
|
||||||
@param: up = either True or False; add subdirs or not?
|
@param: up = either True or False; add subdirs or not?
|
||||||
@param: hyp = to hyperlink the event type or not?
|
@param: hyp = to hyperlink the event type or not?
|
||||||
"""
|
"""
|
||||||
@ -518,11 +515,15 @@ class BasePage(object):
|
|||||||
|
|
||||||
# get event type
|
# get event type
|
||||||
evt_type = evt.type.xml_str()
|
evt_type = evt.type.xml_str()
|
||||||
|
for xtype in EventType._DATAMAP:
|
||||||
|
if xtype[2] == evt_type:
|
||||||
|
etype = xtype[1]
|
||||||
|
break
|
||||||
|
|
||||||
# get hyperlink or not?
|
# get hyperlink or not?
|
||||||
evt_hyper = evt_type
|
evt_hyper = etype
|
||||||
if hyp:
|
if hyp:
|
||||||
evt_hyper = self.event_link(evt_type, evt_ref.ref, gid, up)
|
evt_hyper = self.event_link(etype, evt_ref.ref, gid, up)
|
||||||
|
|
||||||
# get place name
|
# get place name
|
||||||
place = None
|
place = None
|
||||||
@ -539,8 +540,9 @@ class BasePage(object):
|
|||||||
# position 0 = translatable label, position 1 = column class
|
# position 0 = translatable label, position 1 = column class
|
||||||
# position 2 = data
|
# position 2 = data
|
||||||
info = [
|
info = [
|
||||||
[_EVENT, "Event", evt_hyper],
|
[_EVENT, "Event", evt_hyper],
|
||||||
[DHEAD, "Date", _dd.display(evt.get_date_object() )] ]
|
[DHEAD, "Date", _dd.display(evt.get_date_object() )]
|
||||||
|
]
|
||||||
|
|
||||||
if showplc:
|
if showplc:
|
||||||
info.append([PHEAD, "Place", place_hyper])
|
info.append([PHEAD, "Place", place_hyper])
|
||||||
@ -2345,6 +2347,7 @@ class EventListPage(BasePage):
|
|||||||
|
|
||||||
# separate events by their type and then thier event handles
|
# separate events by their type and then thier event handles
|
||||||
for (evt_type, datalist) in sort_event_types(db, event_types, event_handle_list):
|
for (evt_type, datalist) in sort_event_types(db, event_types, event_handle_list):
|
||||||
|
evt_type = _("%(eventtype)s") % {'eventtype' : evt_type}
|
||||||
first_event = True
|
first_event = True
|
||||||
|
|
||||||
for (gid, date, event_handle) in datalist:
|
for (gid, date, event_handle) in datalist:
|
||||||
@ -2358,8 +2361,9 @@ class EventListPage(BasePage):
|
|||||||
trow += tcell
|
trow += tcell
|
||||||
if first_event:
|
if first_event:
|
||||||
trow.attr = 'class = "BeginEvent"'
|
trow.attr = 'class = "BeginEvent"'
|
||||||
tcell += Html("a", evt_type, name = "%s" % evt_type,
|
tcell += Html("a", evt_type, name = evt_type,
|
||||||
title = _("Event types beginning with %s" % evt_type), inline = True)
|
title = _("Event types beginning with %(eventtype)s") % {
|
||||||
|
'eventtype': evt_type}, inline = True)
|
||||||
else:
|
else:
|
||||||
tcell += " "
|
tcell += " "
|
||||||
|
|
||||||
@ -5235,7 +5239,7 @@ class NavWebReport(Report):
|
|||||||
for person_handle in ind_list:
|
for person_handle in ind_list:
|
||||||
person = db.get_person_from_handle(person_handle)
|
person = db.get_person_from_handle(person_handle)
|
||||||
|
|
||||||
# begin events list for each new person
|
# begin event list new for each person
|
||||||
event_list = []
|
event_list = []
|
||||||
|
|
||||||
# get sort name for sorting later
|
# get sort name for sorting later
|
||||||
@ -5254,9 +5258,8 @@ class NavWebReport(Report):
|
|||||||
|
|
||||||
# get event types for class EventsListPage
|
# get event types for class EventsListPage
|
||||||
etype = None
|
etype = None
|
||||||
_type = event.type.xml_str()
|
|
||||||
for xtype in EventType._DATAMAP:
|
for xtype in EventType._DATAMAP:
|
||||||
if xtype[2] == _type:
|
if xtype[2] == evt_type:
|
||||||
etype = xtype[1]
|
etype = xtype[1]
|
||||||
break
|
break
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user