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
parent
6842328405
commit
059d6f01fa
|
@ -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};
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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})) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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 ],
|
||||
|
|
|
@ -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}=[];
|
||||
|
|
Loading…
Reference in New Issue