Skip to content

Commit

Permalink
Added given_names() subroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jun 8, 2024
1 parent 7280713 commit e430b50
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -3493,9 +3493,7 @@ sub print_person
$phrase->append(($sex eq 'M' ? 'his' : 'her') . ' twin ' .
i18n(($ssex eq 'F') ? 'sister ' : 'brother '));
}
if(my $given = $sibling->given_names()) {
# Avoid end of sentences such as "with his twin sister Jane E.."
$given =~ s/\.$//;
if(my $given = given_names($sibling)) {
$bio .= $given;
$phrase->append($given);
}
Expand Down Expand Up @@ -4436,9 +4434,7 @@ sub print_person
$phrase->append(' with an unknown ' . i18n(($sex eq 'M') ? 'mother' : 'father'));
}
# TODO: make hyperlink to the person's record, unless surviving
if(my $given = $children[0]->given_names()) {
# Avoid end of sentences such as "Jane E.."
$given =~ s/\.$//;
if(my $given = given_names($children[0])) {
$bio .= ", $given";
$phrase->append(", $given");
}
Expand Down Expand Up @@ -14475,8 +14471,7 @@ sub given_names
$params{'person'} = shift;
}

my $person = $params{'person'};
if(my $given = $person->given_names()) {
if(my $given = $params{'person'}->given_names()) {
$given =~ s/\.$//;
return $given;
}
Expand Down

0 comments on commit e430b50

Please sign in to comment.