Fix for #2582: lower translated gender terms

svn: r11544
This commit is contained in:
Doug Blank 2008-12-31 03:07:33 +00:00
parent fb724c63a8
commit a518a48140

View File

@ -503,9 +503,9 @@ class CSVParser:
if gender: if gender:
# replace # replace
gender = gender.lower() gender = gender.lower()
if gender == gender_map[gen.lib.Person.MALE]: if gender == gender_map[gen.lib.Person.MALE].lower():
gender = gen.lib.Person.MALE gender = gen.lib.Person.MALE
elif gender == gender_map[gen.lib.Person.FEMALE]: elif gender == gender_map[gen.lib.Person.FEMALE].lower():
gender = gen.lib.Person.FEMALE gender = gen.lib.Person.FEMALE
else: else:
gender = gen.lib.Person.UNKNOWN gender = gen.lib.Person.UNKNOWN
@ -627,9 +627,9 @@ class CSVParser:
person.gramps_id = person_ref[1:-1] person.gramps_id = person_ref[1:-1]
if person.get_gender() == gen.lib.Person.UNKNOWN and gender != None: if person.get_gender() == gen.lib.Person.UNKNOWN and gender != None:
gender = gender.lower() gender = gender.lower()
if gender == gender_map[gen.lib.Person.MALE]: if gender == gender_map[gen.lib.Person.MALE].lower():
gender = gen.lib.Person.MALE gender = gen.lib.Person.MALE
elif gender == gender_map[gen.lib.Person.FEMALE]: elif gender == gender_map[gen.lib.Person.FEMALE].lower():
gender = gen.lib.Person.FEMALE gender = gen.lib.Person.FEMALE
else: else:
gender = gen.lib.Person.UNKNOWN gender = gen.lib.Person.UNKNOWN