Changed references of "photo" to "image", allowed family and personal event names to be translated.

svn: r217
This commit is contained in:
Don Allingham 2001-07-03 16:53:10 +00:00
parent 0228cad528
commit 7e5a282326
16 changed files with 146 additions and 45 deletions

View File

@ -888,7 +888,7 @@
<widget>
<class>GtkFrame</class>
<name>frame5</name>
<label>Photo</label>
<label>Image</label>
<label_xalign>0</label_xalign>
<shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
<child>
@ -2887,7 +2887,7 @@
<object>editPerson</object>
<last_modification_time>Sat, 09 Dec 2000 22:09:54 GMT</last_modification_time>
</signal>
<label>Add Photo</label>
<label>Add Image</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
@ -2902,7 +2902,7 @@
<object>editPerson</object>
<last_modification_time>Sun, 10 Dec 2000 03:48:08 GMT</last_modification_time>
</signal>
<label>Delete Photo</label>
<label>Delete Image</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>

View File

@ -407,8 +407,8 @@ class EditPerson:
attr = "N"
if event.getSourceRef().getBase():
attr = attr + "S"
self.event_list.append([event.getName(),event.getQuoteDate(),\
event.getPlace(),attr])
self.event_list.append([const.display_pevent(event.getName()),\
event.getQuoteDate(), event.getPlace(),attr])
self.event_list.set_row_data(self.event_index,event)
self.event_index = self.event_index + 1
@ -864,7 +864,7 @@ def on_event_select_row(obj,row,b,c):
edit_person_obj = obj.get_data(EDITPERSON)
edit_person_obj.event_date_field.set_text(event.getDate())
edit_person_obj.event_place_field.set_text(event.getPlace())
edit_person_obj.event_name_field.set_text(event.getName())
edit_person_obj.event_name_field.set_text(const.display_pevent(event.getName()))
edit_person_obj.event_descr_field.set_text(event.getDescription())
#-------------------------------------------------------------------------
@ -942,8 +942,8 @@ def update_event(event,name,date,place,desc):
event.setPlace(place)
utils.modified()
if event.getName() != name:
event.setName(name)
if event.getName() != const.save_pevent(name):
event.setName(const.save_pevent(name))
utils.modified()
if event.getDescription() != desc:
@ -1289,11 +1289,11 @@ def on_photolist_button_press_event(obj,event):
menu = GtkMenu()
item = GtkTearoffMenuItem()
item.show()
view = GtkMenuItem(_("View Photo"))
view = GtkMenuItem(_("View Image"))
view.set_data("m",myobj)
view.connect("activate",on_view_photo)
view.show()
edit = GtkMenuItem(_("Edit Photo"))
edit = GtkMenuItem(_("Edit Image"))
edit.set_data("m",myobj)
edit.connect("activate",on_edit_photo)
edit.show()

View File

@ -280,11 +280,11 @@ def on_photolist_button_press_event(obj,event):
menu = GtkMenu()
item = GtkTearoffMenuItem()
item.show()
view = GtkMenuItem(_("View Photo"))
view = GtkMenuItem(_("View Image"))
view.set_data("m",myobj)
view.connect("activate",on_view_photo)
view.show()
edit = GtkMenuItem(_("Edit Photo"))
edit = GtkMenuItem(_("Edit Image"))
edit.set_data("m",myobj)
edit.connect("activate",on_edit_photo)
edit.show()

View File

@ -240,10 +240,10 @@ class Marriage:
self.event_list.freeze()
self.event_list.clear()
self.add_event("Marriage",self.family.getMarriage())
self.add_event("Divorce",self.family.getDivorce())
self.add_event(const.display_fevent("Marriage"),self.family.getMarriage())
self.add_event(const.display_fevent("Divorce"),self.family.getDivorce())
for event in self.family.getEventList():
self.add_event(event.getName(),event)
self.add_event(const.display_fevent(event.getName()),event)
current_row = self.event_list.get_data(INDEX)
if current_row == None:
@ -395,7 +395,7 @@ def on_select_row(obj,row,b,c):
family_obj.date_field.set_text(event.getDate())
family_obj.place_field.set_text(event.getPlace())
family_obj.name_field.set_text(event.getName())
family_obj.name_field.set_text(const.display_fevent(event.getName()))
family_obj.descr_field.set_text(event.getDescription())
#-------------------------------------------------------------------------
@ -412,8 +412,8 @@ def update_event(event,name,date,place,desc):
event.setPlace(place)
utils.modified()
if event.getName() != name:
event.setName(name)
if event.getName() != const.save_fevent(name):
event.setName(const.save_fevent(name))
utils.modified()
if event.getDescription() != desc:
@ -447,11 +447,11 @@ def on_photolist_button_press_event(obj,event):
menu = GtkMenu()
item = GtkTearoffMenuItem()
item.show()
view = GtkMenuItem(_("View Photo"))
view = GtkMenuItem(_("View Image"))
view.set_data("m",myobj)
view.connect("activate",on_view_photo)
view.show()
edit = GtkMenuItem(_("Edit Photo"))
edit = GtkMenuItem(_("Edit Image"))
edit.set_data("m",myobj)
edit.connect("activate",on_edit_photo)
edit.show()

