]> sipb.mit.edu Git - ikiwiki.git/commitdiff
po(scan): removed scary comment about only wanting to change the first link
authorintrigeri <intrigeri@boum.org>
Thu, 27 Aug 2009 17:59:15 +0000 (19:59 +0200)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 27 Aug 2009 19:48:02 +0000 (15:48 -0400)
Signed-off-by: intrigeri <intrigeri@boum.org>
(cherry picked from commit 3c2bffe21b91684971155ab41b15dacc515b2fc5)

IkiWiki/Plugin/po.pm

index a9517adce2b0ce00dad8ce4f57263a173cdc68e5..61f8db3283a5cdffaf7743354628eeda1ec059ea 100644 (file)
@@ -204,10 +204,7 @@ sub scan (@) {
        if (istranslation($page)) {
                foreach my $destpage (@{$links{$page}}) {
                        if (istranslatable($destpage)) {
        if (istranslation($page)) {
                foreach my $destpage (@{$links{$page}}) {
                        if (istranslatable($destpage)) {
-                               # replace one occurence of $destpage in $links{$page}
-                               # (we only want to replace the one that was added by
-                               # IkiWiki::Plugin::link::scan, other occurences may be
-                               # there for other reasons)
+                               # replace the occurence of $destpage in $links{$page}
                                for (my $i=0; $i<@{$links{$page}}; $i++) {
                                        if (@{$links{$page}}[$i] eq $destpage) {
                                                @{$links{$page}}[$i] = $destpage . '.' . lang($page);
                                for (my $i=0; $i<@{$links{$page}}; $i++) {
                                        if (@{$links{$page}}[$i] eq $destpage) {
                                                @{$links{$page}}[$i] = $destpage . '.' . lang($page);