diff options
-rw-r--r-- | IkiWiki/Plugin/meta.pm | 19 | ||||
-rw-r--r-- | po/bg.po | 13 | ||||
-rw-r--r-- | po/cs.po | 13 | ||||
-rw-r--r-- | po/da.po | 13 | ||||
-rw-r--r-- | po/es.po | 13 | ||||
-rw-r--r-- | po/fr.po | 13 | ||||
-rw-r--r-- | po/gu.po | 13 | ||||
-rw-r--r-- | po/ikiwiki.pot | 10 | ||||
-rw-r--r-- | po/pl.po | 13 | ||||
-rw-r--r-- | po/sv.po | 13 | ||||
-rw-r--r-- | po/vi.po | 13 |
11 files changed, 82 insertions, 64 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 968e6ccee..4aa545a93 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -71,6 +71,7 @@ sub preprocess (@) { #{{{ } } elsif ($key eq 'redir') { + return "" if $destpage ne $page; my $safe=0; if ($value !~ /^\w+:\/\//) { add_depends($page, $value); @@ -78,13 +79,21 @@ sub preprocess (@) { #{{{ if (! length $link) { return "[[meta ".gettext("redir page not found")."]]"; } + + $value=urlto($link, $page); + $safe=1; + + # redir cycle detection $pagestate{$page}{meta}{redir}=$link; - if ($pagestate{$link}{meta}{redir}) { - # TODO: real cycle detection - return "[[meta ".gettext("redir not allowed to point to a page that contains a redir")."]]"; + my $at=$page; + my %seen; + while (exists $pagestate{$at}{meta}{redir}) { + if ($seen{$at}) { + return "[[meta ".gettext("redir cycle is not allowed")."]]"; + } + $seen{$at}=1; + $at=$pagestate{$at}{meta}{redir}; } - $value=urlto($link, $destpage); - $safe=1; } else { $value=encode_entities($value); @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki-bg\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-12-08 17:15-0500\n" +"POT-Creation-Date: 2007-12-08 19:18-0500\n" "PO-Revision-Date: 2007-01-12 01:19+0200\n" "Last-Translator: Damyan Ivanov <dam@modsodtsys.com>\n" "Language-Team: Bulgarian <dict@fsa-bg.org>\n" @@ -228,16 +228,17 @@ msgstr "" "грешка при зареждането на perl-модула „Markdown.pm” (%s) или „/usr/bin/" "markdown” (%s)" -#: ../IkiWiki/Plugin/meta.pm:77 +#: ../IkiWiki/Plugin/meta.pm:80 #, fuzzy msgid "redir page not found" msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/meta.pm:82 -msgid "redir not allowed to point to a page that contains a redir" -msgstr "" +#: ../IkiWiki/Plugin/meta.pm:92 +#, fuzzy +msgid "redir cycle is not allowed" +msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/meta.pm:118 +#: ../IkiWiki/Plugin/meta.pm:129 #, fuzzy msgid "stylesheet not found" msgstr "шаблонът „%s” не е намерен" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-12-08 17:15-0500\n" +"POT-Creation-Date: 2007-12-08 19:18-0500\n" "PO-Revision-Date: 2007-05-09 21:21+0200\n" "Last-Translator: Miroslav Kure <kurem@debian.cz>\n" "Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n" @@ -218,16 +218,17 @@ msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "" "selhalo nahrání perlového modulu Markdown.pm (%s) nebo /usr/bin/markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:77 +#: ../IkiWiki/Plugin/meta.pm:80 #, fuzzy msgid "redir page not found" msgstr "zdroj nebyl nalezen" -#: ../IkiWiki/Plugin/meta.pm:82 -msgid "redir not allowed to point to a page that contains a redir" -msgstr "" +#: ../IkiWiki/Plugin/meta.pm:92 +#, fuzzy +msgid "redir cycle is not allowed" +msgstr "zdroj nebyl nalezen" -#: ../IkiWiki/Plugin/meta.pm:118 +#: ../IkiWiki/Plugin/meta.pm:129 msgid "stylesheet not found" msgstr "styl nebyl nalezen" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-12-08 17:15-0500\n" +"POT-Creation-Date: 2007-12-08 19:18-0500\n" "PO-Revision-Date: 2007-10-16 23:07+0100\n" "Last-Translator: Jonas Smedegaard <dr@jones.dk>\n" "Language-Team: Danish <dansk@klid.dk>\n" @@ -222,16 +222,17 @@ msgstr "" "Indlæsning af perl-modulet Markdown.pm (%s) eller /usr/bin/markdown (%s) " "mislykkedes" -#: ../IkiWiki/Plugin/meta.pm:77 +#: ../IkiWiki/Plugin/meta.pm:80 #, fuzzy msgid "redir page not found" msgstr "fødning ikke fundet" -#: ../IkiWiki/Plugin/meta.pm:82 -msgid "redir not allowed to point to a page that contains a redir" -msgstr "" +#: ../IkiWiki/Plugin/meta.pm:92 +#, fuzzy +msgid "redir cycle is not allowed" +msgstr "fødning ikke fundet" -#: ../IkiWiki/Plugin/meta.pm:118 +#: ../IkiWiki/Plugin/meta.pm:129 msgid "stylesheet not found" msgstr "stilsnit (stylesheet) ikke fundet" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: es\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-12-08 17:15-0500\n" +"POT-Creation-Date: 2007-12-08 19:18-0500\n" "PO-Revision-Date: 2007-04-28 22:01+0200\n" "Last-Translator: Víctor Moral <victor@taquiones.net>\n" "Language-Team: Spanish <es@li.org>\n" @@ -223,16 +223,17 @@ msgstr "" "no he podido cargar el módulo Perl Markdown.pm (%s) ó no he podido ejecutar " "el programa /usr/bin/markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:77 +#: ../IkiWiki/Plugin/meta.pm:80 #, fuzzy msgid "redir page not found" msgstr "fuente de datos no encontrada" -#: ../IkiWiki/Plugin/meta.pm:82 -msgid "redir not allowed to point to a page that contains a redir" -msgstr "" +#: ../IkiWiki/Plugin/meta.pm:92 +#, fuzzy +msgid "redir cycle is not allowed" +msgstr "fuente de datos no encontrada" -#: ../IkiWiki/Plugin/meta.pm:118 +#: ../IkiWiki/Plugin/meta.pm:129 msgid "stylesheet not found" msgstr "hoja de estilo no encontrada " @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-12-08 17:15-0500\n" +"POT-Creation-Date: 2007-12-08 19:18-0500\n" "PO-Revision-Date: 2007-08-28 21:05+0200\n" "Last-Translator: Cyril Brulebois <cyril.brulebois@enst-bretagne.fr>\n" "Language-Team: French <debian-l10n-french@lists.debian.org>\n" @@ -224,16 +224,17 @@ msgstr "" "Échec du chargement du module Perl Markdown.pm (%s) ou de /usr/bin/markdown " "(%s)" -#: ../IkiWiki/Plugin/meta.pm:77 +#: ../IkiWiki/Plugin/meta.pm:80 #, fuzzy msgid "redir page not found" msgstr "Flux introuvable " -#: ../IkiWiki/Plugin/meta.pm:82 -msgid "redir not allowed to point to a page that contains a redir" -msgstr "" +#: ../IkiWiki/Plugin/meta.pm:92 +#, fuzzy +msgid "redir cycle is not allowed" +msgstr "Flux introuvable " -#: ../IkiWiki/Plugin/meta.pm:118 +#: ../IkiWiki/Plugin/meta.pm:129 msgid "stylesheet not found" msgstr "Feuille de style introuvable " @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki-gu\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-12-08 17:15-0500\n" +"POT-Creation-Date: 2007-12-08 19:18-0500\n" "PO-Revision-Date: 2007-01-11 16:05+0530\n" "Last-Translator: Kartik Mistry <kartik.mistry@gmail.com>\n" "Language-Team: Gujarati <team@utkarsh.org>\n" @@ -218,16 +218,17 @@ msgstr "%s એ %s દ્વારા તાળું મરાયેલ છે msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "Markdown.pm પર્લ મોડ્યુલ (%s) અથવા /usr/bin/markdown (%s) લાવવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/meta.pm:77 +#: ../IkiWiki/Plugin/meta.pm:80 #, fuzzy msgid "redir page not found" msgstr "ફીડ મળ્યું નહી" -#: ../IkiWiki/Plugin/meta.pm:82 -msgid "redir not allowed to point to a page that contains a redir" -msgstr "" +#: ../IkiWiki/Plugin/meta.pm:92 +#, fuzzy +msgid "redir cycle is not allowed" +msgstr "ફીડ મળ્યું નહી" -#: ../IkiWiki/Plugin/meta.pm:118 +#: ../IkiWiki/Plugin/meta.pm:129 msgid "stylesheet not found" msgstr "સ્ટાઇલશીટ મળ્યું નહી" diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index d928d1414..c8ff704ed 100644 --- a/po/ikiwiki.pot +++ b/po/ikiwiki.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-12-08 18:30-0500\n" +"POT-Creation-Date: 2007-12-08 19:38-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -218,15 +218,15 @@ msgstr "" msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "" -#: ../IkiWiki/Plugin/meta.pm:79 +#: ../IkiWiki/Plugin/meta.pm:80 msgid "redir page not found" msgstr "" -#: ../IkiWiki/Plugin/meta.pm:84 -msgid "redir not allowed to point to a page that contains a redir" +#: ../IkiWiki/Plugin/meta.pm:92 +msgid "redir cycle is not allowed" msgstr "" -#: ../IkiWiki/Plugin/meta.pm:120 +#: ../IkiWiki/Plugin/meta.pm:129 msgid "stylesheet not found" msgstr "" @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 1.51\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-12-08 17:15-0500\n" +"POT-Creation-Date: 2007-12-08 19:18-0500\n" "PO-Revision-Date: 2007-04-27 22:05+0200\n" "Last-Translator: Pawel Tecza <ptecza@net.icm.edu.pl>\n" "Language-Team: Debian L10n Polish <debian-l10n-polish@lists.debian.org>\n" @@ -231,16 +231,17 @@ msgstr "" "Awaria w trakcie ładowania perlowego modułu Markdown.pm (%s) lub " "uruchamiania programu /usr/bin/markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:77 +#: ../IkiWiki/Plugin/meta.pm:80 #, fuzzy msgid "redir page not found" msgstr "nieznaleziony kanał RSS" -#: ../IkiWiki/Plugin/meta.pm:82 -msgid "redir not allowed to point to a page that contains a redir" -msgstr "" +#: ../IkiWiki/Plugin/meta.pm:92 +#, fuzzy +msgid "redir cycle is not allowed" +msgstr "nieznaleziony kanał RSS" -#: ../IkiWiki/Plugin/meta.pm:118 +#: ../IkiWiki/Plugin/meta.pm:129 #, fuzzy msgid "stylesheet not found" msgstr "nieznaleziony szablon ze stylami CSS" @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-12-08 17:15-0500\n" +"POT-Creation-Date: 2007-12-08 19:18-0500\n" "PO-Revision-Date: 2007-01-10 23:47+0100\n" "Last-Translator: Daniel Nylander <po@danielnylander.se>\n" "Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n" @@ -224,16 +224,17 @@ msgstr "" "misslyckades med att läsa in Perl-modulen Markdown.pm (%s) eller /usr/bin/" "markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:77 +#: ../IkiWiki/Plugin/meta.pm:80 #, fuzzy msgid "redir page not found" msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/meta.pm:82 -msgid "redir not allowed to point to a page that contains a redir" -msgstr "" +#: ../IkiWiki/Plugin/meta.pm:92 +#, fuzzy +msgid "redir cycle is not allowed" +msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/meta.pm:118 +#: ../IkiWiki/Plugin/meta.pm:129 #, fuzzy msgid "stylesheet not found" msgstr "mallen %s hittades inte" @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2007-12-08 17:15-0500\n" +"POT-Creation-Date: 2007-12-08 19:18-0500\n" "PO-Revision-Date: 2007-01-13 15:31+1030\n" "Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n" "Language-Team: Vietnamese <vi-VN@googlegroups.com>\n" @@ -225,16 +225,17 @@ msgstr "%s bị %s khoá nên không thể sửa được" msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "lỗi nạp mô-đun perl Markdown.pm (%s) hay « /usr/bin/markdown » (%s)" -#: ../IkiWiki/Plugin/meta.pm:77 +#: ../IkiWiki/Plugin/meta.pm:80 #, fuzzy msgid "redir page not found" msgstr "không tìm thấy mẫu %s" -#: ../IkiWiki/Plugin/meta.pm:82 -msgid "redir not allowed to point to a page that contains a redir" -msgstr "" +#: ../IkiWiki/Plugin/meta.pm:92 +#, fuzzy +msgid "redir cycle is not allowed" +msgstr "không tìm thấy mẫu %s" -#: ../IkiWiki/Plugin/meta.pm:118 +#: ../IkiWiki/Plugin/meta.pm:129 #, fuzzy msgid "stylesheet not found" msgstr "không tìm thấy mẫu %s" |