Another benefit is that consistently using gettext("Discussion")
eliminates the need to translate one string.
my %broken;
foreach my $page (pagespec_match_list([keys %links],
$params{pages}, location => $params{page})) {
my %broken;
foreach my $page (pagespec_match_list([keys %links],
$params{pages}, location => $params{page})) {
- my $discussion=gettext("discussion");
+ my $discussion=gettext("Discussion");
my %seen;
foreach my $link (@{$links{$page}}) {
next if $seen{$link};
my %seen;
foreach my $link (@{$links{$page}}) {
next if $seen{$link};
$dir=~s![^/]+/+$!!;
if ((defined $form->field('subpage') && length $form->field('subpage')) ||
$dir=~s![^/]+/+$!!;
if ((defined $form->field('subpage') && length $form->field('subpage')) ||
- $page eq gettext('discussion')) {
+ $page eq lc(gettext('Discussion'))) {
$best_loc="$from/$page";
}
else {
$best_loc="$from/$page";
}
else {
my $file = $pagesources{$page};
my $type = pagetype($file);
if ($config{discussion}) {
my $file = $pagesources{$page};
my $type = pagetype($file);
if ($config{discussion}) {
- my $discussionlink=gettext("discussion");
+ my $discussionlink=lc(gettext("Discussion"));
if ($page !~ /.*\/\Q$discussionlink\E$/ &&
(length $config{cgiurl} ||
exists $links{$page."/".$discussionlink})) {
if ($page !~ /.*\/\Q$discussionlink\E$/ &&
(length $config{cgiurl} ||
exists $links{$page."/".$discussionlink})) {
my $cgi=shift;
my $session=shift;
my $cgi=shift;
my $session=shift;
- my $discussion=gettext("discussion");
+ my $discussion=lc(gettext("Discussion"));
return "" if $page=~/(\/|^)\Q$discussion\E$/;
return undef;
}
return "" if $page=~/(\/|^)\Q$discussion\E$/;
return undef;
}
- my $discussion=gettext("discussion");
+ my $discussion=lc(gettext("Discussion"));
foreach my $page (pagespec_match_list(
[ grep { ! $linkedto{$_} && $_ ne 'index' }
keys %pagesources ],
foreach my $page (pagespec_match_list(
[ grep { ! $linkedto{$_} && $_ ne 'index' }
keys %pagesources ],
if ($config{discussion}) {
# Discussion links are a special case since they're
# not in the text of the page, but on its template.
if ($config{discussion}) {
# Discussion links are a special case since they're
# not in the text of the page, but on its template.
- $links{$page}=[ $page."/".gettext("discussion") ];
+ $links{$page}=[ $page."/".lc(gettext("Discussion")) ];
}
else {
$links{$page}=[];
}
else {
$links{$page}=[];