]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
fix further places where translated discussion case was assumed
authorJoey Hess <joey@gnu.kitenet.net>
Thu, 4 Jun 2009 17:20:52 +0000 (13:20 -0400)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 4 Jun 2009 17:20:52 +0000 (13:20 -0400)
Another benefit is that consistently using gettext("Discussion")
eliminates the need to translate one string.

IkiWiki/Plugin/brokenlinks.pm
IkiWiki/Plugin/editpage.pm
IkiWiki/Plugin/inline.pm
IkiWiki/Plugin/opendiscussion.pm
IkiWiki/Plugin/orphans.pm
IkiWiki/Render.pm

index da97dbc2855bc59f17efe5792bacb6c36fe8e7f7..cf8f25281585fff56ee8b11dd9c58bdfc64b793c 100644 (file)
@@ -30,7 +30,7 @@ sub preprocess (@) {
        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};
index 8effc02d0dbee4b51e3db29d05e9f1b151e576fa..467cd9ed5bf54827da0f75d03304918ba8947a71 100644 (file)
@@ -230,7 +230,7 @@ sub cgi_editpage ($$) {
                                $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 {
index 27ea1c4a64bf8ebca3be99755c86a08a2192cb65..9d5ebc34daaeb6aa942f41b1424ece4ba00c9036 100644 (file)
@@ -354,7 +354,7 @@ sub preprocess_inline (@) {
                                        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})) {
index 3da01efee154988d1432d0ed54680525569e224c..60b193eca04fb08702a99077aa911f66dbc33705 100644 (file)
@@ -23,7 +23,7 @@ sub canedit ($$) {
        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;
 }
index cf74c9b794bb4977d0ed8eb17fbc6e36ed045ba0..944eba54123ba0a6adec21ae8ff90284521785f5 100644 (file)
@@ -34,7 +34,7 @@ sub preprocess (@) {
        }
        
        my @orphans;
        }
        
        my @orphans;
-       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 ],
index ba1d1eae5705e156fe65baac158170300a3de8c5..f4de19378e86223bf7c2d518a5c618f7a47d120d 100644 (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.
                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}=[];