Skip to content

Commit

Permalink
Explain the difference between the variables used to build the text
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Aug 5, 2024
1 parent a8934ad commit e0a8262
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -2171,8 +2171,6 @@ sub print_person
}
print $html ' [ <a href="history.html">Family History</a> ]</center><p>';

my $fullbio;

my $phrase = Data::Text->new();
my @phrases;

Expand Down Expand Up @@ -2937,7 +2935,7 @@ sub print_person
print 'Found ', scalar(@occupations), " occupation(s)\n" if($opts{'v'});

my $same_occupation_as_father;
my $bio;
my $bio; # This is used to generate the texts for the static page

if($occupations[0]) {
my @foccupations;
Expand Down Expand Up @@ -2986,6 +2984,7 @@ sub print_person
}

my $print_sibling_count = 0;
my $fullbio; # This is used to generate pop-ups in dynamic pages

if(($father || $mother) &&
((!$is_alive) || $opts{'l'} || (!defined($me)) || ($person->xref() eq $me->xref()))) {
Expand Down Expand Up @@ -3218,7 +3217,7 @@ sub print_person
if((!$is_alive) || $opts{'l'} || (!defined($me)) || ($person->xref() ne $me->xref())) {
if($opts{'l'} || $is_alive) {
if($relationship) {
$bio .= ', ' if($mother || $father);
$bio .= ', ' if(length($bio));
if($phrase->length()) {
$phrase->append(', ');
}
Expand Down Expand Up @@ -3282,8 +3281,6 @@ sub print_person
undef $bio;
}

my $bio_dt = Data::Text->new();

my $haveprintedspousename;
if($relationship) {
my $article;
Expand Down Expand Up @@ -3378,6 +3375,7 @@ sub print_person
my $start_of_paragraph = 0;
my $end_of_sentence = 0;
my $printed_and = 0;
my $bio_dt = Data::Text->new(); # This is used to generate the dynamic text

my @childrenunknownparent;
my @residences = get_all_residences($person);
Expand Down Expand Up @@ -3707,7 +3705,7 @@ sub print_person
$phrase = Data::Text->new();
}
if(scalar(@phrases)) {
$bio_dt->append(conjunction(map { $_->as_string() } @phrases))->append('.');
$bio_dt->set(conjunction(map { $_->as_string() } @phrases))->append('.');
@phrases = ();
}
}
Expand Down

0 comments on commit e0a8262

Please sign in to comment.