Skip to content

Commit

Permalink
Improve the grammar with orphaned twins
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Feb 9, 2025
1 parent 05c6d91 commit ef76502
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,14 @@ mention goes to the [Gedcom](http://search.cpan.org/~pjcj/Gedcom/) module.

## LICENSE AND COPYRIGHT

Copyright 2015-2024 Nigel Horne.
Copyright 2015-2025 Nigel Horne.

This program is released under the following licence: GPL for personal use on a single computer.
All other users (including Commercial, Charity, Educational, Government)
must apply in writing for a licence for use from Nigel Horne at
`<njh at nigelhorne.com>`.

## Support

Please report any bugs or feature requests to the author.
This module is provided as-is without any warranty.
20 changes: 10 additions & 10 deletions gedcom
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,8 @@ if($opts{'h'}) {
}
}

if($opts{'f'}) {
$opts{'w'} = 1;
}
if($opts{'P'}) {
$opts{'r'} = 1;
}
$opts{'w'} = 1 if($opts{'f'});
$opts{'r'} = 1 if($opts{'P'});

die '-w option needs -d or -M option' if($opts{'w'} && (!$opts{'M'}) && !$opts{'d'});

Expand Down Expand Up @@ -3818,7 +3814,11 @@ sub print_person
}
if((($fyod - $yob) < 16) && (($myod - $yob) < 16)) {
if(scalar(@phrases) == 0) {
$phrase->append("$pronoun ");
if(length($phrase) > 0) {
$phrase->rtrim()->append(', ' . lcfirst($pronoun) . ' ');
} else {
$phrase->set("$pronoun ");
}
}
$phrase->append('was orphaned ');
if($myod == $fyod) {
Expand All @@ -3832,12 +3832,12 @@ sub print_person
} elsif($myod > $fyod) {
$phrase->append('at the age of ' . ($myod - $yob) .
i18n(' following the death of ') .
$person->possessive() .
lcfirst($person->possessive()) .
" father in $fyod and mother in $myod");
} else {
$phrase->append('at the age of ' . ($fyod - $yob) .
i18n(' following the death of ') .
$person->possessive() .
lcfirst($person->possessive()) .
" mother in $myod and father in $fyod");
}
push @phrases, $phrase;
Expand Down Expand Up @@ -6081,7 +6081,7 @@ sub print_person
print Data::Dumper->new([\@residencestringarray])->Dump() if($opts{'v'});
Lingua::Conjunction->separator_phrase(';');
Lingua::Conjunction->penultimate(1);
$phrase->append("$s " . conjunction(@residencestringarray));
$phrase->append([ "$s ", conjunction(@residencestringarray)]);
Lingua::Conjunction->separator_phrase(',');
Lingua::Conjunction->penultimate(0);

Expand Down

0 comments on commit ef76502

Please sign in to comment.