fix further places where translated discussion case was assumed

Another benefit is that consistently using gettext("Discussion")
eliminates the need to translate one string.
master
Joey Hess 2009-06-04 13:20:52 -04:00
parent 6842328405
commit 059d6f01fa
6 changed files with 6 additions and 6 deletions

View File

@ -30,7 +30,7 @@ sub preprocess (@) {
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};

View File

@ -230,7 +230,7 @@ sub cgi_editpage ($$) {
$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 {

View File

@ -354,7 +354,7 @@ sub preprocess_inline (@) {
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})) {

View File

@ -23,7 +23,7 @@ sub canedit ($$) {
my $cgi=shift;
my $session=shift;
my $discussion=gettext("discussion");
my $discussion=lc(gettext("Discussion"));
return "" if $page=~/(\/|^)\Q$discussion\E$/;
return undef;
}

View File

@ -34,7 +34,7 @@ sub preprocess (@) {
}
my @orphans;
my $discussion=gettext("discussion");
my $discussion=lc(gettext("Discussion"));
foreach my $page (pagespec_match_list(
[ grep { ! $linkedto{$_} && $_ ne 'index' }
keys %pagesources ],

View File

@ -146,7 +146,7 @@ sub scan ($) {
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}=[];