Added LDS temple codes

svn: r597
This commit is contained in:
Don Allingham 2001-11-30 03:50:22 +00:00
parent f764038919
commit 2d11160e24
3 changed files with 233 additions and 4 deletions

View File

@ -52,6 +52,10 @@ import sort
from intl import gettext
_ = gettext
_temple_names = const.lds_temple_codes.keys()
_temple_names.sort()
_temple_names = [""] + _temple_names
#-------------------------------------------------------------------------
#
# EditPerson class
@ -256,22 +260,43 @@ class EditPerson:
self.notes_field.set_word_wrap(1)
# lds stuff
ord = person.getLdsBaptism()
self.ldsbap_temple.set_popdown_strings(_temple_names)
if ord:
self.ldsbap_temple.entry.set_text(ord.getTemple())
self.ldsbap_date.set_text(ord.getDate())
if ord.getTemple() != "":
name = const.lds_temple_to_abrev[ord.getTemple()]
else:
name = ""
self.ldsbap_temple.entry.set_text(name)
else:
self.ldsbap_temple.entry.set_text("")
ord = person.getLdsEndowment()
self.ldsend_temple.set_popdown_strings(_temple_names)
if ord:
self.ldsend_temple.entry.set_text(ord.getTemple())
self.ldsend_date.set_text(ord.getDate())
if ord.getTemple() != "":
name = const.lds_temple_to_abrev[ord.getTemple()]
else:
name = ""
self.ldsend_temple.entry.set_text(name)
else:
self.ldsend_temple.entry.set_text("")
ord = person.getLdsSeal()
self.ldsseal_temple.set_popdown_strings(_temple_names)
if ord:
self.ldsseal_temple.entry.set_text(ord.getTemple())
self.ldsseal_date.set_text(ord.getDate())
self.ldsfam = ord.getFamily()
if ord.getTemple() != "":
name = const.lds_temple_to_abrev[ord.getTemple()]
else:
name = ""
self.ldsseal_temple.entry.set_text(name)
else:
self.ldsseal_temple.entry.set_text("")
self.ldsfam = None
myMenu = gtk.GtkMenu()
@ -527,6 +552,10 @@ class EditPerson:
date = self.ldsbap_date.get_text()
temple = self.ldsbap_temple.entry.get_text()
if const.lds_temple_codes.has_key(temple):
temple = const.lds_temple_codes[temple]
else:
temple = ""
ord = self.person.getLdsBaptism()
if not ord:
if date or temple:
@ -541,6 +570,10 @@ class EditPerson:
date = self.ldsend_date.get_text()
temple = self.ldsend_temple.entry.get_text()
if const.lds_temple_codes.has_key(temple):
temple = const.lds_temple_codes[temple]
else:
temple = ""
ord = self.person.getLdsEndowment()
if not ord:
if date or temple:
@ -555,6 +588,11 @@ class EditPerson:
date = self.ldsseal_date.get_text()
temple = self.ldsseal_temple.entry.get_text()
if const.lds_temple_codes.has_key(temple):
temple = const.lds_temple_codes[temple]
else:
temple = ""
ord = self.person.getLdsSeal()
if not ord:
if date or temple or self.ldsfam:
@ -886,16 +924,28 @@ class EditPerson:
date = self.ldsbap_date.get_text()
temple = self.ldsbap_temple.entry.get_text()
if const.lds_temple_codes.has_key(temple):
temple = const.lds_temple_codes[temple]
else:
temple = ""
ord = self.person.getLdsBaptism()
update_ord(self.person.setLdsBaptism,ord,date,temple)
date = self.ldsend_date.get_text()
temple = self.ldsend_temple.entry.get_text()
if const.lds_temple_codes.has_key(temple):
temple = const.lds_temple_codes[temple]
else:
temple = ""
ord = self.person.getLdsEndowment()
update_ord(self.person.setLdsEndowment,ord,date,temple)
date = self.ldsseal_date.get_text()
temple = self.ldsseal_temple.entry.get_text()
if const.lds_temple_codes.has_key(temple):
temple = const.lds_temple_codes[temple]
else:
temple = ""
ord = self.person.getLdsSeal()
if not ord:
if self.ldsfam or date or temple:

View File