View File

@ -112,6 +112,11 @@ childRelations = [
"Other"
]
#-------------------------------------------------------------------------
#
# Family event string mappings
#
#-------------------------------------------------------------------------
familyConstantEvents = {
"Annulment" : "ANUL",
"Divorce Filing" : "DIVF",
@ -123,6 +128,48 @@ familyConstantEvents = {
"Marriage" : "MARR"
}
_fe_e2l = {
"Annulment" : _("Annulment"),
"Divorce Filing" : _("Divorce Filing"),
"Divorce" : _("Divorce"),
"Engagement" : _("Engagement"),
"Marriage Contract" : _("Marriage Contract"),
"Marriage License" : _("Marriage License"),
"Marriage Settlement" : _("Marriage Settlement"),
"Marriage" : _("Marriage")
}
_fe_l2e = {}
for a in _fe_e2l.keys():
_fe_l2e[_fe_e2l[a]] = a
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def display_fevent(st):
if _fe_e2l.has_key(st):
return _fe_e2l[st]
else:
return st
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def save_fevent(st):
if _fe_l2e.has_key(st):
return _fe_l2e[st]
else:
return st
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
personalConstantEvents = {
"Adopted" : "ADOP",
"Alternate Birth" : "BIRT",
@ -153,6 +200,39 @@ personalConstantEvents = {
"Retirement" : "RETI"
}
_pe_e2l = {
"Adopted" : _("Adopted"),
"Alternate Birth" : _("Alternate Birth"),
"Alternate Death" : _("Alternate Death"),
"Baptism (LDS)" : _("Baptism (LDS)"),
"Baptism" : _("Baptism"),
"Bar Mitzvah" : _("Bar Mitzvah"),
"Bas Mitzvah" : _("Bas Mitzvah"),
"Burial" : _("Burial"),
"Cause Of Death" : _("Cause Of Death"),
"Census" : _("Census"),
"Christening" : _("Christening"),
"Confirmation" : _("Confirmation"),
"Cremation" : _("Cremation"),
"Degree" : _("Degree"),
"Divorce Filing" : _("Divorce Filing"),
"Education" : _("Education"),
"Elected" : _("Elected"),
"Emigration" : _("Emigration"),
"Graduation" : _("Graduation"),
"Military Service" : _("_MILT"),
"Naturalization" : _("Naturalization"),
"Occupation" : _("Occupation"),
"Probate" : _("Probate"),
"Religion" : _("Religion"),
"Residence" : _("Residence"),
"Retirement" : _("Retirement"),
}
_pe_l2e = {}
for a in _pe_e2l.keys():
_pe_l2e[_pe_e2l[a]] = a
personalConstantAttributes = {
"Description" : "DSCR",
"Identification Number": "IDNO",
@ -169,6 +249,28 @@ familyConstantRelations = [
"Unknown"
]
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def display_pevent(st):
if _pe_e2l.has_key(st):
return _pe_e2l[st]
else:
return st
#-------------------------------------------------------------------------
#
#
#
#-------------------------------------------------------------------------
def save_pevent(st):
if _pe_l2e.has_key(st):
return _pe_l2e[st]
else:
return st
personalEvents = personalConstantEvents.keys()
personalEvents.sort()

View File

@ -26,7 +26,6 @@ import intl
_ = intl.gettext
class EventType(Filter.Filter):
"People who have photos"
def match(self,person):
for event in person.getEventList():

View File

@ -18,7 +18,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
"People who have photos"
"People who have images"
import Filter
import string
@ -27,7 +27,7 @@ import intl
_ = intl.gettext
class HavePhotos(Filter.Filter):
"People who have photos"
"People who have images"
def match(self,person):
return len(person.getPhotoList()) > 0
@ -39,4 +39,4 @@ def need_qualifier():
return 0
def get_name():
return _("People who have photos")
return _("People who have images")

View File

@ -419,7 +419,7 @@
<class>GtkButton</class>
<child_name>Toolbar:button</child_name>
<name>button24</name>
<tooltip>Display list of people</tooltip>
<tooltip>Display the list of people</tooltip>
<signal>
<name>clicked</name>
<handler>on_person_list1_activate</handler>
@ -3840,7 +3840,7 @@ Other
<object>sourceEditor</object>
<last_modification_time>Thu, 31 May 2001 14:39:32 GMT</last_modification_time>
</signal>
<label>Add Photo</label>
<label>Add Image</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
@ -3855,7 +3855,7 @@ Other
<object>sourceEditor</object>
<last_modification_time>Thu, 31 May 2001 14:39:16 GMT</last_modification_time>
</signal>
<label>Delete Photo</label>
<label>Delete Image</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>

View File

@ -538,7 +538,7 @@ def on_choose_parents_clicked(obj):
#
#-------------------------------------------------------------------------
def on_new_clicked(obj):
msg = _("Do you want to close the current database and create a new database?")
msg = _("Do you want to close the current database and create a new one?")
topWindow.question(msg,new_database_response)
#-------------------------------------------------------------------------

View File

@ -307,7 +307,7 @@
<name>photosel</name>
<history_id>photoselect</history_id>
<max_saved>10</max_saved>
<title>Select a photo</title>
<title>Select an image</title>
<directory>False</directory>
<modal>False</modal>
<child>
@ -445,7 +445,7 @@
<widget>
<class>GtkLabel</class>
<name>label119</name>
<label>Change Photo Description</label>
<label>Change Image Description</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>

View File

@ -1069,7 +1069,7 @@
<object>marriageEditor</object>
<last_modification_time>Thu, 29 Mar 2001 13:45:03 GMT</last_modification_time>
</signal>
<label>Add Photo</label>
<label>Add Image</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
@ -1084,7 +1084,7 @@
<object>marriageEditor</object>
<last_modification_time>Thu, 29 Mar 2001 13:45:15 GMT</last_modification_time>
</signal>
<label>Delete Photo</label>
<label>Delete Image</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
</widget>
@ -1094,7 +1094,7 @@
<class>GtkLabel</class>
<child_name>Notebook:tab</child_name>
<name>label201</name>
<label>Photos</label>
<label>Images</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>

View File

@ -151,13 +151,13 @@ class CheckIntegrity:
elif efam > 1:
text = text + _("%d empty families were found\n") % efam
if fphotos == 1:
text = text + _("1 broken family photo was found\n")
text = text + _("1 broken family image was found\n")
elif fphotos > 1:
text = text + _("%d broken family photos were found\n") % fphotos
text = text + _("%d broken family images were found\n") % fphotos
if pphotos == 1:
text = text + _("1 broken personal photo was found\n")
text = text + _("1 broken personal image was found\n")
elif pphotos > 1:
text = text + _("%d broken personal photos were found\n") % pphotos
text = text + _("%d broken personal images were found\n") % pphotos
GnomeWarningDialog(string.strip(text))

View File

@ -93,11 +93,11 @@ def report(database,person):
text = text + "%s : %d\n" % (_("Individuals with incomplete names"),incomp_names)
text = text + "%s : %d\n" % (_("Individuals missing birth dates"),missing_bday)
text = text + "%s : %d\n" % (_("Disconnected individuals"),disconnected)
text = text + "\n%s\n" % _("Photos and files")
text = text + "\n%s\n" % _("Images and files")
text = text + "----------------------------\n"
text = text + "%s : %d\n" % (_("Individuals with photos"),with_photos)
text = text + "%s : %d\n" % (_("Total number of photos"),total_photos)
text = text + "%s : %d %s\n" % (_("Total size of photos"),bytes,_("bytes"))
text = text + "%s : %d\n" % (_("Individuals with images"),with_photos)
text = text + "%s : %d\n" % (_("Total number of images"),total_photos)
text = text + "%s : %d %s\n" % (_("Total size of images"),bytes,_("bytes"))
text = text + "\n%s\n" % _("Family Information")
text = text + "----------------------------\n"
text = text + "%s : %d\n" % (_("Number of families"),len(familyList))

View File

@ -424,7 +424,7 @@
<handler>on_nophotos_toggled</handler>
<last_modification_time>Sat, 31 Mar 2001 21:59:36 GMT</last_modification_time>
</signal>
<label>Do not use photographs</label>
<label>Do not use images</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
@ -438,7 +438,7 @@
<class>GtkCheckButton</class>
<name>restrict_photos</name>
<can_focus>True</can_focus>
<label>Do not use photographs for living people</label>
<label>Do not use images for living people</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>

View File

@ -447,7 +447,7 @@
<handler>on_nophotos_toggled</handler>
<last_modification_time>Sat, 31 Mar 2001 21:59:36 GMT</last_modification_time>
</signal>
<label>Do not use photographs</label>
<label>Do not use images</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>
@ -462,7 +462,7 @@
<name>restrict_photos</name>
<border_width>3</border_width>
<can_focus>True</can_focus>
<label>Do not use photographs for living people</label>
<label>Do not use images for living people</label>
<active>False</active>
<draw_indicator>True</draw_indicator>
<child>