Skip to content

Commit

Permalink
Fix "in in"
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Jun 11, 2024
1 parent fbed602 commit 4eec9a2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions ged2site
Original file line number Diff line number Diff line change
Expand Up @@ -10687,7 +10687,6 @@ sub place {
# $place =~ s/\xc3\xa9/é/g;
$place =~ s/\xc3\xa9/\N{U+00E9}/g;

warn "rc = $rc ($place)" if($params{'person'} && ($params{'person'}->xref() eq 'I_418560157'));
if(($place =~ /(.+?)\s*United States$/i) || ($place =~ /(.+?)\s*United States of America$/i)) {
$place = "$1 USA";
$rc->en($place);
Expand Down Expand Up @@ -10768,7 +10767,6 @@ warn "rc = $rc ($place)" if($params{'person'} && ($params{'person'}->xref() eq '
}
}

warn "rc = $rc ($place)" if($params{'person'} && ($params{'person'}->xref() eq 'I_418560157'));
if($params{'person'}) {
validate_place({ person => $params{'person'}, place => $rc });
}
Expand Down Expand Up @@ -10831,7 +10829,6 @@ warn "rc = $rc ($place)" if($params{'person'} && ($params{'person'}->xref() eq '
return ' in the USA';
}

warn "rc = $rc ($place)" if($params{'person'} && ($params{'person'}->xref() eq 'I_418560157'));
if($address) {
# utf8::decode($address);
if($params{'nopreposition'}) {
Expand All @@ -10858,9 +10855,7 @@ warn "rc = $rc ($place)" if($params{'person'} && ($params{'person'}->xref() eq '
}
$rc->set({ lang => $lang, string => $place });

warn "rc = $rc ($place)" if($params{'person'} && ($params{'person'}->xref() eq 'I_418560157'));
if(my $places_printed = $params{'places_printed'}) {
warn "rc = $rc ($place)" if($params{'person'} && ($params{'person'}->xref() eq 'I_418560157'));
if(($language eq 'French') && ($place =~ /(.+), London, England/)) {
$place = "$1, Londres, Angleterre";
$rc->fr($place);
Expand All @@ -10880,13 +10875,18 @@ warn "rc = $rc ($place)" if($params{'person'} && ($params{'person'}->xref() eq '
}
my $road = $1;
my $town = $2;
my $country = $4;
if(($town !~ /,/) || !defined($address)) {
if($language eq 'French') {
return "$road \N{U+00E0}$town";
}
# Avoid "in in Paris"
$road =~ s/^\s*in//;
$road =~ s/\s+$//;
$town =~ s/\s+$//;
if(($road eq '') && ($town eq '')) {
return "in$country";
}
return "$road in$town";
}
return $address;
Expand Down Expand Up @@ -10924,7 +10924,6 @@ warn "rc = $rc ($place)" if($params{'person'} && ($params{'person'}->xref() eq '
}

if($lcm) {
warn "rc = $rc ($place)" if($params{'person'} && ($params{'person'}->xref() eq 'I_418560157'));
$rc->set({ lang => $lang, string => $place });
if($place =~ /(.*),\s+([A-Z\s]+)$/i) {
my $c = $2;
Expand Down

0 comments on commit 4eec9a2

Please sign in to comment.