Skip to content

Commit

Permalink
Handle suffixes to a name
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Sep 18, 2024
1 parent 234554b commit cb6d25a
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions gedcom
Original file line number Diff line number Diff line change
Expand Up @@ -3884,6 +3884,10 @@ sub print_person
} else {
$args{'format'} = 'married ';
}
if($person->marriage_bann()) {
die 'TODO';
}

$phrase->append(i18n(\%args));

# Note if this person married a relative
Expand Down Expand Up @@ -7138,10 +7142,9 @@ sub print_person
}
$phrase->append("[$_]") foreach(sort @burialcitations);
} elsif((!$aod) && ($placeofdeath || $dateofdeath) && !$diedathome) {
# TODO - extract marriage banns information
# if($person->marriage_bann()) {
# die 'foo';
# }
if($person->marriage_bann()) {
die 'TODO';
}
if($placeofdeath && (scalar(@spouses) <= 1) && $placeofmarriage && ($placeofdeath eq $placeofmarriage) && (scalar(@events) == 0)) {
if($language eq 'French') {
if($phrase->length() == 0) {
Expand Down Expand Up @@ -8325,9 +8328,6 @@ sub Gedcom::Individual::as_string

# See https://github.com/pjcj/Gedcom.pm/issues/28
$suffix = get_value({ person => $self, value => 'NAME NSFX' });
if($suffix) {
complain("TODO: add suffix: $name, $suffix");
}
}

$name =~ s/\///g;
Expand Down Expand Up @@ -8488,6 +8488,10 @@ sub Gedcom::Individual::as_string
}
}

if($suffix) {
$rc .= " $suffix";
}

$rc .= ' ' if($yob || $yod);

if($yob) {
Expand All @@ -8508,6 +8512,10 @@ sub Gedcom::Individual::as_string

$rc =~ tr/"/'/; # fix issues with Graphviz and others - compatibility with ged2site

if($suffix) {
return "$rc $suffix";
}

return $rc;
}

Expand Down

0 comments on commit cb6d25a

Please sign in to comment.