Skip to content

Commit

Permalink
Sort out commas when -h is not given
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Dec 20, 2023
1 parent 2040500 commit da762f8
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions gedcom
Original file line number Diff line number Diff line change
Expand Up @@ -2695,11 +2695,19 @@ sub print_person
my $noun = $firstname // $pronoun;

if($aob || $aod || $relationship || $spouserelationship) {
$phrase->set("$noun, ");
my $str = $noun;

$noun = $pronoun;
if(my $aka = $person->as_string({ use_aka => 1 })) {
$phrase->append("also known as $aka, ");
$str .= " (also known as $aka)";
}
if($relationship || $spouserelationship) {
$str .= ',';
}

$str .= ' ';

$phrase->append($str);
}

if($relationship) {
Expand Down Expand Up @@ -2730,16 +2738,17 @@ sub print_person
$phrase->append('the husband');
}
}
if($language eq 'French') {
$phrase->append(" de votre $spouserelationship, ");
} else {
$phrase->append(" of your $spouserelationship, ");
}
$phrase->append(i18n(' of '));
if(my $s = $spouse->as_string({ middle_names => 1, title => 1 })) {
$phrase->append("$s ");
$phrase->append("$s, ");
} else {
complain({ person => $spouse, warning => 'Seems to have no name' });
}
if($language eq 'French') {
$phrase->append("votre $spouserelationship, ");
} else {
$phrase->append("your $spouserelationship, ");
}
$haveprintedspousename = 1;
}

Expand Down

0 comments on commit da762f8

Please sign in to comment.