From bb50c0f5df4bf84bb4711a2ad0e4385e42de6ec4 Mon Sep 17 00:00:00 2001 From: Martin Hawlisch Date: Fri, 27 May 2005 21:39:39 +0000 Subject: [PATCH] * src/const.py.in: Replace static definition of lds_temple_to_abrev by dynamic generation from lds_temple_codes so they need to be defined only once. svn: r4723 --- gramps2/ChangeLog | 3 + gramps2/src/const.py.in | 181 +--------------------------------------- 2 files changed, 6 insertions(+), 178 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index ea478ee28..8bee4cd58 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -6,6 +6,9 @@ * src/plugins/TestcaseGenerator.py: Move constants from RelLib to const * src/gramps.glade: Add ScrolledWindow to RepositoryView to make it look like Source and Place View. + * src/const.py.in: Replace static definition of lds_temple_to_abrev by + dynamic generation from lds_temple_codes so they need to be defined + only once. 2005-05-27 Alex Roitman * src/GrampsBSDDB.py (upgrade_7): Add upgrade path for repo changes. diff --git a/gramps2/src/const.py.in b/gramps2/src/const.py.in index d8b95301b..6af4c8050 100644 --- a/gramps2/src/const.py.in +++ b/gramps2/src/const.py.in @@ -750,184 +750,9 @@ lds_temple_codes = { } -lds_temple_to_abrev = { - "ABA" : "Aba, Nigeria", - "ACCRA": "Accra, Ghana", - "ADELA": "Adelaide, Australia", - "ALBUQ": "Albuquerque, New Mexico", - "ANCHO": "Anchorage, Alaska", - "APIA" : "Apia, Samoa", - "AP" : "Apia, Samoa", - "ASUNC": "Asuncion, Paraguay", - "ATLAN": "Atlanta, Georgia", - "AT" : "Atlanta, Georgia", - "BROUG": "Baton Rouge, Louisiana", - "SWISS": "Bern, Switzerland", - "SW" : "Bern, Switzerland", - "BILLI": "Billings, Montana", - "BIRMI": "Birmingham, Alabama", - "BISMA": "Bismarck, North Dakota", - "BOGOT": "Bogota, Columbia", - "BG" : "Bogota, Columbia", - "BOISE": "Boise Idaho", - "BO" : "Boise Idaho", - "BOSTO": "Boston, Massachusetts", - "BOUNT": "Bountiful, Utah", - "BRISB": "Brisban, Australia", - "BAIRE": "Buenos Aires, Argentina", - "BA" : "Buenos Aires, Argentina", - "CAMPI": "Campinas, Brazil", - "CARAC": "Caracas, Venezuela", - "ALBER": "Cardston, Alberta", - "CHICA": "Chicago, Illinois", - "CH" : "Chicago, Illinois", - "CIUJU": "Ciudad Juarez, Chihuahua", - "COCHA": "Cochabamba, Boliva", - "COLJU": "Colonia Juarez, Chihuahua", - "COLSC": "Columbia, South Carolina", - "CRIVE": "Columbia River, Washington", - "COLUM": "Columbus, Ohio", - "COPEN": "Copenhagen, Denmark", - "DALLA": "Dallas, Texas", - "DA" : "Dallas, Texas", - "DENVE": "Denver, Colorado", - "DV" : "Denver, Colorado", - "DETRO": "Detroit, Michigan", - "EDMON": "Edmonton, Alberta", - "FRANK": "Frankfurt, Germany", - "FR" : "Frankfurt, Germany", - "FRESN": "Fresno, California", - "FREIB": "Freiberg, Germany", - "FD" : "Freiberg, Germany", - "FUKUO": "Fukuoka, Japan", - "GUADA": "Guadalajara, Jalisco", - "GUATE": "Guatamala City, Guatamala", - "GA" : "Guatamala City, Guatamala", - "GUAYA": "Guayaquil, Ecuador", - "GY" : "Guayaquil, Ecuador", - "HALIF": "Halifax, Noca Scotia", - "NZEAL": "Hamilton, New Zealand", - "NZ" : "Hamilton, New Zealand", - "NYORK": "Harrison, New York", - "HARTF": "Hartford, Connecticut", - "HELSI": "Helsinki, Finland", - "HERMO": "Hermosillo, Sonora", - "HKONG": "Hong Kong, China", - "HOUST": "Houston, Texas", - "IFALL": "Idaho Falls, Idaho", - "JOHAN": "Johannesburg, South Africa", - "JO" : "Johannesburg, South Africa", - "JRIVE": "Jordan River (South Jordan), Utah", - "JR" : "Jordan River (South Jorhan), Utah", - "KONA" : "Kialua Kona, Hawaii", - "KIEV" : "Kiev, Ukraine", - "HAWAI": "Laie, Hawaii", - "HA" : "Laie, Hawaii", - "LVEGA": "Las Vegas, Nevada", - "LV" : "Las Vegas, Nevada", - "LIMA" : "Lima, Peru", - "LI" : "Lima, Peru", - "LOGAN": "Logan, Utah", - "LG" : "Logan, Utah", - "LONDO": "London, England", - "LD" : "London, England", - "LANGE": "Los Angeles, California", - "LA" : "Los Angeles, California", - "LOUIS": "Louisville, Kentucky", - "LUBBO": "Lubbock, Texas", - "MADRI": "Madrid, Spain", - "MANIL": "Manila, Philippines", - "MA" : "Manila, Philippines", - "MANTI": "Manti, Utah", - "MT" : "Manti, Utah", - "MEDFO": "Medford, Oregon", - "MELBO": "Melbourne, Australia", - "MEMPH": "Melphis, Tennessee", - "MERID": "Merida, Yucatan", - "ARIZO": "Mesa, Arizona", - "AZ" : "Mesa, Arizona", - "MEXIC": "Mexico City, Mexico", - "MX" : "Mexico City, Mexico", - "MONTE": "Monterrey, Nuevo Leon, Mexico", - "MNTVD": "Montevideo, Uruguay", - "MONTI": "Monticello, Utah", - "MONTR": "Montreal, Quebec", - "MTIMP": "Mt. Timpanogos (American Fork), Utah", - "NASHV": "Nashville, Tennessee", - "NAUVO": "Nauvoo, Illinois", - "NAUV2": "Nauvoo, Illinois (New)", - "NBEAC": "Newport Beach, California", - "NUKUA": "Nuku'alofa, Tonga", - "TG" : "Nuku'alofa, Tonga", - "OAKLA": "Oakland, California", - "OK" : "Oakland, California", - "OAKAC": "Oaxaca, Oaxaca", - "OGDEN": "Ogden, Utah", - "OG" : "Ogden, Utah", - "OKLAH": "Oklahoma City, Oklahoma", - "ORLAN": "Orlando, Florida", - "PALMY": "Palmayra, New York", - "PAPEE": "Papeete, Tahiti", - "TA" : "Papeete, Tahiti", - "PERTH": "Perth, Australia", - "PORTL": "Portland, Oregon", - "PT" : "Portland, Oregon", - "PALEG": "Porto Alegre, Brazil", - "PREST": "Preston, England", - "PROVO": "Provo, Utah", - "PV" : "Provo, Utah", - "RALEI": "Raleigh, North Carolina", - "RECIF": "Recife, Brazil", - "REDLA": "Redlands, California", - "REGIN": "Regina, Saskatchewan", - "RENO" : "Reno, Nevada", - "SACRA": "Sacramento, California", - "SGEOR": "St. George, Utah", - "SG" : "St. George, Utah", - "SLOUI": "St. Louis, Missouri", - "SPMIN": "St. Paul, Minnesota", - "SLAKE": "Salt Lake City, Utah", - "SL" : "Salt Lake City, Utah", - "SDIEG": "San Diego, California", - "SA" : "San Diego, California", - "ANTON": "San Antonio, Texas", - "SJOSE": "San Jose, Costa Rica", - "SANTI": "Santiago, Chile", - "SN" : "Santiago, Chile", - "SDOMI": "Santo Domingo, Dominican Republic", - "SPAUL": "Sao Paulo, Brazil", - "SP" : "Sao Paulo, Brazil", - "SEATT": "Seattle, Washington", - "SE" : "Seattle, Washington", - "SEOUL": "Seoul, South Korea", - "SO" : "Seoul, South Korea", - "SNOWF": "Snowflake, Arizona", - "SPOKA": "Spokane, Washington", - "STOCK": "Stockholm, Sweden", - "ST" : "Stockholm, Sweden", - "SUVA" : "Suva, Fiji", - "SYDNE": "Sydney, Australia", - "SD" : "Sydney, Australia", - "TAIPE": "Taipei, Taiwan", - "TP" : "Taipei, Taiwan", - "TAMPI": "Tampico, Tamaulipas", - "HAGUE": "The Hague, Netherlands", - "TOKYO": "Tokyo, Japan", - "TK" : "Tokyo, Japan", - "TORNO": "Toronto, Ontario", - "TR" : "Toronto, Ontario", - "TGUTI": "Tuxtla Gutierrez, Chiapas", - "VERAC": "Vera Cruz, Vera Cruz", - "VERNA": "Vernal, Utah", - "VILLA": "Villahermosa, Tabasco", - "WASHI": "Washington, D.C.", - "WA" : "Washington, D.C.", - "WINTE": "Winter Quarters (Omaha), Nebraska", -#Other Places - "EHOUS": "Endowment House", - "EH" : "Endowment House", - "POFFI": "President's Office", -} +lds_temple_to_abrev = {} +for (name,abbr) in lds_temple_codes.iteritems(): + lds_temple_to_abrev[abbr] = name lds_status = { "BIC" : 1, "CANCELED" : 1, "CHILD" : 1,