* src/plugins/WriteGedcom.py (export_data): Correct researcher's
PHON field; (write_person): Correct exported PHON fields. * src/plugins/ReadGedcom.py (parse_residence): Remove PHON field since it is taken care of by parse_address() now; (parse_address): Parse PHON field, provided it immediately follows ADDR structure. svn: r2489
This commit is contained in:
parent
11f4d9c2f4
commit
3e9026bba7
@ -1,5 +1,11 @@
|
|||||||
2003-12-09 Alex Roitman <shura@alex.neuro.umn.edu>
|
2003-12-09 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
* doc/gramps-manual/ru/getstart.xml: Translation update.
|
* doc/gramps-manual/ru/getstart.xml: Translation update.
|
||||||
|
* src/plugins/WriteGedcom.py (export_data): Correct researcher's
|
||||||
|
PHON field; (write_person): Correct exported PHON fields.
|
||||||
|
* src/plugins/ReadGedcom.py (parse_residence): Remove PHON field since
|
||||||
|
it is taken care of by parse_address() now;
|
||||||
|
(parse_address): Parse PHON field, provided it immediately follows
|
||||||
|
ADDR structure.
|
||||||
|
|
||||||
2003-12-08 Don Allingham <dallingham@users.sourceforge.net>
|
2003-12-08 Don Allingham <dallingham@users.sourceforge.net>
|
||||||
* src/RelLib.py: Add phone to address, postal code and phone to
|
* src/RelLib.py: Add phone to address, postal code and phone to
|
||||||
|
@ -1054,8 +1054,6 @@ class GedcomParser:
|
|||||||
elif matches[1] == "PLAC":
|
elif matches[1] == "PLAC":
|
||||||
address.setStreet(matches[2])
|
address.setStreet(matches[2])
|
||||||
self.parse_address(address,level+1)
|
self.parse_address(address,level+1)
|
||||||
elif matches[1] == "PHON":
|
|
||||||
pass
|
|
||||||
elif matches[1] == "NOTE":
|
elif matches[1] == "NOTE":
|
||||||
note = self.parse_note(matches,address,level+1,note)
|
note = self.parse_note(matches,address,level+1,note)
|
||||||
else:
|
else:
|
||||||
@ -1067,6 +1065,9 @@ class GedcomParser:
|
|||||||
while 1:
|
while 1:
|
||||||
matches = self.get_next()
|
matches = self.get_next()
|
||||||
if int(matches[0]) < level:
|
if int(matches[0]) < level:
|
||||||
|
if matches[1] == "PHON":
|
||||||
|
address.setPhone(matches[2])
|
||||||
|
else:
|
||||||
self.backup()
|
self.backup()
|
||||||
return
|
return
|
||||||
elif matches[1] in [ "ADDR", "ADR1", "ADR2" ]:
|
elif matches[1] in [ "ADDR", "ADR1", "ADR2" ]:
|
||||||
@ -1080,8 +1081,6 @@ class GedcomParser:
|
|||||||
address.setStreet(val)
|
address.setStreet(val)
|
||||||
elif matches[1] == "CITY":
|
elif matches[1] == "CITY":
|
||||||
address.setCity(matches[2])
|
address.setCity(matches[2])
|
||||||
elif matches[1] == "PHON":
|
|
||||||
address.setNote(matches[2])
|
|
||||||
elif matches[1] == "STAE":
|
elif matches[1] == "STAE":
|
||||||
address.setState(matches[2])
|
address.setState(matches[2])
|
||||||
elif matches[1] == "POST":
|
elif matches[1] == "POST":
|
||||||
|
@ -630,11 +630,10 @@ class GedcomWriter:
|
|||||||
if owner.getCountry():
|
if owner.getCountry():
|
||||||
self.writeln("2 CONT %s" % self.cnvtxt(owner.getCountry()))
|
self.writeln("2 CONT %s" % self.cnvtxt(owner.getCountry()))
|
||||||
cnt = 1
|
cnt = 1
|
||||||
if owner.getPhone():
|
|
||||||
self.writeln("2 PHON %s" % self.cnvtxt(owner.getPhone()))
|
|
||||||
cnt = 1
|
|
||||||
if cnt == 0:
|
if cnt == 0:
|
||||||
self.writeln('2 CONT Not Provided')
|
self.writeln('2 CONT Not Provided')
|
||||||
|
if owner.getPhone():
|
||||||
|
self.writeln("1 PHON %s" % self.cnvtxt(owner.getPhone()))
|
||||||
else:
|
else:
|
||||||
self.writeln('1 ADDR Not Provided')
|
self.writeln('1 ADDR Not Provided')
|
||||||
self.writeln('2 CONT Not Provided')
|
self.writeln('2 CONT Not Provided')
|
||||||
@ -933,12 +932,15 @@ class GedcomWriter:
|
|||||||
self.writeln("3 POST %s" % self.cnvtxt(addr.getPostal()))
|
self.writeln("3 POST %s" % self.cnvtxt(addr.getPostal()))
|
||||||
if addr.getCountry():
|
if addr.getCountry():
|
||||||
self.writeln("3 CTRY %s" % self.cnvtxt(addr.getCountry()))
|
self.writeln("3 CTRY %s" % self.cnvtxt(addr.getCountry()))
|
||||||
|
if addr.getPhone():
|
||||||
|
self.writeln("2 PHON %s" % self.cnvtxt(addr.getPhone()))
|
||||||
else:
|
else:
|
||||||
text = addr.getStreet()
|
text = addr.getStreet()
|
||||||
text = addr_append(text,addr.getCity())
|
text = addr_append(text,addr.getCity())
|
||||||
text = addr_append(text,addr.getState())
|
text = addr_append(text,addr.getState())
|
||||||
text = addr_append(text,addr.getPostal())
|
text = addr_append(text,addr.getPostal())
|
||||||
text = addr_append(text,addr.getCountry())
|
text = addr_append(text,addr.getCountry())
|
||||||
|
text = addr_append(text,addr.getPhone())
|
||||||
if text:
|
if text:
|
||||||
self.writeln("2 PLAC %s" % string.replace(self.cnvtxt(text),'\r',' '))
|
self.writeln("2 PLAC %s" % string.replace(self.cnvtxt(text),'\r',' '))
|
||||||
if addr.getNote():
|
if addr.getNote():
|
||||||
|
Loading…
Reference in New Issue
Block a user