@ -511,3 +511,183 @@ familyAttributes = initialize_family_attribute_list()
familyRelations = initialize_family_relation_list()
places = []
surnames = []
lds_temple_codes = {
"ALBERTA" : "ALBER",
"APIA" : "SAMOA",
"ARIZONA" : "ARIZO",
"ATLANTA GA": "ATLAN",
"BOGOTA COL.": "BOGOT",
"BOISE ID": "BOISE",
"BOUNTIFUL UT": "BOUNT",
"BUENOS AIRES": "BAIRE",
"CHICAGO IL": "CHICA",
"COCHABAMBA, BOLIVA": "COCHA",
"DALLAS, TX": "DALLA",
"DENVER, CO": "DENVE",
"ENDOWMENT HOUSE": "EHOUS",
"FRANKFURT": "FRANK",
"FREIBERG": "FREIB",
"GUATAMALA": "GUATE",
"GUAYAQUIL, ECUADOR": "GUAYA",
"HARTFORD, CONN": "HARTF",
"HAWAII": "HAWAI",
"HONG KONG": "HKONG",
"IDAHO FALLS, ID": "IFALL",
"JOHANNESBURG, S.A.": "JOHAN",
"JORDAN RIVER, UT": "JRIVE",
"LAS VEGAS, NV": "LVEGA",
"LIMA, PERU": "LIMA" ,
"LOGAN, UT": "LOGAN",
"LONDON": "LONDO",
"LOS ANGELES, CA": "LANGE",
"MADRID, SPAIN": "MADRI",
"MANILA, PHILIPPINES": "MANIL",
"MANTI, UT": "MANTI",
"MEXICO CITY": "MEXIC",
"MT. TIMPANOGAS, UT": "MTIMP",
"NASHVILLE, TENN": "NASHV",
"NAUVOO": "NAUVO",
"NEW ZEALAND": "NZEAL",
"NUKU'ALOFA, TONGA": "NUKUA",
"OAKLAND, CA": "OAKLA",
"OGDEN, UT": "OGDEN",
"ORLANDO, FL": "ORLAN",
"PAPEETE, TAHITI": "PAPEE",
"PORTLAND, OR": "PORTL",
"PRESIDENT'S OFFICE": "POFFI",
"PRESTON, ENG": "PREST",
"PROVO, UT": "PROVO",
"RECIFE, BRAZIL": "RECIF",
"SALT LAKE, UT": "SLAKE",
"SAN DIEGO, CA": "SDIEG",
"SANTIAGO, CHILE": "SANTI",
"SANTO DOMINGO, D.R.": "SDOMI",
"SAO PAULO, BRAZ": "SPAUL",
"SEATTLE, WA": "SEATT",
"SEOUL, KOREA": "SEOUL",
"ST. GEORGE, UT": "SGEOR",
"ST. LOUIS, MISSOURI": "SLOUI",
"STOCKHOLM, SWDN": "STOCK",
"SWISS": "SWISS",
"SYDNEY, AUST": "SYDNE",
"TAIPEI, TAIWAN": "TAIPE",
"TOKYO, JAPAN": "TOKYO",
"TORONTO, CAN.": "TORNO",
"VERNAL, UT.": "VERNA",
"WASHINGTON, DC": "WASHI",
}
lds_temple_to_abrev = {
"ALBER": "ALBERTA" ,
"SAMOA": "APIA" ,
"AP": "APIA" ,
"APIA": "APIA" ,
"ARIZO": "ARIZONA" ,
"AZ": "ARIZONA" ,
"ATLAN": "ATLANTA GA",
"AT": "ATLANTA GA",
"BOGOT": "BOGOTA COL.",
"BG": "BOGOTA COL.",
"BOISE": "BOISE ID",
"BO": "BOISE ID",
"BOUNT": "BOUNTIFUL UT",
"BAIRE": "BUENOS AIRES",
"BA": "BUENOS AIRES",
"CHICA": "CHICAGO IL",
"CH": "CHICAGO IL",
"COCHA": "COCHABAMBA, BOLIVA",
"DALLA": "DALLAS, TX",
"DA": "DALLAS, TX",
"DENVE": "DENVER, CO",
"DV": "DENVER, CO",
"EHOUS": "ENDOWMENT HOUSE",
"EH": "ENDOWMENT HOUSE",
"FRANK": "FRANKFURT",
"FR": "FRANKFURT",
"FREIB": "FREIBERG",
"FD": "FREIBERG",
"GUATE": "GUATAMALA",
"GA": "GUATAMALA",
"GUAYA": "GUAYAQUIL, ECUADOR",
"GY": "GUAYAQUIL, ECUADOR",
"HARTF": "HARTFORD, CONN",
"HAWAI": "HAWAII",
"HA": "HAWAII",
"HKONG": "HONG KONG",
"IFALL": "IDAHO FALLS, ID",
"IF": "IDAHO FALLS, ID",
"JOHAN": "JOHANNESBURG, S.A.",
"JO": "JOHANNESBURG, S.A.",
"JRIVE": "JORDAN RIVER, UT",
"JR": "JORDAN RIVER, UT",
"LVEGA": "LAS VEGAS, NV",
"LV": "LAS VEGAS, NV",
"LIMA" : "LIMA, PERU",
"LI": "LIMA, PERU",
"LOGAN": "LOGAN, UT",
"LG": "LOGAN, UT",
"LONDO": "LONDON",
"LD": "LONDON",
"LANGE": "LOS ANGELES, CA",
"LA": "LOS ANGELES, CA",
"MADRI": "MADRID, SPAIN",
"MANIL": "MANILA, PHILIPPINES",
"MA": "MANILA, PHILIPPINES",
"MANTI": "MANTI, UT",
"MT": "MANTI, UT",
"MEXIC": "MEXICO CITY",
"MX": "MEXICO CITY",
"MTIMP": "MT. TIMPANOGAS, UT",
"NASHV": "NASHVILLE, TENN",
"NAUVO": "NAUVOO",
"NZEAL": "NEW ZEALAND",
"NZ": "NEW ZEALAND",
"NUKUA": "NUKU'ALOFA, TONGA",
"TG": "NUKU'ALOFA, TONGA",
"OAKLA": "OAKLAND, CA",
"OK": "OAKLAND, CA",
"OGDEN": "OGDEN, UT",
"OG": "OGDEN, UT",
"ORLAN": "ORLANDO, FL",
"PAPEE": "PAPEETE, TAHITI",
"TA": "PAPEETE, TAHITI",
"PORTL": "PORTLAND, OR",
"PT": "PORTLAND, OR",
"POFFI": "PRESIDENT'S OFFICE",
"PREST": "PRESTON, ENG",
"PROVO": "PROVO, UT",
"PV": "PROVO, UT",
"RECIF": "RECIFE, BRAZIL",
"SLAKE": "SALT LAKE, UT",
"SL": "SALT LAKE, UT",
"SDIEG": "SAN DIEGO, CA",
"SA": "SAN DIEGO, CA",
"SANTI": "SANTIAGO, CHILE",
"SN": "SANTIAGO, CHILE",
"SDOMI": "SANTO DOMINGO, D.R.",
"SPAUL": "SAO PAULO, BRAZ",
"SP": "SAO PAULO, BRAZ",
"SEATT": "SEATTLE, WA",
"SE": "SEATTLE, WA",
"SEOUL": "SEOUL, KOREA",
"SO": "SEOUL, KOREA",
"SGEOR": "ST. GEORGE, UT",
"SG": "ST. GEORGE, UT",
"SLOUI": "ST. LOUIS, MISSOURI",
"STOCK": "STOCKHOLM, SWDN",
"ST": "STOCKHOLM, SWDN",
"SWISS": "SWISS",
"SW": "SWISS",
"SYDNE": "SYDNEY, AUST",
"SD": "SYDNEY, AUST",
"TAIPE": "TAIPEI, TAIWAN",
"TP": "TAIPEI, TAIWAN",
"TOKYO": "TOKYO, JAPAN",
"TK": "TOKYO, JAPAN",
"TORNO": "TORONTO, CAN.",
"TR": "TORONTO, CAN.",
"VERNA": "VERNAL, UT.",
"WASHI": "WASHINGTON, DC",
"WA": "WASHINGTON, DC",
}

View File

@ -365,7 +365,6 @@ def attach_places(values,combo,place):
for v in mymap.keys():
combo.set_item_string(mymap[v],v.get_title())
#-------------------------------------------------------------------------
#