From 4af4d26582f0c2b915d7102fb4a604b176385748 Mon Sep 17 00:00:00 2001 From: David Riebenbauer Date: Sat, 30 Jan 2010 10:25:10 +0100 Subject: Make srcfile() return undef, if the file isn't there. This has the advantage that it's now possible to check for the existence of a sourcefile with that function. --- IkiWiki.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index b8e599928..cb1c46a68 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -743,7 +743,10 @@ sub srcfile_stat { } sub srcfile ($;$) { - return (srcfile_stat(@_))[0]; + if (my @stat=srcfile_stat(@_)) { + return $stat[0]; + } + return undef } sub add_underlay ($) { -- cgit v1.2.3 From b18fde2bde0c7d445fd4aab3cd35add8c211aab4 Mon Sep 17 00:00:00 2001 From: David Riebenbauer Date: Sun, 31 Jan 2010 02:31:12 +0100 Subject: Add a function add_autofiles(). The objective is to provide a sensible way to let plugins add files during the "scan stage" of the build. Currently does a little verification and adds the file to the global array @add_autofiles. --- IkiWiki.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index cb1c46a68..115c512d3 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -14,7 +14,7 @@ use open qw{:utf8 :std}; use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %pagestate %wikistate %renderedfiles %oldrenderedfiles %pagesources %destsources %depends %depends_simple %hooks - %forcerebuild %loaded_plugins}; + %forcerebuild %loaded_plugins @autofiles}; use Exporter q{import}; our @EXPORT = qw(hook debug error template htmlpage deptype @@ -1898,6 +1898,14 @@ sub add_link ($$) { unless grep { $_ eq $link } @{$links{$page}}; } +sub add_autofile ($) { + my $addfile=shift; + my ($file,$page) = verify_src_file($addfile,$config{srcdir}); + if ($page) { + push @autofiles, $file; + } +} + sub pagespec_translate ($) { my $spec=shift; -- cgit v1.2.3 From f58f3e1bec41ccf9316f37b014ce0b373c8e49e1 Mon Sep 17 00:00:00 2001 From: David Riebenbauer Date: Tue, 2 Feb 2010 11:01:24 +0100 Subject: Revert the effects of find_del_files() for (re)autoadded files. This also means that if autoadded files are deleted they will just be recreated. --- IkiWiki.pm | 3 ++- IkiWiki/Render.pm | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 115c512d3..ad9fb7c79 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -14,7 +14,8 @@ use open qw{:utf8 :std}; use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %pagestate %wikistate %renderedfiles %oldrenderedfiles %pagesources %destsources %depends %depends_simple %hooks - %forcerebuild %loaded_plugins @autofiles}; + %forcerebuild %loaded_plugins @autofiles %dellinks + %delrenderedfiles}; use Exporter q{import}; our @EXPORT = qw(hook debug error template htmlpage deptype diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index dd4d9ca0c..d2fa80fbb 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -392,7 +392,9 @@ sub find_del_files ($) { else { push @del, $pagesources{$page}; } + $dellinks{$page}= $links{$page}; $links{$page}=[]; + $delrenderedfiles{$page}= $renderedfiles{$page}; $renderedfiles{$page}=[]; $pagemtime{$page}=0; } @@ -642,8 +644,14 @@ sub refresh () { scan($file); } + my %del_hash = map {$_, 1} @$del; while (my $autofile = shift (@autofiles)) { my $page=pagename($autofile); + if (exists $del_hash{$page}) { + $links{$page}= $dellinks{$page}; + $renderedfiles{$page}= $delrenderedfiles{$page}; + delete $del_hash{$page}; + } if ($pages->{$page}) { debug(sprintf(gettext("%s has multiple possible source pages"), $page)); } @@ -655,6 +663,7 @@ sub refresh () { scan($autofile); } + $del = [keys %del_hash]; calculate_links(); -- cgit v1.2.3 From 25741100b0a0d81ae5113dfabe5a1ed84cdf8746 Mon Sep 17 00:00:00 2001 From: David Riebenbauer Date: Tue, 2 Feb 2010 12:12:23 +0100 Subject: Export add_autofile() for use in Plugins. --- IkiWiki.pm | 2 +- IkiWiki/Plugin/tag.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index ad9fb7c79..7d7f430b3 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -23,7 +23,7 @@ our @EXPORT = qw(hook debug error template htmlpage deptype htmllink readfile writefile pagetype srcfile pagename displaytime will_render gettext urlto targetpage add_underlay pagetitle titlepage linkpage newpagefile - inject add_link + inject add_link add_autofile %config %links %pagestate %wikistate %renderedfiles %pagesources %destsources); our $VERSION = 3.00; # plugin interface version, next is ikiwiki version diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index 90833fd9c..c0b7feb23 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -79,7 +79,7 @@ sub gentag ($) { $template->param(tag => $tag); writefile($tagfile, $config{srcdir}, $template->output); - IkiWiki::add_autofile("$config{srcdir}/$tagfile"); + add_autofile("$config{srcdir}/$tagfile"); } } -- cgit v1.2.3 From bd1e29b8c4d2c2e0329789d1baf0a879617aeee4 Mon Sep 17 00:00:00 2001 From: David Riebenbauer Date: Wed, 3 Feb 2010 02:35:19 +0100 Subject: Revert "Make srcfile() return undef, if the file isn't there." This reverts commit 1bde208ec9b915db0187030c33450b5accb4892c. --- IkiWiki.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 7d7f430b3..90e623330 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -744,10 +744,7 @@ sub srcfile_stat { } sub srcfile ($;$) { - if (my @stat=srcfile_stat(@_)) { - return $stat[0]; - } - return undef + return (srcfile_stat(@_))[0]; } sub add_underlay ($) { -- cgit v1.2.3 From cfcb3d18808a753a90b042462d1dd71fcb7c82b5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 4 Feb 2010 15:17:21 -0500 Subject: remove userlink() That was dead code; changes to lockedit and recentchanges removed the last callers. --- IkiWiki.pm | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index b8e599928..6226824df 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1125,23 +1125,6 @@ sub openiduser ($) { return; } -sub userlink ($) { - my $user=shift; - - my $oiduser=eval { openiduser($user) }; - if (defined $oiduser) { - return "$oiduser"; - } - else { - eval q{use CGI 'escapeHTML'}; - error($@) if $@; - - return htmllink("", "", escapeHTML( - length $config{userdir} ? $config{userdir}."/".$user : $user - ), noimageinline => 1); - } -} - sub htmlize ($$$$) { my $page=shift; my $destpage=shift; -- cgit v1.2.3 From 8380a9d0009fee740f980aee3d45a933a5b24219 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 4 Feb 2010 18:24:15 -0500 Subject: factor out a userpage function Not yet exported, as only 4 quite core plugins use it. --- IkiWiki.pm | 5 +++++ IkiWiki/Plugin/comments.pm | 5 ++--- IkiWiki/Plugin/editpage.pm | 5 +++-- IkiWiki/Plugin/passwordauth.pm | 2 +- IkiWiki/Plugin/recentchanges.pm | 2 +- 5 files changed, 12 insertions(+), 7 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 6226824df..0715f1869 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1090,6 +1090,11 @@ sub htmllink ($$$;@) { return "$linktext"; } +sub userpage ($) { + my $user=shift; + return length $config{userdir} ? "$config{userdir}/$user" : $user; +} + sub openiduser ($) { my $user=shift; diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 5586cca52..caed0d58c 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -171,9 +171,8 @@ sub preprocess { else { $commentauthorurl = IkiWiki::cgiurl( do => 'goto', - page => (length $config{userdir} - ? "$config{userdir}/$commentuser" - : "$commentuser")); + page => IkiWiki::userpage($commentuser) + ); $commentauthor = $commentuser; } diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index fca970c60..219386a30 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -245,8 +245,9 @@ sub cgi_editpage ($$) { push @page_locs, $dir.$page; } - push @page_locs, "$config{userdir}/$page" - if length $config{userdir}; + my $userpage=IkiWiki::userpage($page); + push @page_locs, $userpage + if ! grep { $_ eq $userpage } @page_locs; } @page_locs = grep { diff --git a/IkiWiki/Plugin/passwordauth.pm b/IkiWiki/Plugin/passwordauth.pm index b3a798055..c07065b7d 100644 --- a/IkiWiki/Plugin/passwordauth.pm +++ b/IkiWiki/Plugin/passwordauth.pm @@ -223,7 +223,7 @@ sub formbuilder_setup (@) { shift eq $form->field("password"); }); - my $userpage=$config{userdir} ? $config{userdir}."/".$user : $user; + my $userpage=IkiWiki::userpage($user); if (exists $pagesources{$userpage}) { $form->text(gettext("Your user page: "). htmllink("", "", $userpage, diff --git a/IkiWiki/Plugin/recentchanges.pm b/IkiWiki/Plugin/recentchanges.pm index fa851e466..5c7b71aaa 100644 --- a/IkiWiki/Plugin/recentchanges.pm +++ b/IkiWiki/Plugin/recentchanges.pm @@ -124,7 +124,7 @@ sub store ($$$) { elsif (length $config{cgiurl}) { $change->{authorurl} = IkiWiki::cgiurl( do => "goto", - page => (length $config{userdir} ? "$config{userdir}/" : "").$change->{author}, + page => IkiWiki::userpage($change->{author}), ); } -- cgit v1.2.3 From 03777230ea17220527b7cd45b9a57770e859623c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 6 Feb 2010 15:29:25 -0500 Subject: update comment re openid library version --- IkiWiki.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 0715f1869..2a0132745 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1103,11 +1103,10 @@ sub openiduser ($) { my $display; if (Net::OpenID::VerifiedIdentity->can("DisplayOfURL")) { - # this works in at least 2.x $display = Net::OpenID::VerifiedIdentity::DisplayOfURL($user); } else { - # this only works in 1.x + # backcompat with old version my $oid=Net::OpenID::VerifiedIdentity->new(identity => $user); $display=$oid->display; } -- cgit v1.2.3 From e11876b7003c700fbc3717ca9c5af5aac3b72ac2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Feb 2010 18:25:10 -0500 Subject: httpauth: Add httpauth_pagespec setting that can be used to limit pages to only being edited via users authed with httpauth. --- IkiWiki.pm | 7 ++++- IkiWiki/Plugin/httpauth.pm | 75 +++++++++++++++++++++++++++++++++------------- debian/changelog | 2 ++ doc/plugins/httpauth.mdwn | 9 ++++++ 4 files changed, 72 insertions(+), 21 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 2a0132745..de7dbfc79 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -941,7 +941,12 @@ sub linkpage ($) { sub cgiurl (@) { my %params=@_; - return $config{cgiurl}."?". + my $cgiurl=$config{cgiurl}; + if (exists $params{cgiurl}) { + $cgiurl=$params{cgiurl}; + delete $params{cgiurl}; + } + return $cgiurl."?". join("&", map $_."=".uri_escape_utf8($params{$_}), keys %params); } diff --git a/IkiWiki/Plugin/httpauth.pm b/IkiWiki/Plugin/httpauth.pm index d0d4da0b7..202ca1153 100644 --- a/IkiWiki/Plugin/httpauth.pm +++ b/IkiWiki/Plugin/httpauth.pm @@ -9,10 +9,10 @@ use IkiWiki 3.00; sub import { hook(type => "getsetup", id => "httpauth", call => \&getsetup); hook(type => "auth", id => "httpauth", call => \&auth); - hook(type => "canedit", id => "httpauth", call => \&canedit, - last => 1); hook(type => "formbuilder_setup", id => "httpauth", call => \&formbuilder_setup); + hook(type => "canedit", id => "httpauth", call => \&canedit); + hook(type => "pagetemplate", id => "httpauth", call => \&pagetemplate); } sub getsetup () { @@ -28,13 +28,20 @@ sub getsetup () { safe => 1, rebuild => 0, }, + httpauth_pagespec => { + type => "pagespec", + example => "!*/Discussion", + description => "PageSpec of pages where only httpauth will be used for authentication", + safe => 0, + rebuild => 0, + }, } -sub redir_cgiauthurl ($$) { +sub redir_cgiauthurl ($;@) { my $cgi=shift; - my $params=shift; - IkiWiki::redirect($cgi, $config{cgiauthurl}.'?'.$params); + IkiWiki::redirect($cgi, + IkiWiki::cgiurl(cgiurl => $config{cgiauthurl}, @_)); exit; } @@ -47,19 +54,6 @@ sub auth ($$) { } } -sub canedit ($$$) { - my $page=shift; - my $cgi=shift; - my $session=shift; - - if (! defined $cgi->remote_user() && defined $config{cgiauthurl}) { - return sub { redir_cgiauthurl($cgi, $cgi->query_string()) }; - } - else { - return undef; - } -} - sub formbuilder_setup (@) { my %params=@_; @@ -74,10 +68,51 @@ sub formbuilder_setup (@) { push @$buttons, $button_text; if ($form->submitted && $form->submitted eq $button_text) { - redir_cgiauthurl($cgi, "do=postsignin"); - exit; + # bounce thru cgiauthurl and then back to + # the stored postsignin action + redir_cgiauthurl($cgi, do => "postsignin"); } } } +sub test_httpauth_pagespec ($) { + my $page=shift; + + return defined $config{httpauth_pagespec} && + length $config{httpauth_pagespec} && + defined $config{cgiauthurl} && + pagespec_match($page, $config{httpauth_pagespec}); +} + +sub canedit ($$$) { + my $page=shift; + my $cgi=shift; + my $session=shift; + + if (! defined $cgi->remote_user() && test_httpauth_pagespec($page)) { + return sub { + IkiWiki::redirect($cgi, + $config{cgiauthurl}.'?'.$cgi->query_string()); + exit; + }; + } + else { + return undef; + } +} + +sub pagetemplate (@_) { + my %params=@_; + my $template=$params{template}; + + if ($template->param("editurl") && + test_httpauth_pagespec($params{page})) { + # go directly to cgiauthurl when editing a page matching + # the pagespec + $template->param(editurl => IkiWiki::cgiurl( + cgiurl => $config{cgiauthurl}, + do => "edit", page => $params{page})); + } +} + 1 diff --git a/debian/changelog b/debian/changelog index 3dd68558e..14be7ec69 100644 --- a/debian/changelog +++ b/debian/changelog @@ -19,6 +19,8 @@ ikiwiki (3.20100123) UNRELEASED; urgency=low alongside other authentication methods (like openid or anonok). Rather than always redirect to the cgiauthurl for authentication, there is now a button on the login form to use it. + * httpauth: Add httpauth_pagespec setting that can be used to limit + pages to only being edited via users authed with httpauth. -- Joey Hess Tue, 26 Jan 2010 22:25:33 -0500 diff --git a/doc/plugins/httpauth.mdwn b/doc/plugins/httpauth.mdwn index a7aac558b..0eda5554f 100644 --- a/doc/plugins/httpauth.mdwn +++ b/doc/plugins/httpauth.mdwn @@ -24,3 +24,12 @@ A typical setup is to make an `auth` subdirectory, and symlink `ikiwiki.cgi` into it. Then configure the web server to require authentication only for access to the `auth` subdirectory. Then `cgiauthurl` is pointed at this symlink. + +## using only httpauth for some pages + +If you want to only use httpauth for editing some pages, while allowing +other authentication methods to be used for other pages, you can +configure `httpauth_pagespec` in the setup file. This makes Edit +links on pages that match the [[ikiwiki/PageSpec]] automatically use +the `cgiauthurl`, and prevents matching pages from being edited by +users authentication via other methods. -- cgit v1.2.3 From c923e0ba3377f85107ccea1933a042aaec675c77 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Feb 2010 20:39:10 -0500 Subject: Allow globs to be used in user() pagespecs. --- IkiWiki.pm | 4 +++- debian/changelog | 1 + doc/ikiwiki/pagespec.mdwn | 3 ++- t/pagespec_match.t | 9 ++++++++- 4 files changed, 14 insertions(+), 3 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index de7dbfc79..a96ff1236 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2266,11 +2266,13 @@ sub match_user ($$;@) { my $user=shift; my %params=@_; + my $regexp=IkiWiki::glob2re($user); + if (! exists $params{user}) { return IkiWiki::ErrorReason->new("no user specified"); } - if (defined $params{user} && lc $params{user} eq lc $user) { + if (defined $params{user} && $params{user}=~/^$regexp$/i) { return IkiWiki::SuccessReason->new("user is $user"); } elsif (! defined $params{user}) { diff --git a/debian/changelog b/debian/changelog index 14be7ec69..d74abd0f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -21,6 +21,7 @@ ikiwiki (3.20100123) UNRELEASED; urgency=low a button on the login form to use it. * httpauth: Add httpauth_pagespec setting that can be used to limit pages to only being edited via users authed with httpauth. + * Allow globs to be used in user() pagespecs. -- Joey Hess Tue, 26 Jan 2010 22:25:33 -0500 diff --git a/doc/ikiwiki/pagespec.mdwn b/doc/ikiwiki/pagespec.mdwn index 5f0f44e2e..8d8b1a507 100644 --- a/doc/ikiwiki/pagespec.mdwn +++ b/doc/ikiwiki/pagespec.mdwn @@ -44,7 +44,8 @@ Some more elaborate limits can be added to what matches using these functions: metadata, matching the specified glob. * "`user(username)`" - tests whether a modification is being made by a user with the specified username. If openid is enabled, an openid can also - be put here. + be put here. Glob patterns can be used in the username. For example, + to match all openid users, use `user(*://.*)` * "`admin()`" - tests whether a modification is being made by one of the wiki admins. * "`ip(address)`" - tests whether a modification is being made from the diff --git a/t/pagespec_match.t b/t/pagespec_match.t index b96947407..197ff818b 100755 --- a/t/pagespec_match.t +++ b/t/pagespec_match.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 64; +use Test::More tests => 70; BEGIN { use_ok("IkiWiki"); } @@ -40,6 +40,13 @@ ok(! pagespec_match("foo", "foo and bar"), "foo and bar"); ok(pagespec_match("{f}oo", "{*}*"), "curly match"); ok(! pagespec_match("foo", "{*}*"), "curly !match"); +ok(pagespec_match("somepage", "user(frodo)", user => "frodo")); +ok(pagespec_match("somepage", "user(frodo)", user => "Frodo")); +ok(! pagespec_match("somepage", "user(frodo)", user => "Sam")); +ok(pagespec_match("somepage", "user(*o)", user => "Bilbo")); +ok(pagespec_match("somepage", "user(*o)", user => "frodo")); +ok(! pagespec_match("somepage", "user(*o)", user => "Sam")); + # The link and backlink stuff needs this. $config{userdir}=""; $links{foo}=[qw{bar baz}]; -- cgit v1.2.3 From f1183cbf0c9c09725192dcc8384381f9112ae222 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 14 Feb 2010 17:25:30 -0500 Subject: add ngettext support & optimize gettext handling As I was adding ngettext support, I realized I could optimize the gettext functions by memoizing the creation of the gettext object. Note that the object creation is still deferred until a gettext function is called, to avoid unnecessary startup penalties on code paths that do not need gettext. A side benefit is that separate stub functions are no longer needed to handle the C language case. --- IkiWiki.pm | 44 ++++++++++++++++++++++++++++++-------------- doc/plugins/write.mdwn | 4 ++++ 2 files changed, 34 insertions(+), 14 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index a96ff1236..b9a419d1d 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -20,7 +20,7 @@ use Exporter q{import}; our @EXPORT = qw(hook debug error template htmlpage deptype add_depends pagespec_match pagespec_match_list bestlink htmllink readfile writefile pagetype srcfile pagename - displaytime will_render gettext urlto targetpage + displaytime will_render gettext ngettext urlto targetpage add_underlay pagetitle titlepage linkpage newpagefile inject add_link %config %links %pagestate %wikistate %renderedfiles @@ -1820,27 +1820,38 @@ sub file_pruned ($;$) { sub define_gettext () { # If translation is needed, redefine the gettext function to do it. # Otherwise, it becomes a quick no-op. - no warnings 'redefine'; + my $gettext_obj; + my $getobj; if ((exists $ENV{LANG} && length $ENV{LANG}) || (exists $ENV{LC_ALL} && length $ENV{LC_ALL}) || (exists $ENV{LC_MESSAGES} && length $ENV{LC_MESSAGES})) { - *gettext=sub { - my $gettext_obj=eval q{ + $getobj=sub { + $gettext_obj=eval q{ use Locale::gettext q{textdomain}; Locale::gettext->domain('ikiwiki') }; - - if ($gettext_obj) { - $gettext_obj->get(shift); - } - else { - return shift; - } }; } - else { - *gettext=sub { return shift }; - } + + no warnings 'redefine'; + *gettext=sub { + $getobj->() if $getobj; + if ($gettext_obj) { + $gettext_obj->get(shift); + } + else { + return shift; + } + }; + *ngettext=sub { + $getobj->() if $getobj; + if ($gettext_obj) { + $gettext_obj->nget(@_); + } + else { + return ($_[2] == 1 ? $_[0] : $_[1]) + } + }; } sub gettext { @@ -1848,6 +1859,11 @@ sub gettext { gettext(@_); } +sub ngettext { + define_gettext(); + ngettext(@_); +} + sub yesno ($) { my $val=shift; diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index a8c9de2d3..96a2aa16d 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -911,6 +911,10 @@ time. This is the standard gettext function, although slightly optimised. +### `ngettext` + +This is the standard ngettext function, although slightly optimised. + ### `urlto($$;$)` Construct a relative url to the first parameter from the page named by the -- cgit v1.2.3 From b3c3c42b269c102123dcd80979cb9c49ce13bca7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 26 Feb 2010 11:49:51 -0500 Subject: Loosen regexp, to allow empty quoted parameters in directives. --- IkiWiki.pm | 6 +++--- debian/changelog | 1 + t/preprocess.t | 12 +++++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index b9a419d1d..9df6c90d6 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1220,7 +1220,7 @@ sub preprocess ($$$;$$) { (?: """(.*?)""" # 2: triple-quoted value | - "([^"]+)" # 3: single-quoted value + "([^"]*?)" # 3: single-quoted value | (\S+) # 4: unquoted value ) @@ -1306,7 +1306,7 @@ sub preprocess ($$$;$$) { (?: """.*?""" # triple-quoted value | - "[^"]+" # single-quoted value + "[^"]*?" # single-quoted value | [^"\s\]]+ # unquoted value ) @@ -1329,7 +1329,7 @@ sub preprocess ($$$;$$) { (?: """.*?""" # triple-quoted value | - "[^"]+" # single-quoted value + "[^"]*?" # single-quoted value | [^"\s\]]+ # unquoted value ) diff --git a/debian/changelog b/debian/changelog index e3ec89eed..1960a1226 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ ikiwiki (3.20100213) UNRELEASED; urgency=low * comments: Display number of comments in comment action link. * Rebuild wikis on upgrade to this version to get the comment counts added to existing pages. + * Loosen regexp, to allow empty quoted parameters in directives. -- Joey Hess Sun, 14 Feb 2010 17:02:10 -0500 diff --git a/t/preprocess.t b/t/preprocess.t index e5026ed64..7bb9878d0 100755 --- a/t/preprocess.t +++ b/t/preprocess.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 21; +use Test::More tests => 31; BEGIN { use_ok("IkiWiki"); } @@ -26,6 +26,16 @@ is(IkiWiki::preprocess("foo", "foo", "[[foo ]]", 0, 0), "foo()", "simple"); is(IkiWiki::preprocess("foo", "foo", "[[!foo ]]", 0, 0), "foo()", "prefixed"); is(IkiWiki::preprocess("foo", "foo", "[[!foo]]", 0, 0), "[[!foo]]", "prefixed, no space"); is(IkiWiki::preprocess("foo", "foo", "[[foo a=1]]", 0, 0), "foo(a => 1)"); +is(IkiWiki::preprocess("foo", "foo", q{[[foo a="1"]]}, 0, 0), "foo(a => 1)"); +is(IkiWiki::preprocess("foo", "foo", q{[[foo a="""1"""]]}, 0, 0), "foo(a => 1)"); +is(IkiWiki::preprocess("foo", "foo", q{[[foo a=""]]}, 0, 0), "foo(a)"); +is(IkiWiki::preprocess("foo", "foo", q{[[foo a="" b="1"]]}, 0, 0), "foo(a, b => 1)"); +is(IkiWiki::preprocess("foo", "foo", q{[[foo a=""""""]]}, 0, 0), "foo(a)"); +is(IkiWiki::preprocess("foo", "foo", q{[[foo a="""""" b="1"]]}, 0, 0), "foo(a, b => 1)"); +is(IkiWiki::preprocess("foo", "foo", q{[[foo a="""""" b="""1"""]]}, 0, 0), "foo(a, b => 1)"); +is(IkiWiki::preprocess("foo", "foo", q{[[foo a="""""" b=""""""]]}, 0, 0), "foo(a, b)"); +is(IkiWiki::preprocess("foo", "foo", q{[[foo a="" b=""""""]]}, 0, 0), "foo(a, b)"); +is(IkiWiki::preprocess("foo", "foo", q{[[foo a="" b="""1"""]]}, 0, 0), "foo(a, b => 1)"); is(IkiWiki::preprocess("foo", "foo", "[[foo a=\"1 2 3 4\"]]", 0, 0), "foo(a => 1 2 3 4)"); is(IkiWiki::preprocess("foo", "foo", "[[foo ]] then [[foo a=2]]", 0, 0), "foo() then foo(a => 2)"); -- cgit v1.2.3 From 60d2dd318f66563c3ee3bde950d7f53426530acc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 28 Feb 2010 00:12:47 -0500 Subject: Add new --clean option; this makes ikiwiki remove all built files in the destdir, as well as wrappers and the .ikiwiki directory. --- IkiWiki.pm | 7 +++++++ IkiWiki/Render.pm | 11 +++++++++++ Makefile.PL | 2 +- debian/changelog | 4 +++- doc/usage.mdwn | 8 ++++++++ ikiwiki.in | 12 +++++++++++- ikiwiki.spec | 2 +- 7 files changed, 42 insertions(+), 4 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 9df6c90d6..00eadfd98 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -409,6 +409,13 @@ sub getsetup () { safe => 0, rebuild => 0, }, + clean => { + type => "internal", + default => 0, + description => "running in clean mode", + safe => 0, + rebuild => 0, + }, refresh => { type => "internal", default => 0, diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 3ebb1a324..af24df155 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -683,6 +683,17 @@ sub refresh () { } } +sub clean_rendered { + lockwiki(); + loadindex(); + remove_unrendered(); + foreach my $page (keys %oldrenderedfiles) { + foreach my $file (@{$oldrenderedfiles{$page}}) { + prune($config{destdir}."/".$file); + } + } +} + sub commandline_render () { lockwiki(); loadindex(); diff --git a/Makefile.PL b/Makefile.PL index 462f7364d..52421a711 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -51,7 +51,7 @@ docwiki: ikiwiki.out $(PERL) -Iblib/lib $(extramodules) $(tflag) ikiwiki.out -libdir . -setup docwiki.setup -refresh extra_clean: - rm -rf html doc/.ikiwiki + $(PERL) -I. $(extramodules) $(tflag) ikiwiki.in -libdir . -setup docwiki.setup -clean rm -f *.man ikiwiki.out ikiwiki.setup plugins/*.pyc $(MAKE) -C po clean diff --git a/debian/changelog b/debian/changelog index 832bbaa85..3b92c598d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -ikiwiki (3.20100213) UNRELEASED; urgency=low +ikiwiki (3.20100228) UNRELEASED; urgency=low * comments: Display number of comments in comment action link. * Rebuild wikis on upgrade to this version to get the comment counts @@ -8,6 +8,8 @@ ikiwiki (3.20100213) UNRELEASED; urgency=low files/directories. * Fix admin openid detection in setup automator, and avoid prompting for a password. + * Add new --clean option; this makes ikiwiki remove all built + files in the destdir, as well as wrappers and the .ikiwiki directory. -- Joey Hess Sun, 14 Feb 2010 17:02:10 -0500 diff --git a/doc/usage.mdwn b/doc/usage.mdwn index e4808d4c2..a105d7e59 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -50,6 +50,14 @@ These options control the mode that ikiwiki operates in. If used with --setup --refresh, this makes it also update any configured wrappers. +* --clean + + This makes ikiwiki clean up by removing any files it denerated in the + `destination` directory, as well as any configured wrappers, and the + `.ikiwiki` state directory. This is mostly useful if you're running + ikiwiki in a Makefile to build documentation and want a corresponding + `clean` target. + * --cgi Enable [[CGI]] mode. In cgi mode ikiwiki runs as a cgi script, and diff --git a/ikiwiki.in b/ikiwiki.in index b8581d880..ae1251ff6 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -37,6 +37,7 @@ sub getconfig () { "syslog!" => \$config{syslog}, "rebuild!" => \$config{rebuild}, "refresh!" => \$config{refresh}, + "clean!" => \$config{clean}, "post-commit" => \$config{post_commit}, "render=s" => \$config{render}, "wrappers!" => \$config{genwrappers}, @@ -135,6 +136,7 @@ sub main () { if (@{$config{wrappers}} && ! $config{render} && ! $config{dumpsetup} && + ! $config{clean} && ((! $config{refresh} && ! $config{post_commit}) || $config{genwrappers})) { debug(gettext("generating wrappers..")); @@ -159,7 +161,7 @@ sub main () { # setup implies a wiki rebuild by default if (! $config{refresh} && ! $config{render} && - ! $config{post_commit}) { + ! $config{post_commit} && ! $config{clean}) { $config{rebuild}=1; } } @@ -190,6 +192,14 @@ sub main () { elsif ($config{post_commit} && ! commit_hook_enabled()) { # do nothing } + elsif ($config{clean}) { + require IkiWiki::Render; + foreach my $wrapper (@{$config{wrappers}}) { + prune($wrapper->{wrapper}); + } + clean_rendered(); + system("rm", "-rf", $config{wikistatedir}); + } else { if ($config{rebuild}) { debug(gettext("rebuilding wiki..")); diff --git a/ikiwiki.spec b/ikiwiki.spec index 865c9a325..1dba9f463 100644 --- a/ikiwiki.spec +++ b/ikiwiki.spec @@ -1,5 +1,5 @@ Name: ikiwiki -Version: 3.20100212 +Version: 3.20100228 Release: 1%{?dist} Summary: A wiki compiler -- cgit v1.2.3 From c0ad4929deb455804ddfc6451820c6c67a298ea1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 13 Mar 2010 20:10:50 -0500 Subject: Improve openid url munging; do not display anchors and cgi parameters, as used by yahoo and google urls. --- IkiWiki.pm | 2 +- debian/changelog | 2 ++ doc/forum/google_openid_broken__63__.mdwn | 6 ++++++ t/openiduser.t | 7 ++++++- 4 files changed, 15 insertions(+), 2 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 00eadfd98..251ed8cc8 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1131,7 +1131,7 @@ sub openiduser ($) { # Convert "http://somehost.com/user" to "user [somehost.com]". # (also "https://somehost.com/user/") if ($display !~ /\[/) { - $display=~s/^https?:\/\/(.+)\/([^\/]+)\/?$/$2 [$1]/; + $display=~s/^https?:\/\/(.+)\/([^\/#?]+)\/?(?:[#?].*)?$/$2 [$1]/; } $display=~s!^https?://!!; # make sure this is removed eval q{use CGI 'escapeHTML'}; diff --git a/debian/changelog b/debian/changelog index 854d83130..0a9679618 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,8 @@ ikiwiki (3.20100313) UNRELEASED; urgency=low as unsafe. * openid: Use Openid Simple Registration or OpenID Attribute Exchange to get the user's email address and username. + * Improve openid url munging; do not display anchors and cgi parameters, + as used by yahoo and google urls. -- Joey Hess Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/forum/google_openid_broken__63__.mdwn b/doc/forum/google_openid_broken__63__.mdwn index 4ca5cac93..96ba2d791 100644 --- a/doc/forum/google_openid_broken__63__.mdwn +++ b/doc/forum/google_openid_broken__63__.mdwn @@ -59,6 +59,12 @@ points to a fairly useless xml document, rather than a web page. --[[Joey]] > Using the Google profile page as the OpenID is really orthogonal to the above. --[[kaol]] +>> First, I don't accept that the openid google returns from their +>> generic signin url *has* to be so freaking ugly. For contrast, +>> look at the openid you log in as if you use the yahoo url. +>> . Nice and clean, now +>> munged by ikiwiki to "joeyhess [me.yahoo.com]". +>> >> Displaying email addresses is not really an option, because ikiwiki >> can't leak user email addresses like that. Displaying nicknames or >> usernames is, see [[todo/Separate_OpenIDs_and_usernames]]. diff --git a/t/openiduser.t b/t/openiduser.t index 52d879484..caabbcefc 100755 --- a/t/openiduser.t +++ b/t/openiduser.t @@ -10,7 +10,7 @@ BEGIN { eval q{use Test::More skip_all => "Net::OpenID::VerifiedIdentity not available"}; } else { - eval q{use Test::More tests => 9}; + eval q{use Test::More tests => 11}; } use_ok("IkiWiki::Plugin::openid"); } @@ -28,6 +28,11 @@ $^W=1; is(IkiWiki::openiduser('http://yam655.livejournal.com/'), 'yam655 [livejournal.com]'); is(IkiWiki::openiduser('http://id.mayfirst.org/jamie/'), 'jamie [id.mayfirst.org]'); +# yahoo has an anchor in the url +is(IkiWiki::openiduser('https://me.yahoo.com/joeyhess#35f22'), 'joeyhess [me.yahoo.com]'); +# google urls are horrendous, but the worst bit is after a ?, so can be dropped +is(IkiWiki::openiduser('https://www.google.com/accounts/o8/id?id=AItOawm-ebiIfxbKD3KNa-Cu9LvvD9edMLW7BAo'), 'id [www.google.com/accounts/o8]'); + # and some less typical ones taken from the ikiwiki commit history is(IkiWiki::openiduser('http://thm.id.fedoraproject.org/'), 'thm [id.fedoraproject.org]'); -- cgit v1.2.3 From 823ec815d4fc9625d6fa3553ad03e9f2ff737659 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 14 Mar 2010 14:58:13 -0400 Subject: Add a include setting, which can be used to make ikiwiki process wiki source files, such as .htaccess, that would normally be skipped for security or other reasons. Closes: #447267 (Thanks to Aaron Wilson for the original patch.) --- IkiWiki.pm | 13 +++++++++++++ debian/changelog | 4 ++++ doc/tips/htaccess_file.mdwn | 30 ++++++++++++++++++++++++++++++ doc/todo/enable-htaccess-files.mdwn | 5 +++++ doc/usage.mdwn | 6 ++++++ ikiwiki.in | 3 +++ 6 files changed, 61 insertions(+) create mode 100644 doc/tips/htaccess_file.mdwn (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 251ed8cc8..ee94ce659 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -334,6 +334,15 @@ sub getsetup () { safe => 0, # paranoia rebuild => 0, }, + include => { + type => "string", + default => undef, + example => '^\.htaccess$', + description => "regexp of normally ignored source files to include", + advanced => 1, + safe => 0, # regexp + rebuild => 1, + }, exclude => { type => "string", default => undef, @@ -1820,6 +1829,10 @@ sub file_pruned ($;$) { $file =~ s#^\Q$base\E/+##; } + if (defined $config{include} && length $config{include}) { + return 0 if $file =~ m/$config{include}/; + } + my $regexp='('.join('|', @{$config{wiki_file_prune_regexps}}).')'; return $file =~ m/$regexp/; } diff --git a/debian/changelog b/debian/changelog index 92afe661f..e5347e2a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,10 @@ ikiwiki (3.20100313) UNRELEASED; urgency=low as used by yahoo and google urls. * Add complete German basewiki and directives translation done by Sebastian Kuhnert. + * Add a include setting, which can be used to make ikiwiki process + wiki source files, such as .htaccess, that would normally be skipped + for security or other reasons. Closes: #447267 + (Thanks to Aaron Wilson for the original patch.) -- Joey Hess Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/tips/htaccess_file.mdwn b/doc/tips/htaccess_file.mdwn new file mode 100644 index 000000000..5266eba41 --- /dev/null +++ b/doc/tips/htaccess_file.mdwn @@ -0,0 +1,30 @@ +If you try to include a `.htaccess` file in your wiki's source, in order to +configure the web server, you'll find that ikiwiki excludes it from +processing. In fact, ikiwiki excludes any file starting with a dot, as well +as a lot of other files, for good security reasons. + +You can tell ikiwiki not to exclude the .htaccess file by adding this to +your setup file: + + include => '^\.htaccess$', + +Caution! Before you do that, please think for a minute about who can edit +your wiki. Are attachment uploads enabled? Can users commit changes +directly to the version control system? Do you trust everyone who can +make a change to not do Bad Things with the htaccess file? Do you trust +everyone who *might* be able to make a change in the future? Note that a +determined attacker who can write to the htaccess file can probably get a +shell on your web server. + +If any of these questions have given you pause, I suggest you find a +different way to configure the web server. One way is to not put the +`.htaccess` file under ikiwiki's control, and just manually install it +in the destdir. + +[Apache's documentation](http://httpd.apache.org/docs/1.3/howto/htaccess.html) +says +> In general, you should never use .htaccess files unless you don't have +> access to the main server configuration file. +This is good advice -- if you can edit apache's main configuration files, +then you should not use a htaccess file. +--[[Joey]] diff --git a/doc/todo/enable-htaccess-files.mdwn b/doc/todo/enable-htaccess-files.mdwn index 412cb5eba..c895db75d 100644 --- a/doc/todo/enable-htaccess-files.mdwn +++ b/doc/todo/enable-htaccess-files.mdwn @@ -61,3 +61,8 @@ It should be off by default of course. --Max +1 for various purposes (but sometimes the filename isn't `.htaccess`, so please make it configurable) --[[schmonz]] > I've described a workaround for one use case at the [[plugins/rsync]] [[plugins/rsync/discussion]] page. --[[schmonz]] + +--- + +[[done]], you can use the `include` setting to override the default +excludes now. Please use extreme caution when doing so. --[[Joey]] diff --git a/doc/usage.mdwn b/doc/usage.mdwn index a105d7e59..f735170f0 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -234,6 +234,12 @@ also be configured using a setup file. Specifies a rexexp of source files to exclude from processing. May be specified multiple times to add to exclude list. +* --include regexp + + Specifies a rexexp of source files, that would normally be excluded, + but that you wish to include in processing. + May be specified multiple times to add to include list. + * --adminuser name Specifies a username of a user (or, if openid is enabled, an openid) diff --git a/ikiwiki.in b/ikiwiki.in index ae1251ff6..da5555629 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -65,6 +65,9 @@ sub getconfig () { "exclude=s@" => sub { push @{$config{wiki_file_prune_regexps}}, $_[1]; }, + "include=s@" => sub { + $config{include}=defined $config{include} && length $config{include} ? "$config{include}|$_[1]" : $_[1]; + }, "adminuser=s@" => sub { push @{$config{adminuser}}, $_[1] }, -- cgit v1.2.3 From a5ded6437dc8170fafe170b758c54a44912cb7a8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 14 Mar 2010 15:21:42 -0400 Subject: slight optimisation to file_pruned Precompile the regexp, rather than rebuilding on every call. --- IkiWiki.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index ee94ce659..1c2ddbd91 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1819,6 +1819,7 @@ sub deptype (@) { return $deptype; } +my $file_prune_regexp; sub file_pruned ($;$) { my $file=shift; if (@_) { @@ -1833,8 +1834,11 @@ sub file_pruned ($;$) { return 0 if $file =~ m/$config{include}/; } - my $regexp='('.join('|', @{$config{wiki_file_prune_regexps}}).')'; - return $file =~ m/$regexp/; + if (! defined $file_prune_regexp) { + $file_prune_regexp='('.join('|', @{$config{wiki_file_prune_regexps}}).')'; + $file_prune_regexp=qr/$file_prune_regexp/; + } + return $file =~ m/$file_prune_regexp/; } sub define_gettext () { -- cgit v1.2.3 From cbc5fcff6182e620578fff619ae021eb5b30024c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 17 Mar 2010 23:21:35 -0400 Subject: set exclude example to match *.private and improve its description --- IkiWiki.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 1c2ddbd91..a782e463a 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -338,7 +338,7 @@ sub getsetup () { type => "string", default => undef, example => '^\.htaccess$', - description => "regexp of normally ignored source files to include", + description => "regexp of normally excluded files to include", advanced => 1, safe => 0, # regexp rebuild => 1, @@ -346,8 +346,8 @@ sub getsetup () { exclude => { type => "string", default => undef, - example => '\.wav$', - description => "regexp of source files to ignore", + example => '^*\.private$', + description => "regexp of files that should be skipped", advanced => 1, safe => 0, # regexp rebuild => 1, -- cgit v1.2.3 From 60b71996da47b4ce8e065443de362e9dbca47ce9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 17 Mar 2010 23:24:31 -0400 Subject: add Makefile to exclude example --- IkiWiki.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index a782e463a..a618836cf 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -346,7 +346,7 @@ sub getsetup () { exclude => { type => "string", default => undef, - example => '^*\.private$', + example => '^(*\.private|Makefile)$', description => "regexp of files that should be skipped", advanced => 1, safe => 0, # regexp -- cgit v1.2.3 From cbf269eee29a66e1350e5553f38eee5b4683be8a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 19 Mar 2010 13:10:17 -0400 Subject: audited use POSIX The POSIX perl module exports a huge number of functions by default, so make sure all imports are qualified. (And remove one that was not necessary.) --- IkiWiki.pm | 2 +- IkiWiki/Plugin/calendar.pm | 2 +- IkiWiki/Plugin/relativedate.pm | 2 +- IkiWiki/Plugin/wmd.pm | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index a618836cf..6e333504e 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -7,7 +7,7 @@ use strict; use Encode; use HTML::Entities; use URI::Escape q{uri_escape_utf8}; -use POSIX; +use POSIX (); use Storable; use open qw{:utf8 :std}; diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm index aaee2c610..ff84bc440 100644 --- a/IkiWiki/Plugin/calendar.pm +++ b/IkiWiki/Plugin/calendar.pm @@ -22,7 +22,7 @@ use warnings; use strict; use IkiWiki 3.00; use Time::Local; -use POSIX; +use POSIX (); my $time=time; my @now=localtime($time); diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm index 06df2efd5..7f006af83 100644 --- a/IkiWiki/Plugin/relativedate.pm +++ b/IkiWiki/Plugin/relativedate.pm @@ -5,7 +5,7 @@ use warnings; no warnings 'redefine'; use strict; use IkiWiki 3.00; -use POSIX; +use POSIX (); use Encode; sub import { diff --git a/IkiWiki/Plugin/wmd.pm b/IkiWiki/Plugin/wmd.pm index 5361d2914..99b136281 100644 --- a/IkiWiki/Plugin/wmd.pm +++ b/IkiWiki/Plugin/wmd.pm @@ -4,7 +4,6 @@ package IkiWiki::Plugin::wmd; use warnings; use strict; use IkiWiki 3.00; -use POSIX; use Encode; sub import { -- cgit v1.2.3 From b1dade8d960ce7ccb549e5652d35a8e9dbccf5c6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 19 Mar 2010 14:52:17 -0400 Subject: allow multiple setup file types, and support safe parsing Finally removed the last hardcoding of IkiWiki::Setup::Standard. Take the first "IkiWiki::Setup::*" in the setup file to define the setuptype, and remember that type to use in dumping later. (But it can be overridden using --set, etc.) Also, support setup file types that are not evaled. --- IkiWiki.pm | 7 +++++++ IkiWiki/Setup.pm | 40 +++++++++++++++++++++++++++++----------- IkiWiki/Setup/Standard.pm | 4 +++- 3 files changed, 39 insertions(+), 12 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 6e333504e..241fb45b7 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -467,6 +467,13 @@ sub getsetup () { safe => 0, rebuild => 0, }, + setuptype => { + type => "internal", + default => "IkiWiki::Setup::Standard", + description => "perl class to use to dump setup file", + safe => 0, + rebuild => 0, + }, allow_symlinks_before_srcdir => { type => "boolean", default => 0, diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm index a3fd5ce66..3accf3591 100644 --- a/IkiWiki/Setup.pm +++ b/IkiWiki/Setup.pm @@ -1,6 +1,8 @@ #!/usr/bin/perl -# Ikiwiki setup files are perl files that 'use IkiWiki::Setup::foo', -# passing it some sort of configuration data. +# Ikiwiki setup files can be perl files that 'use IkiWiki::Setup::foo', +# passing it some sort of configuration data. Or, they can contain +# the module name at the top, without the 'use', and the whole file is +# then fed into that module. package IkiWiki::Setup; @@ -10,24 +12,39 @@ use IkiWiki; use open qw{:utf8 :std}; use File::Spec; -sub load ($) { +sub load ($;$) { my $setup=IkiWiki::possibly_foolish_untaint(shift); + my $safemode=shift; + $config{setupfile}=File::Spec->rel2abs($setup); #translators: The first parameter is a filename, and the second #translators: is a (probably not translated) error message. open (IN, $setup) || error(sprintf(gettext("cannot read %s: %s"), $setup, $!)); - my $code; + my $content; { local $/=undef; - $code= || error("$setup: $!"); + $content= || error("$setup: $!"); } - - ($code)=$code=~/(.*)/s; close IN; - eval $code; - error("$setup: ".$@) if $@; + if ($content=~/(use\s+)?(IkiWiki::Setup::\w+)/) { + $config{setuptype}=$2; + if ($1) { + error sprintf(gettext("cannot load %s in safe mode"), $setup) + if $safemode; + eval IkiWiki::possibly_foolish_untaint($content); + error("$setup: ".$@) if $@; + } + else { + eval qq{require $config{setuptype}}; + error $@ if $@; + $config{setuptype}->loaddump(IkiWiki::possibly_foolish_untaint($content)); + } + } + else { + error sprintf(gettext("failed to parse %s"), $setup); + } } sub merge ($) { @@ -133,8 +150,9 @@ sub getsetup () { sub dump ($) { my $file=IkiWiki::possibly_foolish_untaint(shift); - require IkiWiki::Setup::Standard; - my @dump=IkiWiki::Setup::Standard::gendump("Setup file for ikiwiki."); + eval qq{require $config{setuptype}}; + error $@ if $@; + my @dump=$config{setuptype}->gendump("Setup file for ikiwiki."); open (OUT, ">", $file) || die "$file: $!"; print OUT "$_\n" foreach @dump; diff --git a/IkiWiki/Setup/Standard.pm b/IkiWiki/Setup/Standard.pm index f7a322317..4022ff03c 100644 --- a/IkiWiki/Setup/Standard.pm +++ b/IkiWiki/Setup/Standard.pm @@ -82,8 +82,10 @@ sub dumpvalues ($@) { return @ret; } -sub gendump ($) { +sub gendump ($$) { + my $class=shift; my $description=shift; + my %setup=(%config); my @ret; -- cgit v1.2.3 From 07bb08d0944a0282d6ed332deeefe347bc88139c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 19 Mar 2010 15:55:10 -0400 Subject: shorten setuptype --- IkiWiki.pm | 2 +- IkiWiki/Setup.pm | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 241fb45b7..022bfe3bd 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -469,7 +469,7 @@ sub getsetup () { }, setuptype => { type => "internal", - default => "IkiWiki::Setup::Standard", + default => "Standard", description => "perl class to use to dump setup file", safe => 0, rebuild => 0, diff --git a/IkiWiki/Setup.pm b/IkiWiki/Setup.pm index a71a12d9d..2cf01ea68 100644 --- a/IkiWiki/Setup.pm +++ b/IkiWiki/Setup.pm @@ -28,7 +28,7 @@ sub load ($;$) { } close IN; - if ($content=~/(use\s+)?(IkiWiki::Setup::\w+)/) { + if ($content=~/(use\s+)?IkiWiki::Setup::(\w+)/) { $config{setuptype}=$2; if ($1) { error sprintf(gettext("cannot load %s in safe mode"), $file) @@ -37,9 +37,9 @@ sub load ($;$) { error("$file: ".$@) if $@; } else { - eval qq{require $config{setuptype}}; + eval qq{require IkiWiki::Setup::$config{setuptype}}; error $@ if $@; - $config{setuptype}->loaddump(IkiWiki::possibly_foolish_untaint($content)); + "IkiWiki::Setup::$config{setuptype}"->loaddump(IkiWiki::possibly_foolish_untaint($content)); } } else { @@ -50,9 +50,9 @@ sub load ($;$) { sub dump ($) { my $file=IkiWiki::possibly_foolish_untaint(shift); - eval qq{require $config{setuptype}}; + eval qq{require IkiWiki::Setup::$config{setuptype}}; error $@ if $@; - my @dump=$config{setuptype}->gendump( + my @dump="IkiWiki::Setup::$config{setuptype}"->gendump( "Setup file for ikiwiki.", "", "Passing this to ikiwiki --setup will make ikiwiki generate", -- cgit v1.2.3 From e67a9382f67e745af3be7d367fe7a0d36c1777e6 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 24 Mar 2010 00:29:10 +0000 Subject: Allow hooks to add sorting functions to pagespec_match_list --- IkiWiki.pm | 6 +++++- doc/ikiwiki/pagespec/sorting.mdwn | 2 ++ doc/plugins/write.mdwn | 15 +++++++++++++++ t/pagespec_match_list.t | 6 +++++- 4 files changed, 27 insertions(+), 2 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 022bfe3bd..1a4dc47dd 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2035,7 +2035,11 @@ sub pagespec_match_list ($$;@) { if (defined $params{sort}) { my $f; - if ($params{sort} eq 'title') { + + if (exists $hooks{sort}{$params{sort}}{call}) { + $f = sub { $hooks{sort}{$params{sort}}{call}($a, $b) }; + } + elsif ($params{sort} eq 'title') { $f=sub { pagetitle(basename($a)) cmp pagetitle(basename($b)) }; } elsif ($params{sort} eq 'title_natural') { diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index 697818a2a..9007c23bf 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -10,4 +10,6 @@ orders can be specified. installed. Orders by title, but numbers in the title are treated as such, ("1 2 9 10 20" instead of "1 10 2 20 9") +Plugins can add additional sort orders. + [[!meta robots="noindex, follow"]] diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 96a2aa16d..bfa6617bd 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -588,6 +588,21 @@ describes the plugin as a whole. For example: This hook is used to inject C code (which it returns) into the `main` function of the ikiwiki wrapper when it is being generated. +### sort + + hook(type => "sort", id => "foo", call => \&sort_by_foo); + +This hook adds an additional [[ikiwiki/pagespec/sorting]] order or overrides +an existing one. The callback is given two page names as arguments, and +returns negative, zero or positive if the first page should come before, +close to (i.e. undefined order), or after the second page. + +For instance, the built-in `title` sort order could be reimplemented as + + sub sort_by_title { + pagetitle(basename($_[0])) cmp pagetitle(basename($_[1])); + } + ## Exported variables Several variables are exported to your plugin when you `use IkiWiki;` diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index dd5dcc5b0..b34ee769f 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 88; +use Test::More tests => 89; BEGIN { use_ok("IkiWiki"); } @@ -9,6 +9,8 @@ BEGIN { use_ok("IkiWiki"); } $config{srcdir}=$config{destdir}="/dev/null"; IkiWiki::checkconfig(); +hook(type => "sort", id => "path", call => sub { $_[0] cmp $_[1] }); + %pagesources=( foo => "foo.mdwn", foo2 => "foo2.mdwn", @@ -34,6 +36,8 @@ is_deeply([pagespec_match_list("foo", "post/*", sort => "title", num => 50)], is_deeply([pagespec_match_list("foo", "post/*", sort => "title", filter => sub { $_[0] =~ /3/}) ], ["post/1", "post/2"]); +is_deeply([pagespec_match_list("foo", "*", sort => "path", num => 2)], + ["bar", "foo"]); my $r=eval { pagespec_match_list("foo", "beep") }; ok(eval { pagespec_match_list("foo", "beep") } == 0); ok(! $@, "does not fail with error when unable to match anything"); -- cgit v1.2.3 From 60edd2dc3157f756f4f7a213ee15836fe7bbb769 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 24 Mar 2010 23:51:48 +0000 Subject: Allow sorting to be combined and/or reversed --- IkiWiki.pm | 84 ++++++++++++++++++++++++++++----------- doc/ikiwiki/pagespec/sorting.mdwn | 4 ++ doc/plugins/write.mdwn | 17 +++++++- t/pagespec_match_list.t | 12 +++++- 4 files changed, 91 insertions(+), 26 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 1a4dc47dd..ce8fdd454 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2005,6 +2005,64 @@ sub pagespec_match ($$;@) { return $sub->($page, @params); } +sub get_sort_function { + my $method = $_[0]; + + if ($method =~ m/\s/) { + my @methods = map { get_sort_function($_) } split(' ', $method); + + return sub { + foreach my $method (@methods) { + my $answer = $method->($_[0], $_[1]); + return $answer if $answer; + } + + return 0; + }; + } + + my $sense = 1; + + if ($method =~ s/^-//) { + $sense = -1; + } + + my $token = $method; + my $parameter = undef; + + if ($method =~ m/^(\w+)\((.*)\)$/) { + $token = $1; + $parameter = $2; + } + + if (exists $hooks{sort}{$token}{call}) { + my $callback = $hooks{sort}{$token}{call}; + return sub { $sense * $callback->($_[0], $_[1], $parameter) }; + } + + if ($method eq 'title') { + return sub { $sense * (pagetitle(basename($_[0])) cmp pagetitle(basename($_[1]))) }; + } + + if ($method eq 'title_natural') { + eval q{use Sort::Naturally}; + if ($@) { + error(gettext("Sort::Naturally needed for title_natural sort")); + } + return sub { $sense * Sort::Naturally::ncmp(pagetitle(basename($_[0])), pagetitle(basename($_[1]))) }; + } + + if ($method eq 'mtime') { + return sub { $sense * ($pagemtime{$_[1]} <=> $pagemtime{$_[0]}) }; + } + + if ($method eq 'age') { + return sub { $sense * ($pagectime{$_[1]} <=> $pagectime{$_[0]}) }; + } + + error sprintf(gettext("unknown sort type %s"), $method); +} + sub pagespec_match_list ($$;@) { my $page=shift; my $pagespec=shift; @@ -2034,31 +2092,9 @@ sub pagespec_match_list ($$;@) { } if (defined $params{sort}) { - my $f; + my $f = get_sort_function($params{sort}); - if (exists $hooks{sort}{$params{sort}}{call}) { - $f = sub { $hooks{sort}{$params{sort}}{call}($a, $b) }; - } - elsif ($params{sort} eq 'title') { - $f=sub { pagetitle(basename($a)) cmp pagetitle(basename($b)) }; - } - elsif ($params{sort} eq 'title_natural') { - eval q{use Sort::Naturally}; - if ($@) { - error(gettext("Sort::Naturally needed for title_natural sort")); - } - $f=sub { Sort::Naturally::ncmp(pagetitle(basename($a)), pagetitle(basename($b))) }; - } - elsif ($params{sort} eq 'mtime') { - $f=sub { $pagemtime{$b} <=> $pagemtime{$a} }; - } - elsif ($params{sort} eq 'age') { - $f=sub { $pagectime{$b} <=> $pagectime{$a} }; - } - else { - error sprintf(gettext("unknown sort type %s"), $params{sort}); - } - @candidates = sort { &$f } @candidates; + @candidates = sort { $f->($a, $b) } @candidates; } @candidates=reverse(@candidates) if $params{reverse}; diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index 61516bec5..f27972d4e 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -15,6 +15,10 @@ orders can be specified. full title was set. """]] +In addition, you can combine several sort orders and/or reverse the order of +sorting, with a string like `age -title` (which would sort by age, then by +title in reverse order if two pages have the same age). + Plugins can add additional sort orders, so more might be available on this wiki. diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index bfa6617bd..1010e76e4 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -593,7 +593,9 @@ function of the ikiwiki wrapper when it is being generated. hook(type => "sort", id => "foo", call => \&sort_by_foo); This hook adds an additional [[ikiwiki/pagespec/sorting]] order or overrides -an existing one. The callback is given two page names as arguments, and +an existing one. + +The callback is given two page names followed by the parameter as arguments, and returns negative, zero or positive if the first page should come before, close to (i.e. undefined order), or after the second page. @@ -603,6 +605,19 @@ For instance, the built-in `title` sort order could be reimplemented as pagetitle(basename($_[0])) cmp pagetitle(basename($_[1])); } +and to sort by an arbitrary `meta` value, you could use: + + # usage: sort="meta(description)" + sub sort_by_meta { + my $param = $_[2]; + error "sort=meta requires a parameter" unless defined $param; + my $left = $pagestate{$_[0]}{meta}{$param}; + $left = "" unless defined $left; + my $right = $pagestate{$_[1]}{meta}{$param}; + $right = "" unless defined $right; + return $left cmp $right; + } + ## Exported variables Several variables are exported to your plugin when you `use IkiWiki;` diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index b34ee769f..309961f1c 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 89; +use Test::More tests => 90; BEGIN { use_ok("IkiWiki"); } @@ -20,6 +20,13 @@ hook(type => "sort", id => "path", call => sub { $_[0] cmp $_[1] }); "post/2" => "post/2.mdwn", "post/3" => "post/3.mdwn", ); +$IkiWiki::pagectime{foo} = 2; +$IkiWiki::pagectime{foo2} = 2; +$IkiWiki::pagectime{foo3} = 1; +$IkiWiki::pagectime{bar} = 3; +$IkiWiki::pagectime{"post/1"} = 6; +$IkiWiki::pagectime{"post/2"} = 6; +$IkiWiki::pagectime{"post/3"} = 6; $links{foo}=[qw{post/1 post/2}]; $links{foo2}=[qw{bar}]; $links{foo3}=[qw{bar}]; @@ -38,6 +45,9 @@ is_deeply([pagespec_match_list("foo", "post/*", sort => "title", ["post/1", "post/2"]); is_deeply([pagespec_match_list("foo", "*", sort => "path", num => 2)], ["bar", "foo"]); +is_deeply([pagespec_match_list("foo", "foo* or bar*", + sort => "-age title")], # oldest first, break ties by title + ["foo3", "foo", "foo2", "bar"]); my $r=eval { pagespec_match_list("foo", "beep") }; ok(eval { pagespec_match_list("foo", "beep") } == 0); ok(! $@, "does not fail with error when unable to match anything"); -- cgit v1.2.3 From b86276ffed7ee001b35cd610e5d56e5afb4088cf Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 25 Mar 2010 23:31:53 +0000 Subject: Reimplement extensible sorting mechanisms, in the same way as pagespecs --- IkiWiki.pm | 145 ++++++++++++++++++++++++++++-------------------- IkiWiki/Plugin/meta.pm | 11 ++-- doc/plugins/write.mdwn | 53 ++++++++---------- t/pagespec_match_list.t | 6 +- 4 files changed, 120 insertions(+), 95 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index ce8fdd454..a89c14058 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -37,6 +37,7 @@ our $DEPEND_LINKS=4; # Optimisation. use Memoize; memoize("abs2rel"); +memoize("cmpspec_translate"); memoize("pagespec_translate"); memoize("template_file"); @@ -1934,6 +1935,70 @@ sub add_link ($$) { unless grep { $_ eq $link } @{$links{$page}}; } +sub cmpspec_translate ($) { + my $spec = shift; + + my $code = ""; + my @data; + while ($spec =~ m{ + \s* + (-?) # group 1: perhaps negated + \s* + ( # group 2: a word + \w+\([^\)]*\) # command(params) + | + [^\s]+ # or anything else + ) + \s* + }gx) { + my $negated = $1; + my $word = $2; + my $params = undef; + + if ($word =~ m/^(\w+)\((.*)\)$/) { + # command with parameters + $params = $2; + $word = $1; + } + elsif ($word !~ m/^\w+$/) { + error(sprintf(gettext("invalid sort type %s"), $word)); + } + + if (length $code) { + $code .= " || "; + } + + if ($negated) { + $code .= "-"; + } + + if (exists $IkiWiki::PageSpec::{"cmp_$word"}) { + if (exists $IkiWiki::PageSpec::{"check_cmp_$word"}) { + $IkiWiki::PageSpec::{"check_cmp_$word"}->($params); + } + + if (defined $params) { + push @data, $params; + $code .= "IkiWiki::PageSpec::cmp_$word(\@_, \$data[$#data])"; + } + else { + $code .= "IkiWiki::PageSpec::cmp_$word(\@_, undef)"; + } + } + else { + error(sprintf(gettext("unknown sort type %s"), $word)); + } + } + + if (! length $code) { + # undefined sorting method... sort arbitrarily + return sub { 0 }; + } + + no warnings; + return eval 'sub { '.$code.' }'; +} + sub pagespec_translate ($) { my $spec=shift; @@ -2005,64 +2070,6 @@ sub pagespec_match ($$;@) { return $sub->($page, @params); } -sub get_sort_function { - my $method = $_[0]; - - if ($method =~ m/\s/) { - my @methods = map { get_sort_function($_) } split(' ', $method); - - return sub { - foreach my $method (@methods) { - my $answer = $method->($_[0], $_[1]); - return $answer if $answer; - } - - return 0; - }; - } - - my $sense = 1; - - if ($method =~ s/^-//) { - $sense = -1; - } - - my $token = $method; - my $parameter = undef; - - if ($method =~ m/^(\w+)\((.*)\)$/) { - $token = $1; - $parameter = $2; - } - - if (exists $hooks{sort}{$token}{call}) { - my $callback = $hooks{sort}{$token}{call}; - return sub { $sense * $callback->($_[0], $_[1], $parameter) }; - } - - if ($method eq 'title') { - return sub { $sense * (pagetitle(basename($_[0])) cmp pagetitle(basename($_[1]))) }; - } - - if ($method eq 'title_natural') { - eval q{use Sort::Naturally}; - if ($@) { - error(gettext("Sort::Naturally needed for title_natural sort")); - } - return sub { $sense * Sort::Naturally::ncmp(pagetitle(basename($_[0])), pagetitle(basename($_[1]))) }; - } - - if ($method eq 'mtime') { - return sub { $sense * ($pagemtime{$_[1]} <=> $pagemtime{$_[0]}) }; - } - - if ($method eq 'age') { - return sub { $sense * ($pagectime{$_[1]} <=> $pagectime{$_[0]}) }; - } - - error sprintf(gettext("unknown sort type %s"), $method); -} - sub pagespec_match_list ($$;@) { my $page=shift; my $pagespec=shift; @@ -2092,7 +2099,7 @@ sub pagespec_match_list ($$;@) { } if (defined $params{sort}) { - my $f = get_sort_function($params{sort}); + my $f = cmpspec_translate($params{sort}); @candidates = sort { $f->($a, $b) } @candidates; } @@ -2407,4 +2414,24 @@ sub match_ip ($$;@) { } } +sub cmp_title { + IkiWiki::pagetitle(IkiWiki::basename($_[0])) + cmp + IkiWiki::pagetitle(IkiWiki::basename($_[1])) +} + +sub cmp_mtime { $IkiWiki::pagemtime{$_[1]} <=> $IkiWiki::pagemtime{$_[0]} } +sub cmp_age { $IkiWiki::pagectime{$_[1]} <=> $IkiWiki::pagectime{$_[0]} } + +sub check_cmp_title_natural { + eval q{use Sort::Naturally}; + if ($@) { + error(gettext("Sort::Naturally needed for title_natural sort")); + } +} +sub cmp_title_natural { + Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])), + IkiWiki::pagetitle(IkiWiki::basename($_[1]))) +} + 1 diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index a470041c9..e8cc1e392 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -13,7 +13,6 @@ sub import { hook(type => "needsbuild", id => "meta", call => \&needsbuild); hook(type => "preprocess", id => "meta", call => \&preprocess, scan => 1); hook(type => "pagetemplate", id => "meta", call => \&pagetemplate); - hook(type => "sort", id => "meta_title", call => \&sort_meta_title); } sub getsetup () { @@ -299,10 +298,6 @@ sub titlesort { return pagetitle(IkiWiki::basename($_[0])); } -sub sort_meta_title { - return titlesort($_[0]) cmp titlesort($_[1]); -} - sub match { my $field=shift; my $page=shift; @@ -353,4 +348,10 @@ sub match_copyright ($$;@) { IkiWiki::Plugin::meta::match("copyright", @_); } +sub cmp_meta_title { + IkiWiki::Plugin::meta::titlesort($_[0]) + cmp + IkiWiki::Plugin::meta::titlesort($_[1]) +} + 1 diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 1010e76e4..de2b47015 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -588,36 +588,6 @@ describes the plugin as a whole. For example: This hook is used to inject C code (which it returns) into the `main` function of the ikiwiki wrapper when it is being generated. -### sort - - hook(type => "sort", id => "foo", call => \&sort_by_foo); - -This hook adds an additional [[ikiwiki/pagespec/sorting]] order or overrides -an existing one. - -The callback is given two page names followed by the parameter as arguments, and -returns negative, zero or positive if the first page should come before, -close to (i.e. undefined order), or after the second page. - -For instance, the built-in `title` sort order could be reimplemented as - - sub sort_by_title { - pagetitle(basename($_[0])) cmp pagetitle(basename($_[1])); - } - -and to sort by an arbitrary `meta` value, you could use: - - # usage: sort="meta(description)" - sub sort_by_meta { - my $param = $_[2]; - error "sort=meta requires a parameter" unless defined $param; - my $left = $pagestate{$_[0]}{meta}{$param}; - $left = "" unless defined $left; - my $right = $pagestate{$_[1]}{meta}{$param}; - $right = "" unless defined $right; - return $left cmp $right; - } - ## Exported variables Several variables are exported to your plugin when you `use IkiWiki;` @@ -1140,6 +1110,29 @@ For example, "backlink(foo)" is influenced by the contents of page foo; they match; "created_before(foo)" is influenced by the metadata of foo; while "glob(*)" is not influenced by the contents of any page. +### Sorting plugins + +Similarly, it's possible to write plugins that add new functions as +[[ikiwiki/pagespec/sorting]] methods. To achieve this, add a function to +the IkiWiki::PageSpec package named `cmp_foo`, which will be used when sorting +by `foo` or `foo(...)` is requested. + +The function will be passed three or more parameters. The first two are +page names, and the third is `undef` if invoked as `foo`, or the parameter +`"bar"` if invoked as `foo(bar)`. It may also be passed additional, named +parameters. + +It should return the same thing as Perl's `cmp` and `<=>` operators: negative +if the first argument is less than the second, positive if the first argument +is greater, or zero if they are considered equal. It may also raise an +error using `error`, for instance if it needs a parameter but one isn't +provided. + +You can also define a function called `check_cmp_foo` in the same package. +If you do, it will be called while preparing to sort by `foo` or `foo(bar)`, +with argument `undef` or `"bar"` respectively; it may raise an error using +`error`, if sorting like that isn't going to work. + ### Setup plugins The ikiwiki setup file is loaded using a pluggable mechanism. If you look diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index 309961f1c..743ae4637 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -9,7 +9,11 @@ BEGIN { use_ok("IkiWiki"); } $config{srcdir}=$config{destdir}="/dev/null"; IkiWiki::checkconfig(); -hook(type => "sort", id => "path", call => sub { $_[0] cmp $_[1] }); +{ + package IkiWiki::PageSpec; + + sub cmp_path { $_[0] cmp $_[1] } +} %pagesources=( foo => "foo.mdwn", -- cgit v1.2.3 From 0d524ad672333fd0bafa64e81e261fd297c25580 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 26 Mar 2010 01:38:53 -0400 Subject: Fix incorrect influence info returned by a failing link() pagespec, that could lead to bad dependency handling in certian situations. --- IkiWiki.pm | 4 ++-- debian/changelog | 2 ++ doc/bugs/depends_simple_mixup.mdwn | 5 +++++ t/pagespec_match.t | 8 +++++++- 4 files changed, 16 insertions(+), 3 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 022bfe3bd..927d62940 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2215,7 +2215,7 @@ sub match_link ($$;@) { my $from=exists $params{location} ? $params{location} : ''; my $links = $IkiWiki::links{$page}; - return IkiWiki::FailReason->new("$page has no links", "" => 1) + return IkiWiki::FailReason->new("$page has no links", $page => $IkiWiki::DEPEND_LINKS, "" => 1) unless $links && @{$links}; my $bestlink = IkiWiki::bestlink($from, $link); foreach my $p (@{$links}) { @@ -2232,7 +2232,7 @@ sub match_link ($$;@) { if match_glob($p_rel, $link, %params); } } - return IkiWiki::FailReason->new("$page does not link to $link", "" => 1); + return IkiWiki::FailReason->new("$page does not link to $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1); } sub match_backlink ($$;@) { diff --git a/debian/changelog b/debian/changelog index da1ab890e..b9a105552 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,8 @@ ikiwiki (3.20100324) UNRELEASED; urgency=low * Add --set-yaml switch for setting more complex config file options. * filecheck: Fix bugs that prevented the pagespecs from matching when not called by attachment plugin. + * Fix incorrect influence info returned by a failing link() pagespec, + that could lead to bad dependency handling in certian situations. -- Joey Hess Sat, 13 Mar 2010 14:48:10 -0500 diff --git a/doc/bugs/depends_simple_mixup.mdwn b/doc/bugs/depends_simple_mixup.mdwn index c2845240d..2603ff04c 100644 --- a/doc/bugs/depends_simple_mixup.mdwn +++ b/doc/bugs/depends_simple_mixup.mdwn @@ -15,4 +15,9 @@ dependency. But, it seems to me it should still be listed in Then re-add the done link, and the dependency calc code breaks down, not noticing that bugs dependeded on the page and needs to be updated. + +Ok.. Turns out this was not a problem with the actual influences +calculation or dependency calculation code. Whew! `match_link` +just didn't set the influence correctly when failing. [[fixed|done]] + --[[Joey]] diff --git a/t/pagespec_match.t b/t/pagespec_match.t index 8b0be4e8a..ade9bca5a 100755 --- a/t/pagespec_match.t +++ b/t/pagespec_match.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 72; +use Test::More tests => 75; BEGIN { use_ok("IkiWiki"); } @@ -54,6 +54,7 @@ $config{userdir}=""; $links{foo}=[qw{bar baz}]; $links{bar}=[]; $links{baz}=[]; +$links{meh}=[]; $links{"bugs/foo"}=[qw{bugs/done}]; $links{"bugs/done"}=[]; $links{"bugs/bar"}=[qw{done}]; @@ -82,6 +83,7 @@ ok(! pagespec_match("bar", ""), "empty pagespec should match nothing"); ok(! pagespec_match("bar", " "), "blank pagespec should match nothing"); ok(pagespec_match("ook", "link(blog/tags/foo)"), "link internal absolute success"); ok(pagespec_match("ook", "link(/blog/tags/foo)"), "link explicit absolute success"); +ok(pagespec_match("meh", "!link(done)"), "negated failing match is a success"); $IkiWiki::pagectime{foo}=1154532692; # Wed Aug 2 11:26 EDT 2006 $IkiWiki::pagectime{bar}=1154532695; # after @@ -122,3 +124,7 @@ $i=pagespec_match("foo", "link(baz) and created_after(bar)")->influences; is(join(",", sort keys %$i), 'bar,foo', "influences add up over OR"); $i=pagespec_match("foo", "!link(baz) and !created_after(bar)")->influences; is(join(",", sort keys %$i), 'bar,foo', "influences unaffected by negation"); +$i=pagespec_match("foo", "!link(baz) and !created_after(bar)")->influences; +is(join(",", sort keys %$i), 'bar,foo', "influences unaffected by negation"); +$i=pagespec_match("meh", "!link(done)")->influences; +is(join(",", sort keys %$i), 'meh', "a negated, failing link test is successful, so the page is a link influence"); -- cgit v1.2.3 From 799b93d258bad917262ac160df74136f05d4a451 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 28 Mar 2010 20:23:22 -0400 Subject: don't check $@ after pagespec_translate pagespec_translate may set $@ if it fails to parse a pagespec, but due to memoization, this is not reliable. If a memoized call is repeated, and $@ is already set for some other reason previously, it will remain set through the call to pagespec_translate. Instead, just check if pagespec_translate returns undef. --- IkiWiki.pm | 9 ++++----- IkiWiki/Render.pm | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 927d62940..6739ba56c 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1796,7 +1796,7 @@ sub add_depends ($$;$) { # Add explicit dependencies for influences. my $sub=pagespec_translate($pagespec); - return if $@; + return unless defined $sub; foreach my $p (keys %pagesources) { my $r=$sub->($p, location => $page); my $i=$r->influences; @@ -2001,7 +2001,7 @@ sub pagespec_match ($$;@) { my $sub=pagespec_translate($spec); return IkiWiki::ErrorReason->new("syntax error in pagespec \"$spec\"") - if $@ || ! defined $sub; + if ! defined $sub; return $sub->($page, @params); } @@ -2019,7 +2019,7 @@ sub pagespec_match_list ($$;@) { my $sub=pagespec_translate($pagespec); error "syntax error in pagespec \"$pagespec\"" - if $@ || ! defined $sub; + if ! defined $sub; my @candidates; if (exists $params{list}) { @@ -2092,8 +2092,7 @@ sub pagespec_match_list ($$;@) { sub pagespec_valid ($) { my $spec=shift; - my $sub=pagespec_translate($spec); - return ! $@; + return defined pagespec_translate($spec); } sub glob2re ($) { diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index af24df155..abafb0887 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -565,7 +565,7 @@ sub render_dependent ($$$$$$$) { if (exists $depends{$p} && ! defined $reason) { foreach my $dep (keys %{$depends{$p}}) { my $sub=pagespec_translate($dep); - next if $@ || ! defined $sub; + next unless defined $sub; # only consider internal files # if the page explicitly depends -- cgit v1.2.3 From a875ee8be702bd4575e009dc652015c1157c7c2e Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 3 Apr 2010 13:48:30 +0100 Subject: Split out sortnaturally into a plugin --- IkiWiki.pm | 11 ----------- IkiWiki/Plugin/sortnaturally.pm | 32 ++++++++++++++++++++++++++++++++ debian/NEWS | 8 ++++++++ doc/ikiwiki/pagespec/sorting.mdwn | 5 +++-- doc/plugins/sortnaturally.mdwn | 5 +++++ 5 files changed, 48 insertions(+), 13 deletions(-) create mode 100644 IkiWiki/Plugin/sortnaturally.pm create mode 100644 doc/plugins/sortnaturally.mdwn (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index a89c14058..8f36f5818 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2423,15 +2423,4 @@ sub cmp_title { sub cmp_mtime { $IkiWiki::pagemtime{$_[1]} <=> $IkiWiki::pagemtime{$_[0]} } sub cmp_age { $IkiWiki::pagectime{$_[1]} <=> $IkiWiki::pagectime{$_[0]} } -sub check_cmp_title_natural { - eval q{use Sort::Naturally}; - if ($@) { - error(gettext("Sort::Naturally needed for title_natural sort")); - } -} -sub cmp_title_natural { - Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])), - IkiWiki::pagetitle(IkiWiki::basename($_[1]))) -} - 1 diff --git a/IkiWiki/Plugin/sortnaturally.pm b/IkiWiki/Plugin/sortnaturally.pm new file mode 100644 index 000000000..0023f31f9 --- /dev/null +++ b/IkiWiki/Plugin/sortnaturally.pm @@ -0,0 +1,32 @@ +#!/usr/bin/perl +# Sort::Naturally-powered title_natural sort order for IkiWiki +package IkiWiki::Plugin::sortnaturally; + +use IkiWiki 3.00; +no warnings; + +sub import { + hook(type => "getsetup", id => "sortnaturally", call => \&getsetup); +} + +sub getsetup { + return + plugin => { + safe => 1, + rebuild => 1, + }, +} + +sub checkconfig () { + eval q{use Sort::Naturally}; + error $@ if $@; +} + +package IkiWiki::PageSpec; + +sub cmp_title_natural { + Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])), + IkiWiki::pagetitle(IkiWiki::basename($_[1]))) +} + +1; diff --git a/debian/NEWS b/debian/NEWS index 50332670f..614eb11f8 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,3 +1,11 @@ +ikiwiki (3.20100320) UNRELEASED; urgency=low + + The sort="title_natural" option on [[!inline]] etc. now requires the + new sortnaturally plugin. This is not enabled by default, because it requires + the Sort::Naturally module. + + -- Simon McVittie Sat, 03 Apr 2010 13:46:08 +0100 + ikiwiki (3.20091017) unstable; urgency=low To take advantage of significant performance improvements, all diff --git a/doc/ikiwiki/pagespec/sorting.mdwn b/doc/ikiwiki/pagespec/sorting.mdwn index f27972d4e..ba995a521 100644 --- a/doc/ikiwiki/pagespec/sorting.mdwn +++ b/doc/ikiwiki/pagespec/sorting.mdwn @@ -6,9 +6,10 @@ orders can be specified. * `age` - List pages from the most recently created to the oldest. * `mtime` - List pages with the most recently modified first. * `title` - Order by title (page name). -* `title_natural` - Only available if [[!cpan Sort::Naturally]] is - installed. Orders by title, but numbers in the title are treated +[[!if test="enabled(sortnaturally)" then=""" +* `title_natural` - Orders by title, but numbers in the title are treated as such, ("1 2 9 10 20" instead of "1 10 2 20 9") +"""]] [[!if test="enabled(meta)" then=""" * `meta_title` - Order according to the `\[[!meta title="foo" sort="bar"]]` or `\[[!meta title="foo"]]` [[ikiwiki/directive]], or the page name if no diff --git a/doc/plugins/sortnaturally.mdwn b/doc/plugins/sortnaturally.mdwn new file mode 100644 index 000000000..91f373f6b --- /dev/null +++ b/doc/plugins/sortnaturally.mdwn @@ -0,0 +1,5 @@ +[[!template id=plugin name=sortnaturally core=1 author="[[chrysn]], [[smcv]]"]] +[[!tag type/meta]] + +This plugin provides the `title_natural` [[ikiwiki/pagespec/sorting]] order, +which uses Sort::Naturally to sort numbered pages in a more natural order. -- cgit v1.2.3 From 75fd08046548940c443c46bcdf9a5b0b6968b175 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 3 Apr 2010 13:49:20 +0100 Subject: Remove support for check_cmp_foo (pre-sort checks) --- IkiWiki.pm | 4 ---- doc/plugins/write.mdwn | 5 ----- 2 files changed, 9 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 8f36f5818..7547f1751 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1973,10 +1973,6 @@ sub cmpspec_translate ($) { } if (exists $IkiWiki::PageSpec::{"cmp_$word"}) { - if (exists $IkiWiki::PageSpec::{"check_cmp_$word"}) { - $IkiWiki::PageSpec::{"check_cmp_$word"}->($params); - } - if (defined $params) { push @data, $params; $code .= "IkiWiki::PageSpec::cmp_$word(\@_, \$data[$#data])"; diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index de2b47015..06c8f8e44 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1128,11 +1128,6 @@ is greater, or zero if they are considered equal. It may also raise an error using `error`, for instance if it needs a parameter but one isn't provided. -You can also define a function called `check_cmp_foo` in the same package. -If you do, it will be called while preparing to sort by `foo` or `foo(bar)`, -with argument `undef` or `"bar"` respectively; it may raise an error using -`error`, if sorting like that isn't going to work. - ### Setup plugins The ikiwiki setup file is loaded using a pluggable mechanism. If you look -- cgit v1.2.3 From 04a59b3c65e8e60805b6ed6d11d448b1d5babe64 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sat, 3 Apr 2010 13:57:38 +0100 Subject: Move sort hooks to the IkiWiki::SortSpec namespace Also rename cmpspec_translate (internal function) to sortspec_translate for consistency. --- IkiWiki.pm | 14 ++++++++------ IkiWiki/Plugin/meta.pm | 2 ++ IkiWiki/Plugin/sortnaturally.pm | 2 +- doc/plugins/write.mdwn | 2 +- t/pagespec_match_list.t | 2 +- 5 files changed, 13 insertions(+), 9 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 7547f1751..d716e8b39 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -37,7 +37,7 @@ our $DEPEND_LINKS=4; # Optimisation. use Memoize; memoize("abs2rel"); -memoize("cmpspec_translate"); +memoize("sortspec_translate"); memoize("pagespec_translate"); memoize("template_file"); @@ -1935,7 +1935,7 @@ sub add_link ($$) { unless grep { $_ eq $link } @{$links{$page}}; } -sub cmpspec_translate ($) { +sub sortspec_translate ($) { my $spec = shift; my $code = ""; @@ -1972,13 +1972,13 @@ sub cmpspec_translate ($) { $code .= "-"; } - if (exists $IkiWiki::PageSpec::{"cmp_$word"}) { + if (exists $IkiWiki::SortSpec::{"cmp_$word"}) { if (defined $params) { push @data, $params; - $code .= "IkiWiki::PageSpec::cmp_$word(\@_, \$data[$#data])"; + $code .= "IkiWiki::SortSpec::cmp_$word(\@_, \$data[$#data])"; } else { - $code .= "IkiWiki::PageSpec::cmp_$word(\@_, undef)"; + $code .= "IkiWiki::SortSpec::cmp_$word(\@_, undef)"; } } else { @@ -2095,7 +2095,7 @@ sub pagespec_match_list ($$;@) { } if (defined $params{sort}) { - my $f = cmpspec_translate($params{sort}); + my $f = sortspec_translate($params{sort}); @candidates = sort { $f->($a, $b) } @candidates; } @@ -2410,6 +2410,8 @@ sub match_ip ($$;@) { } } +package IkiWiki::SortSpec; + sub cmp_title { IkiWiki::pagetitle(IkiWiki::basename($_[0])) cmp diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index e8cc1e392..cd7d0d127 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -348,6 +348,8 @@ sub match_copyright ($$;@) { IkiWiki::Plugin::meta::match("copyright", @_); } +package IkiWiki::SortSpec; + sub cmp_meta_title { IkiWiki::Plugin::meta::titlesort($_[0]) cmp diff --git a/IkiWiki/Plugin/sortnaturally.pm b/IkiWiki/Plugin/sortnaturally.pm index 0023f31f9..f498820a5 100644 --- a/IkiWiki/Plugin/sortnaturally.pm +++ b/IkiWiki/Plugin/sortnaturally.pm @@ -22,7 +22,7 @@ sub checkconfig () { error $@ if $@; } -package IkiWiki::PageSpec; +package IkiWiki::SortSpec; sub cmp_title_natural { Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])), diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 06c8f8e44..b67142230 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1114,7 +1114,7 @@ while "glob(*)" is not influenced by the contents of any page. Similarly, it's possible to write plugins that add new functions as [[ikiwiki/pagespec/sorting]] methods. To achieve this, add a function to -the IkiWiki::PageSpec package named `cmp_foo`, which will be used when sorting +the IkiWiki::SortSpec package named `cmp_foo`, which will be used when sorting by `foo` or `foo(...)` is requested. The function will be passed three or more parameters. The first two are diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index 743ae4637..68112f5c0 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -10,7 +10,7 @@ $config{srcdir}=$config{destdir}="/dev/null"; IkiWiki::checkconfig(); { - package IkiWiki::PageSpec; + package IkiWiki::SortSpec; sub cmp_path { $_[0] cmp $_[1] } } -- cgit v1.2.3 From a358d74bef51dae31332ff27e897fe04834571e6 Mon Sep 17 00:00:00 2001 From: David Riebenbauer Date: Wed, 3 Feb 2010 04:29:10 +0100 Subject: Check for existence off srcfile in add_autofile add_autofile has to have checks, whether to create the file, anyway, so this will make things more consistent. Correcter check for the result of verify_src_file(). Cosmetic rename of a variable $addfile to $autofile. --- IkiWiki.pm | 11 ++++++++--- IkiWiki/Plugin/tag.pm | 5 ++--- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 90e623330..56c491339 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1897,9 +1897,14 @@ sub add_link ($$) { } sub add_autofile ($) { - my $addfile=shift; - my ($file,$page) = verify_src_file($addfile,$config{srcdir}); - if ($page) { + my $autofile=shift; + + if (srcfile($autofile, 1)) { + return 0; + } + + my ($file, $page) = verify_src_file("$config{srcdir}/$autofile", $config{srcdir}); + if (defined $file) { push @autofiles, $file; } } diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index c0b7feb23..c6c99ae45 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -71,15 +71,14 @@ sub gentag ($) { if (defined $config{tag_autocreate} && $config{tag_autocreate}) { my $tagfile = newpagefile(tagpage($tag), $config{default_pageext}); $tagfile=~s/^\///; - return if (srcfile($tagfile,1)); + + return if (! add_autofile($tagfile)); debug(sprintf(gettext("creating tag page %s"), $tag)); my $template=template("autotag.tmpl"); $template->param(tag => $tag); writefile($tagfile, $config{srcdir}, $template->output); - - add_autofile("$config{srcdir}/$tagfile"); } } -- cgit v1.2.3 From 628a52a6c49f5d2fc5af251f2d718c8dff5e8ed5 Mon Sep 17 00:00:00 2001 From: David Riebenbauer Date: Sat, 3 Apr 2010 21:17:20 +0200 Subject: Revert "Revert the effects of find_del_files() for (re)autoadded files." This reverts commit 31680111f0062f07727d14fcf291c98978ad5a2f. --- IkiWiki.pm | 3 +-- IkiWiki/Render.pm | 9 --------- 2 files changed, 1 insertion(+), 11 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 56c491339..1770703a5 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -14,8 +14,7 @@ use open qw{:utf8 :std}; use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %pagestate %wikistate %renderedfiles %oldrenderedfiles %pagesources %destsources %depends %depends_simple %hooks - %forcerebuild %loaded_plugins @autofiles %dellinks - %delrenderedfiles}; + %forcerebuild %loaded_plugins @autofiles}; use Exporter q{import}; our @EXPORT = qw(hook debug error template htmlpage deptype diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 5b72b6de1..fc71c8919 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -392,9 +392,7 @@ sub find_del_files ($) { else { push @del, $pagesources{$page}; } - $dellinks{$page}= $links{$page}; $links{$page}=[]; - $delrenderedfiles{$page}= $renderedfiles{$page}; $renderedfiles{$page}=[]; $pagemtime{$page}=0; } @@ -644,14 +642,8 @@ sub refresh () { scan($file); } - my %del_hash = map {$_, 1} @$del; while (my $autofile = shift (@autofiles)) { my $page=pagename($autofile); - if (exists $del_hash{$page}) { - $links{$page}= $dellinks{$page}; - $renderedfiles{$page}= $delrenderedfiles{$page}; - delete $del_hash{$page}; - } if ($pages->{$page}) { debug(sprintf(gettext("%s has multiple possible source pages"), $page)); } @@ -663,7 +655,6 @@ sub refresh () { scan($autofile); } - $del = [keys %del_hash]; calculate_links(); -- cgit v1.2.3 From 981400177d68a279f485727be3f013e68f0bf691 Mon Sep 17 00:00:00 2001 From: David Riebenbauer Date: Sat, 3 Apr 2010 21:10:16 +0200 Subject: Make sure deleted tag pages don't get recreated. The reason to do this is basically a user interaction design decision. It is achieved by adding an entry, associated to the creating plugin, to %pagestate. To find out if files were deleted a new global hash %del_hash is %introduced. --- IkiWiki.pm | 19 +++++++++++++++---- IkiWiki/Plugin/tag.pm | 2 +- IkiWiki/Render.pm | 5 ++++- 3 files changed, 20 insertions(+), 6 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 1770703a5..966a3bbc6 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -14,7 +14,7 @@ use open qw{:utf8 :std}; use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %pagestate %wikistate %renderedfiles %oldrenderedfiles %pagesources %destsources %depends %depends_simple %hooks - %forcerebuild %loaded_plugins @autofiles}; + %forcerebuild %loaded_plugins %autofiles %del_hash}; use Exporter q{import}; our @EXPORT = qw(hook debug error template htmlpage deptype @@ -1895,17 +1895,28 @@ sub add_link ($$) { unless grep { $_ eq $link } @{$links{$page}}; } -sub add_autofile ($) { +sub add_autofile ($$) { my $autofile=shift; + my $plugin=shift; if (srcfile($autofile, 1)) { return 0; } my ($file, $page) = verify_src_file("$config{srcdir}/$autofile", $config{srcdir}); - if (defined $file) { - push @autofiles, $file; + + if ((!defined $file) || + (exists $pagestate{$page}{$plugin}{autofile_deleted})) { + return 0; + } + + if (exists $del_hash{$file}) { + $pagestate{$page}{$plugin}{autofile_deleted}=1; + return 0; } + + $autofiles{$file}=$plugin; + return 1; } sub pagespec_translate ($) { diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index c6c99ae45..fdd63d637 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -72,7 +72,7 @@ sub gentag ($) { my $tagfile = newpagefile(tagpage($tag), $config{default_pageext}); $tagfile=~s/^\///; - return if (! add_autofile($tagfile)); + return if (! add_autofile($tagfile, "tag")); debug(sprintf(gettext("creating tag page %s"), $tag)); diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index fc71c8919..0c21455fb 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -637,12 +637,14 @@ sub refresh () { my ($changed, $internal_changed)=find_changed($files); run_hooks(needsbuild => sub { shift->($changed) }); my $oldlink_targets=calculate_old_links($changed, $del); + %del_hash = map { $_ => 1 } @{$del}; foreach my $file (@$changed) { scan($file); } - while (my $autofile = shift (@autofiles)) { + while (my $autofile = shift @{[keys %autofiles]}) { + my $plugin=$autofiles{$autofile}; my $page=pagename($autofile); if ($pages->{$page}) { debug(sprintf(gettext("%s has multiple possible source pages"), $page)); @@ -654,6 +656,7 @@ sub refresh () { push @{$changed}, $autofile if find_changed([$autofile]); scan($autofile); + delete $autofiles{$autofile}; } calculate_links(); -- cgit v1.2.3 From c1a42e76bc6667bfb2882a12d53c25d9f952ca82 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 2 Apr 2010 00:28:02 +0100 Subject: implement typed links; add tagged_is_strict config option --- IkiWiki.pm | 58 ++++++++++++++++++---- IkiWiki/Plugin/tag.pm | 36 +++++++++----- IkiWiki/Render.pm | 33 ++++++++++++ .../tagged__40____41___matching_wikilinks.mdwn | 3 ++ doc/ikiwiki/pagespec.mdwn | 3 ++ doc/plugins/tag.mdwn | 5 ++ doc/plugins/write.mdwn | 21 +++++++- t/index.t | 17 +++++-- t/tag.t | 45 +++++++++++++++++ 9 files changed, 193 insertions(+), 28 deletions(-) create mode 100755 t/tag.t (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 6739ba56c..25e9247b2 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -14,7 +14,7 @@ use open qw{:utf8 :std}; use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %pagestate %wikistate %renderedfiles %oldrenderedfiles %pagesources %destsources %depends %depends_simple %hooks - %forcerebuild %loaded_plugins}; + %forcerebuild %loaded_plugins %typedlinks %oldtypedlinks}; use Exporter q{import}; our @EXPORT = qw(hook debug error template htmlpage deptype @@ -24,7 +24,7 @@ our @EXPORT = qw(hook debug error template htmlpage deptype add_underlay pagetitle titlepage linkpage newpagefile inject add_link %config %links %pagestate %wikistate %renderedfiles - %pagesources %destsources); + %pagesources %destsources %typedlinks); our $VERSION = 3.00; # plugin interface version, next is ikiwiki version our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE our $installdir='/usr'; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE @@ -1503,7 +1503,7 @@ sub loadindex () { if (! $config{rebuild}) { %pagesources=%pagemtime=%oldlinks=%links=%depends= %destsources=%renderedfiles=%pagecase=%pagestate= - %depends_simple=(); + %depends_simple=%typedlinks=%oldtypedlinks=(); } my $in; if (! open ($in, "<", "$config{wikistatedir}/indexdb")) { @@ -1569,6 +1569,14 @@ sub loadindex () { if (exists $d->{state}) { $pagestate{$page}=$d->{state}; } + if (exists $d->{typedlinks}) { + $typedlinks{$page}=$d->{typedlinks}; + + while (my ($type, $links) = each %{$typedlinks{$page}}) { + next unless %$links; + $oldtypedlinks{$page}{$type} = {%$links}; + } + } } $oldrenderedfiles{$page}=[@{$d->{dest}}]; } @@ -1617,6 +1625,10 @@ sub saveindex () { $index{page}{$src}{depends_simple} = $depends_simple{$page}; } + if (exists $typedlinks{$page} && %{$typedlinks{$page}}) { + $index{page}{$src}{typedlinks} = $typedlinks{$page}; + } + if (exists $pagestate{$page}) { foreach my $id (@hookids) { foreach my $key (keys %{$pagestate{$page}{$id}}) { @@ -1926,12 +1938,17 @@ sub inject { use warnings; } -sub add_link ($$) { +sub add_link ($$;$) { my $page=shift; my $link=shift; + my $type=shift; push @{$links{$page}}, $link unless grep { $_ eq $link } @{$links{$page}}; + + if (defined $type) { + $typedlinks{$page}{$type}{$link} = 1; + } } sub pagespec_translate ($) { @@ -2212,6 +2229,11 @@ sub match_link ($$;@) { $link=derel($link, $params{location}); my $from=exists $params{location} ? $params{location} : ''; + my $linktype=$params{linktype}; + my $qualifier=''; + if (defined $linktype) { + $qualifier=" with type $linktype"; + } my $links = $IkiWiki::links{$page}; return IkiWiki::FailReason->new("$page has no links", $page => $IkiWiki::DEPEND_LINKS, "" => 1) @@ -2219,19 +2241,33 @@ sub match_link ($$;@) { my $bestlink = IkiWiki::bestlink($from, $link); foreach my $p (@{$links}) { if (length $bestlink) { - return IkiWiki::SuccessReason->new("$page links to $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) - if $bestlink eq IkiWiki::bestlink($page, $p); + if ((!defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p}) && $bestlink eq IkiWiki::bestlink($page, $p)) { + return IkiWiki::SuccessReason->new("$page links to $link$qualifier", $page => $IkiWiki::DEPEND_LINKS, "" => 1) + } } else { - return IkiWiki::SuccessReason->new("$page links to page $p matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) - if match_glob($p, $link, %params); + if ((!defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p}) && match_glob($p, $link, %params)) { + return IkiWiki::SuccessReason->new("$page links to page $p$qualifier, matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) + } my ($p_rel)=$p=~/^\/?(.*)/; $link=~s/^\///; - return IkiWiki::SuccessReason->new("$page links to page $p_rel matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) - if match_glob($p_rel, $link, %params); + if ((!defined $linktype || exists $IkiWiki::typedlinks{$page}{$linktype}{$p_rel}) && match_glob($p_rel, $link, %params)) { + return IkiWiki::SuccessReason->new("$page links to page $p_rel$qualifier, matching $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1) + } } } - return IkiWiki::FailReason->new("$page does not link to $link", $page => $IkiWiki::DEPEND_LINKS, "" => 1); + return IkiWiki::FailReason->new("$page does not link to $link$qualifier", $page => $IkiWiki::DEPEND_LINKS, "" => 1); +} + +sub match_typedlink($$;@) { + my $page = shift; + my $args = shift; + + if ($args =~ /^(\w+)\s+(.*)$/) { + return match_link($page, $2, @_, linktype => $1); + } + + return IkiWiki::ErrorReason->new("typedlink expects e.g. 'tag *' but got: $args"); } sub match_backlink ($$;@) { diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index cdcfaf536..af4bff1bc 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -6,8 +6,6 @@ use warnings; use strict; use IkiWiki 3.00; -my %tags; - sub import { hook(type => "getopt", id => "tag", call => \&getopt); hook(type => "getsetup", id => "tag", call => \&getsetup); @@ -36,6 +34,13 @@ sub getsetup () { safe => 1, rebuild => 1, }, + tagged_is_strict => { + type => "boolean", + default => 0, + description => "if 1, tagged() doesn't match normal WikiLinks to tag pages", + safe => 1, + rebuild => 1, + }, } sub tagpage ($) { @@ -71,9 +76,8 @@ sub preprocess_tag (@) { foreach my $tag (keys %params) { $tag=linkpage($tag); - $tags{$page}{$tag}=1; # hidden WikiLink - add_link($page, tagpage($tag)); + add_link($page, tagpage($tag), 'tag'); } return ""; @@ -87,15 +91,13 @@ sub preprocess_taglink (@) { return join(" ", map { if (/(.*)\|(.*)/) { my $tag=linkpage($2); - $tags{$params{page}}{$tag}=1; - add_link($params{page}, tagpage($tag)); + add_link($params{page}, tagpage($tag), 'tag'); return taglink($params{page}, $params{destpage}, $tag, linktext => pagetitle($1)); } else { my $tag=linkpage($_); - $tags{$params{page}}{$tag}=1; - add_link($params{page}, tagpage($tag)); + add_link($params{page}, tagpage($tag), 'tag'); return taglink($params{page}, $params{destpage}, $tag); } } @@ -110,17 +112,19 @@ sub pagetemplate (@) { my $destpage=$params{destpage}; my $template=$params{template}; + my $tags = $typedlinks{$page}{tag}; + $template->param(tags => [ map { link => taglink($page, $destpage, $_, rel => "tag") - }, sort keys %{$tags{$page}} - ]) if exists $tags{$page} && %{$tags{$page}} && $template->query(name => "tags"); + }, sort keys %$tags + ]) if defined $tags && %$tags && $template->query(name => "tags"); if ($template->query(name => "categories")) { # It's an rss/atom template. Add any categories. - if (exists $tags{$page} && %{$tags{$page}}) { + if (defined $tags && %$tags) { $template->param(categories => [map { category => $_ }, - sort keys %{$tags{$page}}]); + sort keys %$tags]); } } } @@ -130,7 +134,13 @@ package IkiWiki::PageSpec; sub match_tagged ($$;@) { my $page = shift; my $glob = shift; - return match_link($page, IkiWiki::Plugin::tag::tagpage($glob)); + + if ($IkiWiki::config{tagged_is_strict}) { + return match_link($page, IkiWiki::Plugin::tag::tagpage($glob), linktype => 'tag'); + } + else { + return match_link($page, IkiWiki::Plugin::tag::tagpage($glob)); + } } 1 diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index abafb0887..5810fc974 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -167,6 +167,7 @@ sub scan ($) { else { $links{$page}=[]; } + delete $typedlinks{$page}; run_hooks(scan => sub { shift->( @@ -398,6 +399,7 @@ sub find_del_files ($) { push @del, $pagesources{$page}; } $links{$page}=[]; + delete $typedlinks{$page}; $renderedfiles{$page}=[]; $pagemtime{$page}=0; } @@ -499,6 +501,29 @@ sub remove_unrendered () { } } +sub link_types_changed ($$) { + # each is of the form { type => { link => 1 } } + my $new = shift; + my $old = shift; + + return 0 if !defined $new && !defined $old; + return 1 if !defined $new || !defined $old; + + while (my ($type, $links) = each %$new) { + foreach my $link (keys %$links) { + return 1 unless exists $old{$type}{$link}; + } + } + + while (my ($type, $links) = each %$old) { + foreach my $link (keys %$links) { + return 1 unless exists $new{$type}{$link}; + } + } + + return 0; +} + sub calculate_changed_links ($$$) { my ($changed, $del, $oldlink_targets)=@_; @@ -525,6 +550,14 @@ sub calculate_changed_links ($$$) { } $linkchangers{lc($page)}=1; } + + # we currently assume that changing the type of a link doesn't + # change backlinks + if (!exists $linkchangers{lc($page)}) { + if (link_types_changed($typedlinks{$page}, $oldlinktypes{$page})) { + $linkchangers{lc($page)}=1; + } + } } return \%backlinkchanged, \%linkchangers; diff --git a/doc/bugs/tagged__40____41___matching_wikilinks.mdwn b/doc/bugs/tagged__40____41___matching_wikilinks.mdwn index e7e4af7c3..9037d6c02 100644 --- a/doc/bugs/tagged__40____41___matching_wikilinks.mdwn +++ b/doc/bugs/tagged__40____41___matching_wikilinks.mdwn @@ -28,6 +28,9 @@ rationale on this, or what am I doing wrong, and how to achieve what I want? >> is valid. [[todo/matching_different_kinds_of_links]] is probably >> how it will eventually be solved. --[[Joey]] +>>> [[Done]]: you can now set the `tagged_is_strict` config option to `1` +>>> if you don't want `tagged` to match other wikilinks. --[[smcv]] + > And this is an illustration why a clean work-around (without changing the software) is not possible: while thinking about [[todo/matching_different_kinds_of_links]], I thought one could work around the problem by simply explicitly including the kind of the relation into the link target (like the tagbase in tags), and by having a separate page without the "tagbase" to link to when one wants simply to refer to the tag without tagging. But this won't work: one has to at least once refer to the real tag page if one wants to talk about it, and this reference will count as tagging (unwanted). --Ivan Z. > But well, perhaps there is a workaround without introducing different kinds of links. One could modify the [[tag plugin|plugins/tag]] so that it adds 2 links to a page: for tagging -- `tagbase/TAG`, and for navigation -- `tagdescription/TAG` (displayed at the bottom). Then the `tagdescription/TAG` page would hold whatever list one wishes (with `tagged(TAG)` in the pagespec), and whenever one wants to merely refer to the tag, one should link to `tagdescription/TAG`--this link won't count as tagging. So, `tagbase/TAG` would become completely auxiliary (internal) link targets for ikiwiki, the users would edit or link to only `tagdescription/TAG`. --Ivan Z. diff --git a/doc/ikiwiki/pagespec.mdwn b/doc/ikiwiki/pagespec.mdwn index 5c191f23f..ca6693024 100644 --- a/doc/ikiwiki/pagespec.mdwn +++ b/doc/ikiwiki/pagespec.mdwn @@ -52,6 +52,9 @@ Some more elaborate limits can be added to what matches using these functions: specified IP address. * "`postcomment(glob)`" - matches only when comments are being posted to a page matching the specified glob +* "`typedlink(type glob)`" - matches pages that link to a given page (or glob) + with a given link type. Plugins can create links with a specific type: + for instance, the tag plugin creates links of type `tag`. For example, to match all pages in a blog that link to the page about music and were written in 2005: diff --git a/doc/plugins/tag.mdwn b/doc/plugins/tag.mdwn index 8ff70a069..8cd79da41 100644 --- a/doc/plugins/tag.mdwn +++ b/doc/plugins/tag.mdwn @@ -8,6 +8,11 @@ These directives allow tagging pages. It also provides the `tagged()` [[ikiwiki/PageSpec]], which can be used to match pages that are tagged with a specific tag. +If the `tagged_is_strict` config option is set, `tagged()` will only match +tags explicitly set with [[ikiwiki/directive/tag]] or +[[ikiwiki/directive/taglink]]; if not (the default), it will also match +any other [[WikiLinks|ikiwiki/WikiLink]] to the tag page. + [[!if test="enabled(tag)" then=""" This wiki has the tag plugin enabled, so you'll see a note below that this page is tagged with the "tags" tag. diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 96a2aa16d..fe7cf0183 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -633,6 +633,22 @@ reference. Do not modify this hash directly; call `add_link()`. $links{"foo"} = ["bar", "baz"]; +### `%typedlinks` + +The `%typedlinks` hash records links of specific types. Do not modify this +hash directly; call `add_link()`. The keys are page names, and the values +are hash references. In each page's hash reference, the keys are link types +defined by plugins, and the values are hash references with link targets +as keys, and 1 as a dummy value, something like this: + + $typedlinks{"foo"} = { + tag => { short_word => 1, metasyntactic_variable => 1 }, + next_page => { bar => 1 }, + }; + +Ordinary [[WikiLinks|ikiwiki/WikiLink]] appear in `%links`, but not in +`%typedlinks`. + ### `%pagesources` The `%pagesources` has can be used to look up the source filename @@ -939,11 +955,14 @@ Optionally, a third parameter can be passed, to specify the preferred filename of the page. For example, `targetpage("foo", "rss", "feed")` will yield something like `foo/feed.rss`. -### `add_link($$)` +### `add_link($$;$)` This adds a link to `%links`, ensuring that duplicate links are not added. Pass it the page that contains the link, and the link text. +An optional third parameter sets the link type (`undef` produces an ordinary +[[ikiwiki/WikiLink]]). + ## Miscellaneous ### Internal use pages diff --git a/t/index.t b/t/index.t index 2f23524a7..44273059d 100755 --- a/t/index.t +++ b/t/index.t @@ -4,7 +4,7 @@ use strict; use IkiWiki; package IkiWiki; # use internal variables -use Test::More tests => 27; +use Test::More tests => 31; $config{wikistatedir}="/tmp/ikiwiki-test.$$"; system "rm -rf $config{wikistatedir}"; @@ -31,6 +31,7 @@ $renderedfiles{"bar"}=["bar.html", "bar.rss", "sparkline-foo.gif"]; $renderedfiles{"bar.png"}=["bar.png"]; $links{"Foo"}=["bar.png"]; $links{"bar"}=["Foo", "new-page"]; +$typedlinks{"bar"}={tag => {"Foo" => 1}}; $links{"bar.png"}=[]; $depends{"Foo"}={}; $depends{"bar"}={"foo*" => 1}; @@ -45,7 +46,7 @@ ok(-s "$config{wikistatedir}/indexdb", "index file created"); # Clear state. %oldrenderedfiles=%pagectime=(); -%pagesources=%pagemtime=%oldlinks=%links=%depends= +%pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks= %destsources=%renderedfiles=%pagecase=%pagestate=(); ok(loadindex(), "load index"); @@ -104,10 +105,16 @@ is_deeply(\%destsources, { "sparkline-foo.gif" => "bar", "bar.png" => "bar.png", }, "%destsources generated correctly"); +is_deeply(\%typedlinks, { + bar => {tag => {"Foo" => 1}}, +}, "%typedlinks loaded correctly"); +is_deeply(\%oldtypedlinks, { + bar => {tag => {"Foo" => 1}}, +}, "%oldtypedlinks loaded correctly"); # Clear state. %oldrenderedfiles=%pagectime=(); -%pagesources=%pagemtime=%oldlinks=%links=%depends= +%pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks= %destsources=%renderedfiles=%pagecase=%pagestate=(); # When state is loaded for a wiki rebuild, only ctime and oldrenderedfiles @@ -140,5 +147,9 @@ is_deeply(\%pagecase, { }, "%pagecase generated correctly"); is_deeply(\%destsources, { }, "%destsources generated correctly"); +is_deeply(\%typedlinks, { +}, "%typedlinks cleared correctly"); +is_deeply(\%oldtypedlinks, { +}, "%oldtypedlinks cleared correctly"); system "rm -rf $config{wikistatedir}"; diff --git a/t/tag.t b/t/tag.t new file mode 100755 index 000000000..3383fd475 --- /dev/null +++ b/t/tag.t @@ -0,0 +1,45 @@ +#!/usr/bin/perl +package IkiWiki; + +use warnings; +use strict; +use Test::More tests => 10; + +BEGIN { use_ok("IkiWiki"); } +BEGIN { use_ok("IkiWiki::Plugin::tag"); } + +ok(! system("rm -rf t/tmp; mkdir t/tmp")); + +$config{userdir} = "users"; +$config{tagbase} = "tags"; +$config{tagged_is_strict} = 1; + +%oldrenderedfiles=%pagectime=(); +%pagesources=%pagemtime=%oldlinks=%links=%depends=%typedlinks=%oldtypedlinks= +%destsources=%renderedfiles=%pagecase=%pagestate=(); + +foreach my $page (qw(tags/numbers tags/letters one two alpha beta)) { + $pagesources{$page} = "$page.mdwn"; + $pagemtime{$page} = $pagectime{$page} = 1000000; +} + +$links{one}=[qw(tags/numbers alpha tags/letters)]; +$links{two}=[qw(tags/numbers)]; +$links{alpha}=[qw(tags/letters one)]; +$links{beta}=[qw(tags/letters)]; +$typedlinks{one}={tag => {"tags/numbers" => 1 }}; +$typedlinks{two}={tag => {"tags/numbers" => 1 }}; +$typedlinks{alpha}={tag => {"tags/letters" => 1 }}; +$typedlinks{beta}={tag => {"tags/letters" => 1 }}; + +ok(pagespec_match("one", "tagged(numbers)")); +ok(!pagespec_match("two", "tagged(alpha)")); +ok(pagespec_match("one", "link(tags/numbers)")); +ok(pagespec_match("one", "link(alpha)")); + +ok(pagespec_match("one", "typedlink(tag tags/numbers)")); +ok(!pagespec_match("one", "typedlink(tag tags/letters)")); +# invalid syntax +ok(pagespec_match("one", "typedlink(tag)")->isa("IkiWiki::ErrorReason")); + +1; -- cgit v1.2.3 From f80e1cb577f3b4ca8f525ddb257f190e481b9194 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Sun, 4 Apr 2010 00:26:03 +0100 Subject: Remove the typedlink(tag foo) pagespec feature, which is less friendly than tagged() Plugins that introduce a link type should also introduce pagespec syntax for it. --- IkiWiki.pm | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 25e9247b2..6ea0fb3f3 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2259,17 +2259,6 @@ sub match_link ($$;@) { return IkiWiki::FailReason->new("$page does not link to $link$qualifier", $page => $IkiWiki::DEPEND_LINKS, "" => 1); } -sub match_typedlink($$;@) { - my $page = shift; - my $args = shift; - - if ($args =~ /^(\w+)\s+(.*)$/) { - return match_link($page, $2, @_, linktype => $1); - } - - return IkiWiki::ErrorReason->new("typedlink expects e.g. 'tag *' but got: $args"); -} - sub match_backlink ($$;@) { my $ret=match_link($_[1], $_[0], @_); $ret->influences($_[1] => $IkiWiki::DEPEND_LINKS); -- cgit v1.2.3 From f8457f9a902e880e0240ba7f5180c22999f0e713 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 5 Apr 2010 17:18:30 -0400 Subject: fix bug that left stray

tags Both markdown and tidy add paragraph tags around text, that needs to be stripped when the text is a short, one line fragment that is being inserted into a larger page. tidy also adds several newlines to the end, and this broke removal of the paragraph tags. --- IkiWiki.pm | 7 +++---- doc/bugs/stray___60____47__p__62___tags.mdwn | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 6739ba56c..0cbc84788 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1164,7 +1164,7 @@ sub htmlize ($$$$) { my $content=shift; my $oneline = $content !~ /\n/; - + if (exists $hooks{htmlize}{$type}) { $content=$hooks{htmlize}{$type}{call}->( page => $page, @@ -1185,10 +1185,9 @@ sub htmlize ($$$$) { if ($oneline) { # hack to get rid of enclosing junk added by markdown - # and other htmlizers + # and other htmlizers/sanitizers $content=~s/^

//i; - $content=~s/<\/p>$//i; - chomp $content; + $content=~s/<\/p>\n*$//i; } return $content; diff --git a/doc/bugs/stray___60____47__p__62___tags.mdwn b/doc/bugs/stray___60____47__p__62___tags.mdwn index 6e508ffda..99d6fe09f 100644 --- a/doc/bugs/stray___60____47__p__62___tags.mdwn +++ b/doc/bugs/stray___60____47__p__62___tags.mdwn @@ -13,3 +13,5 @@ I believe that this snippet in `IkiWiki.pm` might be the reason for the imbalanc } The fact that HTML in a `\[[!meta title]]` is added but then escaped might indicate that some other bug is involved. + +> [[done]] --[[Joey]] -- cgit v1.2.3 From cb8b2f80b2f8c91eba3f3a6a5b9913ab80326df8 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 5 Apr 2010 22:50:51 +0100 Subject: Use $a and $b for SortSpec cmp callbacks --- IkiWiki.pm | 27 ++++++++++++++++++--------- IkiWiki/Plugin/meta.pm | 14 ++++++-------- IkiWiki/Plugin/sortnaturally.pm | 4 ++-- doc/plugins/write.mdwn | 20 ++++++++++---------- t/pagespec_match_list.t | 2 +- 5 files changed, 37 insertions(+), 30 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index d716e8b39..da36494fb 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1975,10 +1975,10 @@ sub sortspec_translate ($) { if (exists $IkiWiki::SortSpec::{"cmp_$word"}) { if (defined $params) { push @data, $params; - $code .= "IkiWiki::SortSpec::cmp_$word(\@_, \$data[$#data])"; + $code .= "IkiWiki::SortSpec::cmp_$word(\$data[$#data])"; } else { - $code .= "IkiWiki::SortSpec::cmp_$word(\@_, undef)"; + $code .= "IkiWiki::SortSpec::cmp_$word(undef)"; } } else { @@ -2095,9 +2095,8 @@ sub pagespec_match_list ($$;@) { } if (defined $params{sort}) { - my $f = sortspec_translate($params{sort}); - - @candidates = sort { $f->($a, $b) } @candidates; + @candidates = IkiWiki::SortSpec::sort_pages($params{sort}, + @candidates); } @candidates=reverse(@candidates) if $params{reverse}; @@ -2412,13 +2411,23 @@ sub match_ip ($$;@) { package IkiWiki::SortSpec; +# This is in the SortSpec namespace so that the $a and $b that sort() uses +# $IkiWiki::SortSpec::a and $IkiWiki::SortSpec::b, so that plugins' cmp +# functions can access them easily. +sub sort_pages +{ + my $f = IkiWiki::sortspec_translate(shift); + + return sort $f @_; +} + sub cmp_title { - IkiWiki::pagetitle(IkiWiki::basename($_[0])) + IkiWiki::pagetitle(IkiWiki::basename($a)) cmp - IkiWiki::pagetitle(IkiWiki::basename($_[1])) + IkiWiki::pagetitle(IkiWiki::basename($b)) } -sub cmp_mtime { $IkiWiki::pagemtime{$_[1]} <=> $IkiWiki::pagemtime{$_[0]} } -sub cmp_age { $IkiWiki::pagectime{$_[1]} <=> $IkiWiki::pagectime{$_[0]} } +sub cmp_mtime { $IkiWiki::pagemtime{$b} <=> $IkiWiki::pagemtime{$a} } +sub cmp_age { $IkiWiki::pagectime{$b} <=> $IkiWiki::pagectime{$a} } 1 diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 4992617d0..553f93455 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -374,25 +374,23 @@ sub match_copyright ($$;@) { package IkiWiki::SortSpec; sub cmp_meta { - my $left = $_[0]; - my $right = $_[1]; - my $meta = $_[2]; + my $meta = $_[0]; error(gettext("sort=meta requires a parameter")) unless defined $meta; if ($meta eq 'updated' || $meta eq 'date') { - return IkiWiki::Plugin::meta::get_sort_key($left, $meta) + return IkiWiki::Plugin::meta::get_sort_key($a, $meta) <=> - IkiWiki::Plugin::meta::get_sort_key($right, $meta); + IkiWiki::Plugin::meta::get_sort_key($b, $meta); } - return IkiWiki::Plugin::meta::get_sort_key($left, $meta) + return IkiWiki::Plugin::meta::get_sort_key($a, $meta) cmp - IkiWiki::Plugin::meta::get_sort_key($right, $meta); + IkiWiki::Plugin::meta::get_sort_key($b, $meta); } # A prototype of how sort=title could behave in 4.0 or something sub cmp_meta_title { - $_[2] = 'title'; + $_[0] = 'title'; return cmp_meta(@_); } diff --git a/IkiWiki/Plugin/sortnaturally.pm b/IkiWiki/Plugin/sortnaturally.pm index f498820a5..92453749d 100644 --- a/IkiWiki/Plugin/sortnaturally.pm +++ b/IkiWiki/Plugin/sortnaturally.pm @@ -25,8 +25,8 @@ sub checkconfig () { package IkiWiki::SortSpec; sub cmp_title_natural { - Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($_[0])), - IkiWiki::pagetitle(IkiWiki::basename($_[1]))) + Sort::Naturally::ncmp(IkiWiki::pagetitle(IkiWiki::basename($a)), + IkiWiki::pagetitle(IkiWiki::basename($b))) } 1; diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index b67142230..f42cc86ae 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1117,16 +1117,16 @@ Similarly, it's possible to write plugins that add new functions as the IkiWiki::SortSpec package named `cmp_foo`, which will be used when sorting by `foo` or `foo(...)` is requested. -The function will be passed three or more parameters. The first two are -page names, and the third is `undef` if invoked as `foo`, or the parameter -`"bar"` if invoked as `foo(bar)`. It may also be passed additional, named -parameters. - -It should return the same thing as Perl's `cmp` and `<=>` operators: negative -if the first argument is less than the second, positive if the first argument -is greater, or zero if they are considered equal. It may also raise an -error using `error`, for instance if it needs a parameter but one isn't -provided. +The names of pages to be compared are in the global variables `$a` and `$b` +in the IkiWiki::SortSpec package. The function should return the same thing +as Perl's `cmp` and `<=>` operators: negative if `$a` is less than `$b`, +positive if `$a` is greater, or zero if they are considered equal. It may +also raise an error using `error`, for instance if it needs a parameter but +one isn't provided. + +The function will also be passed one or more parameters. The first is +`undef` if invoked as `foo`, or the parameter `"bar"` if invoked as `foo(bar)`; +it may also be passed additional, named parameters. ### Setup plugins diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index 68112f5c0..2ad7a9105 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -12,7 +12,7 @@ IkiWiki::checkconfig(); { package IkiWiki::SortSpec; - sub cmp_path { $_[0] cmp $_[1] } + sub cmp_path { $a cmp $b } } %pagesources=( -- cgit v1.2.3 From 153c0ff13ba01fa42b3e34b410311c490ee084e9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 6 Apr 2010 23:29:18 -0400 Subject: minor style etc changes --- IkiWiki.pm | 6 ++---- IkiWiki/Plugin/meta.pm | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 6d2f4dac3..2cad6a3ef 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2435,10 +2435,8 @@ sub match_ip ($$;@) { package IkiWiki::SortSpec; # This is in the SortSpec namespace so that the $a and $b that sort() uses -# $IkiWiki::SortSpec::a and $IkiWiki::SortSpec::b, so that plugins' cmp -# functions can access them easily. -sub sort_pages -{ +# are easily available in this namespace, for cmp functions to use them. +sub sort_pages { my $f = IkiWiki::sortspec_translate(shift); return sort $f @_; diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 34e902bec..892f6b2c9 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -300,8 +300,8 @@ sub pagetemplate (@) { } sub get_sort_key { - my $page = $_[0]; - my $meta = $_[1]; + my $page = shift; + my $meta = shift; # e.g. titlesort (also makes sense for author) my $key = $pagestate{$page}{meta}{$meta . "sort"}; @@ -379,7 +379,7 @@ sub match_copyright ($$;@) { package IkiWiki::SortSpec; sub cmp_meta { - my $meta = $_[0]; + my $meta = shift; error(gettext("sort=meta requires a parameter")) unless defined $meta; if ($meta eq 'updated' || $meta eq 'date') { -- cgit v1.2.3 From 0bfc364a7df124509855b8ed0b1b33ab5bc9ebbb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 11 Apr 2010 01:30:03 -0400 Subject: optimization: pagespec_match_list with no num limit matches before sorting This can be a lot faster, since huge numbers of pages are not sorted only to mostly be thrown away. It sped up a build of my blog by at least 5 minutes. --- IkiWiki.pm | 38 ++++++++++++++++++++++++++------------ doc/todo/smarter_sorting.mdwn | 3 +++ t/pagespec_match_list.t | 6 +++++- 3 files changed, 34 insertions(+), 13 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 2cad6a3ef..74d452c50 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1951,8 +1951,9 @@ sub add_link ($$;$) { } } -sub sortspec_translate ($) { +sub sortspec_translate ($$) { my $spec = shift; + my $reverse = shift; my $code = ""; my @data; @@ -2007,6 +2008,10 @@ sub sortspec_translate ($) { return sub { 0 }; } + if ($reverse) { + $code="-($code)"; + } + no warnings; return eval 'sub { '.$code.' }'; } @@ -2109,18 +2114,20 @@ sub pagespec_match_list ($$;@) { ? grep { ! $params{filter}->($_) } keys %pagesources : keys %pagesources; } - - if (defined $params{sort}) { - @candidates = IkiWiki::SortSpec::sort_pages($params{sort}, - @candidates); + + my $num=$params{num}; + my $sort=$params{sort}; + my $reverse=$params{reverse}; + # when only the top matches will be returned, it's efficient to + # sort before matching to pagespec, + if (defined $num && defined $sort) { + @candidates=IkiWiki::SortSpec::sort_pages( + $sort, $reverse, @candidates); } - - @candidates=reverse(@candidates) if $params{reverse}; $depends{$page}{$pagespec} |= ($params{deptype} || $DEPEND_CONTENT); # clear params, remainder is passed to pagespec - my $num=$params{num}; delete @params{qw{num deptype reverse sort filter list}}; my @matches; @@ -2144,7 +2151,15 @@ sub pagespec_match_list ($$;@) { $depends_simple{$page}{lc $k} |= $i->{$k}; } - return @matches; + # when all matches will be returned, it's efficient to + # sort after matching + if (! defined $num && defined $sort) { + return IkiWiki::SortSpec::sort_pages( + $sort, $reverse, @matches); + } + else { + return @matches; + } } sub pagespec_valid ($) { @@ -2437,9 +2452,8 @@ package IkiWiki::SortSpec; # This is in the SortSpec namespace so that the $a and $b that sort() uses # are easily available in this namespace, for cmp functions to use them. sub sort_pages { - my $f = IkiWiki::sortspec_translate(shift); - - return sort $f @_; + my $f=IkiWiki::sortspec_translate(shift, shift); + sort $f @_ } sub cmp_title { diff --git a/doc/todo/smarter_sorting.mdwn b/doc/todo/smarter_sorting.mdwn index 5a6d63ef1..f8ac216dc 100644 --- a/doc/todo/smarter_sorting.mdwn +++ b/doc/todo/smarter_sorting.mdwn @@ -29,5 +29,8 @@ date range.) Well, in this case, it *does* make sense to flip it, limit by pagespe first, and do a (quick)sort second. (No influence complications, either.) +> Flipping when there's no limit implemented, and it knocked 1/3 off +> the rebuild time of my blog's archive pages. --[[Joey]] + Adding these special cases will be more complicated, but I think the best of both worlds. --[[Joey]] diff --git a/t/pagespec_match_list.t b/t/pagespec_match_list.t index 2ad7a9105..c7688c6c0 100755 --- a/t/pagespec_match_list.t +++ b/t/pagespec_match_list.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 90; +use Test::More tests => 92; BEGIN { use_ok("IkiWiki"); } @@ -38,12 +38,16 @@ $links{foo3}=[qw{bar}]; is_deeply([pagespec_match_list("foo", "bar")], ["bar"]); is_deeply([sort(pagespec_match_list("foo", "* and !post/*"))], ["bar", "foo", "foo2", "foo3"]); is_deeply([sort(pagespec_match_list("foo", "post/*"))], ["post/1", "post/2", "post/3"]); +is_deeply([pagespec_match_list("foo", "post/*", sort => "title")], + ["post/1", "post/2", "post/3"]); is_deeply([pagespec_match_list("foo", "post/*", sort => "title", reverse => 1)], ["post/3", "post/2", "post/1"]); is_deeply([pagespec_match_list("foo", "post/*", sort => "title", num => 2)], ["post/1", "post/2"]); is_deeply([pagespec_match_list("foo", "post/*", sort => "title", num => 50)], ["post/1", "post/2", "post/3"]); +is_deeply([pagespec_match_list("foo", "post/*", sort => "title", num => 50, reverse => 1)], + ["post/3", "post/2", "post/1"]); is_deeply([pagespec_match_list("foo", "post/*", sort => "title", filter => sub { $_[0] =~ /3/}) ], ["post/1", "post/2"]); -- cgit v1.2.3 From d50bd08439d5df17855b62f7c4d658027f93792d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 12 Apr 2010 12:41:32 -0400 Subject: refactor sortspec translation --- IkiWiki.pm | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 74d452c50..1730e476a 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2102,6 +2102,8 @@ sub pagespec_match_list ($$;@) { my $sub=pagespec_translate($pagespec); error "syntax error in pagespec \"$pagespec\"" if ! defined $sub; + my $sort=sortspec_translate($params{sort}, $params{reverse}) + if defined $params{sort}; my @candidates; if (exists $params{list}) { @@ -2115,21 +2117,18 @@ sub pagespec_match_list ($$;@) { : keys %pagesources; } + # clear params, remainder is passed to pagespec + $depends{$page}{$pagespec} |= ($params{deptype} || $DEPEND_CONTENT); my $num=$params{num}; - my $sort=$params{sort}; - my $reverse=$params{reverse}; + delete @params{qw{num deptype reverse sort filter list}}; + # when only the top matches will be returned, it's efficient to # sort before matching to pagespec, if (defined $num && defined $sort) { @candidates=IkiWiki::SortSpec::sort_pages( - $sort, $reverse, @candidates); + $sort, @candidates); } - $depends{$page}{$pagespec} |= ($params{deptype} || $DEPEND_CONTENT); - - # clear params, remainder is passed to pagespec - delete @params{qw{num deptype reverse sort filter list}}; - my @matches; my $firstfail; my $count=0; @@ -2155,7 +2154,7 @@ sub pagespec_match_list ($$;@) { # sort after matching if (! defined $num && defined $sort) { return IkiWiki::SortSpec::sort_pages( - $sort, $reverse, @matches); + $sort, @matches); } else { return @matches; @@ -2452,7 +2451,7 @@ package IkiWiki::SortSpec; # This is in the SortSpec namespace so that the $a and $b that sort() uses # are easily available in this namespace, for cmp functions to use them. sub sort_pages { - my $f=IkiWiki::sortspec_translate(shift, shift); + my $f=shift; sort $f @_ } -- cgit v1.2.3 From b14f84c4acccbc8450a9102b3b647013989b27bb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 16 Apr 2010 17:02:29 -0400 Subject: --gettime revamp * Rename --getctime to --gettime. (The old name still works for backwards compatability.) * --gettime now also looks up last modification time. * Add rcs_getmtime to plugin API; currently only implemented for git. --- IkiWiki.pm | 8 +++++-- IkiWiki/Plugin/bzr.pm | 5 +++++ IkiWiki/Plugin/cvs.pm | 5 +++++ IkiWiki/Plugin/darcs.pm | 5 +++++ IkiWiki/Plugin/git.pm | 5 +++++ IkiWiki/Plugin/mercurial.pm | 5 +++++ IkiWiki/Plugin/monotone.pm | 5 +++++ IkiWiki/Plugin/norcs.pm | 7 +++++- IkiWiki/Plugin/svn.pm | 5 +++++ IkiWiki/Plugin/tla.pm | 5 +++++ IkiWiki/Render.pm | 18 +++++++++++++--- debian/changelog | 5 +++++ .../How_does_ikiwiki_remember_times__63__.mdwn | 25 ++++++---------------- ...old_repository_to_new_ikiwiki_system__63__.mdwn | 4 ---- doc/plugins/write.mdwn | 7 ++++++ doc/rcs.mdwn | 8 +++++-- doc/tips/Importing_posts_from_Wordpress.mdwn | 2 +- doc/tips/inside_dot_ikiwiki/discussion.mdwn | 7 +++--- doc/todo/auto_getctime_on_fresh_build.mdwn | 8 +++++-- doc/usage.mdwn | 10 ++++----- ikiwiki.in | 3 ++- mtime-to-git | 14 ------------ 22 files changed, 109 insertions(+), 57 deletions(-) delete mode 100755 mtime-to-git (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 1730e476a..7655dada5 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -440,10 +440,10 @@ sub getsetup () { safe => 0, rebuild => 0, }, - getctime => { + gettime => { type => "internal", default => 0, - description => "running in getctime mode", + description => "running in gettime mode", safe => 0, rebuild => 0, }, @@ -1790,6 +1790,10 @@ sub rcs_getctime ($) { $hooks{rcs}{rcs_getctime}{call}->(@_); } +sub rcs_getmtime ($) { + $hooks{rcs}{rcs_getmtime}{call}->(@_); +} + sub rcs_receive () { $hooks{rcs}{rcs_receive}{call}->(); } diff --git a/IkiWiki/Plugin/bzr.pm b/IkiWiki/Plugin/bzr.pm index 0efc26b49..f79ca7c8f 100644 --- a/IkiWiki/Plugin/bzr.pm +++ b/IkiWiki/Plugin/bzr.pm @@ -20,6 +20,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -306,4 +307,8 @@ sub rcs_getctime ($) { return $ctime; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for bzr\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/cvs.pm b/IkiWiki/Plugin/cvs.pm index 26a3e9dd2..360d97249 100644 --- a/IkiWiki/Plugin/cvs.pm +++ b/IkiWiki/Plugin/cvs.pm @@ -49,6 +49,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub genwrapper () { @@ -485,4 +486,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for cvs\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/darcs.pm b/IkiWiki/Plugin/darcs.pm index bc8394b90..c1d6661d3 100644 --- a/IkiWiki/Plugin/darcs.pm +++ b/IkiWiki/Plugin/darcs.pm @@ -18,6 +18,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub silentsystem (@) { @@ -427,4 +428,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for darcs\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index b02f4a5ed..86d80186f 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -25,6 +25,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); hook(type => "rcs", id => "rcs_receive", call => \&rcs_receive); } @@ -634,6 +635,10 @@ sub rcs_getctime ($) { return $ctime; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for git\n"; # TODO +} + sub rcs_receive () { # The wiki may not be the only thing in the git repo. # Determine if it is in a subdirectory by examining the srcdir, diff --git a/IkiWiki/Plugin/mercurial.pm b/IkiWiki/Plugin/mercurial.pm index ea00a3364..34e009c7a 100644 --- a/IkiWiki/Plugin/mercurial.pm +++ b/IkiWiki/Plugin/mercurial.pm @@ -20,6 +20,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -254,4 +255,8 @@ sub rcs_getctime ($) { return $ctime; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for mercurial\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/monotone.pm b/IkiWiki/Plugin/monotone.pm index c33cf7e3a..67d4abbaa 100644 --- a/IkiWiki/Plugin/monotone.pm +++ b/IkiWiki/Plugin/monotone.pm @@ -23,6 +23,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -693,4 +694,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for monotone\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/norcs.pm b/IkiWiki/Plugin/norcs.pm index e6a05a3c5..053652a5f 100644 --- a/IkiWiki/Plugin/norcs.pm +++ b/IkiWiki/Plugin/norcs.pm @@ -18,6 +18,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub getsetup () { @@ -63,7 +64,11 @@ sub rcs_diff ($) { } sub rcs_getctime ($) { - error gettext("getctime not implemented"); + return 0; +} + +sub rcs_getmtime ($) { + return 0; } 1 diff --git a/IkiWiki/Plugin/svn.pm b/IkiWiki/Plugin/svn.pm index 7d27ec842..85c205f09 100644 --- a/IkiWiki/Plugin/svn.pm +++ b/IkiWiki/Plugin/svn.pm @@ -19,6 +19,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -379,4 +380,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for svn\n"; # TODO +} + 1 diff --git a/IkiWiki/Plugin/tla.pm b/IkiWiki/Plugin/tla.pm index 764da9b98..f5ad0cc96 100644 --- a/IkiWiki/Plugin/tla.pm +++ b/IkiWiki/Plugin/tla.pm @@ -18,6 +18,7 @@ sub import { hook(type => "rcs", id => "rcs_recentchanges", call => \&rcs_recentchanges); hook(type => "rcs", id => "rcs_diff", call => \&rcs_diff); hook(type => "rcs", id => "rcs_getctime", call => \&rcs_getctime); + hook(type => "rcs", id => "rcs_getmtime", call => \&rcs_getmtime); } sub checkconfig () { @@ -284,4 +285,8 @@ sub rcs_getctime ($) { return $date; } +sub rcs_getmtime ($) { + error "rcs_getmtime is not implemented for tla\n"; # TODO +} + 1 diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index e98888d76..e1cb68462 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -365,14 +365,26 @@ sub find_new_files ($) { } else { push @new, $file; - if ($config{getctime} && -e "$config{srcdir}/$file") { + if ($config{gettime} && -e "$config{srcdir}/$file") { eval { - my $time=rcs_getctime("$config{srcdir}/$file"); - $pagectime{$page}=$time; + my $ctime=rcs_getctime("$config{srcdir}/$file"); + if ($ctime > 0) { + $pagectime{$page}=$ctime; + } }; if ($@) { print STDERR $@; } + my $mtime; + eval { + my $mtime=rcs_getmtime("$config{srcdir}/$file"); + }; + if ($@) { + print STDERR $@; + } + elsif ($mtime > 0) { + utime($mtime, $mtime, "$config{srcdir}/$file"); + } } } $pagecase{lc $page}=$page; diff --git a/debian/changelog b/debian/changelog index 737d73655..615d5916f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -44,6 +44,11 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low * conditional: Fix bug that forced "all" mode off by default. * calendarmonth.tmpl: The month calendar is now put in a sidebar. * calendar: Improved display of arrows. + * Rename --getctime to --gettime. (The old name still works for + backwards compatability.) + * --gettime now also looks up last modification time. + * Add rcs_getmtime to plugin API; currently only implemented + for git. -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn index 6ce576db1..6b7739fd0 100644 --- a/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn +++ b/doc/forum/How_does_ikiwiki_remember_times__63__.mdwn @@ -20,15 +20,17 @@ Do I have it right? > Some VCS, like git, set the file mtimes to the current time > when making a new checkout, so they will be lost if you do that. > The creation times can be retrived using the `--getctime` option. -> I suppose it might be nice if there were a `--getmtime` that pulled -> true modification times out of the VCS, but I haven't found it a big -> deal in practice for the last modification times to be updated to the -> current time when rebuilding a wiki like this. --[[Joey]] +> --[[Joey]] > > > Thanks for the clarification. I ran some tests of my own to make sure I understand it right, and I'm satisfied > > that the order of posts in my blog can be retrieved from the VCS using the `--getctime` option, at least if I > > choose to order my posts by creation time rather than modification time. But I now know that I can't rely on > > page modification times in ikiwiki as these can be lost permanently. +> +> > > Update: It's now renamed to `--gettime`, and pulls both the creation +> > > and modification times. Also, per [[todo/auto_getctime_on_fresh_build]], +> > > this is now done automatically the first time ikiwiki builds a +> > > srcdir. So, no need to worry about this any more! --[[Joey]] > > > > I would suggest that there should at least be a `--getmtime` option like you describe, and perhaps that > > `--getctime` and `--getmtime` be _on by default_. In my opinion the creation times and modification times of @@ -91,19 +93,6 @@ Do I have it right? > A quick workaround for me to get modification times right is the following > little zsh script, which unfortunately only works for git: - #!/usr/bin/env zsh - - set +x - - for FILE in **/*(.); do - TIMES="`git log --pretty=format:%ai $FILE`" - MTIME="`echo $TIMES | head -n1`" - - if [ ! -z $MTIME ]; then - echo touch -m -d "$MTIME" $FILE - touch -m -d "$MTIME" $FILE - fi - - done +>> Elided; no longer needed since --gettime does that, and much faster! --[[Joey]] > --[[David_Riebenbauer]] diff --git a/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn b/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn index fe67e6aba..d7a33b526 100644 --- a/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn +++ b/doc/forum/Migrating_old_repository_to_new_ikiwiki_system__63__.mdwn @@ -20,10 +20,6 @@ How do I set up an ikiwiki system using a pre-existing repository (instead of cr > recreate the ikiwiki srcdir > 3. `git clone` from the bare git repository a second time, > to create a checkout you can manually edit (optional) -> 4. run `ikiwiki --getctime --setup your.setup` -> The getctime will ensure page creation times are accurate -> by putting the info out of the git history, -> and only needs to be done once. > > If you preserved your repository, but not the setup file, > the easiest way to make one is probably to run diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 707622956..cf7044b2c 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1085,6 +1085,13 @@ it up in the history. It's ok if this is not implemented, and throws an error. +#### `rcs_getmtime($)` + +This is used to get the page modification time for a file from the RCS, by +looking it up in the history. + +It's ok if this is not implemented, and throws an error. + #### `rcs_receive()` This is called when ikiwiki is running as a pre-receive hook (or diff --git a/doc/rcs.mdwn b/doc/rcs.mdwn index 4e7a8d2a6..b5bfc2414 100644 --- a/doc/rcs.mdwn +++ b/doc/rcs.mdwn @@ -14,8 +14,10 @@ use, some advanced or special features are not supported in all of them. Lack of support in [[ikiwiki-makerepo]] or auto.setup can make it harder to set up a wiki using that revision control system. The `rcs_commit_staged` hook is needed to use [[attachments|plugins/attachment]] or -[[plugins/comments]]. And so on. The table below summarises this for each -revision control system and links to more information about each. +[[plugins/comments]]. `rcs_getctime` may be implemented in a fast way +(ie, one log lookup for all files), or very slowly (one lookup per file). +And so on. The table below summarises this for each revision control +system and links to more information about each. [[!table data=""" feature |[[git]]|[[svn]]|[[bzr]] |[[monotone]]|[[mercurial]]|[[darcs]]|[[tla]] |[[cvs]] @@ -25,6 +27,8 @@ auto.setup |yes |yes |incomplete|yes |incomplete |yes `rcs_rename` |yes |yes |yes |yes |no |yes |no |yes `rcs_remove` |yes |yes |yes |yes |no |yes |no |yes `rcs_diff` |yes |yes |yes |yes |no |yes |yes |yes +`rcs_getctime` |fast |slow |slow |slow |slow |slow |slow |slow +`rcs_getmtime` |fast |no |no |no |no |no |no |no anonymous push |yes |no |no |no |no |no |no |no conflict handling |yes |yes |yes |buggy |yes |yes |yes |yes """]] diff --git a/doc/tips/Importing_posts_from_Wordpress.mdwn b/doc/tips/Importing_posts_from_Wordpress.mdwn index 59330caa4..8774c9723 100644 --- a/doc/tips/Importing_posts_from_Wordpress.mdwn +++ b/doc/tips/Importing_posts_from_Wordpress.mdwn @@ -1,6 +1,6 @@ Use case: You want to move away from Wordpress to Ikiwiki as your blogging/website platform, but you want to retain your old posts. -[This](http://git.chris-lamb.co.uk/?p=ikiwiki-wordpress-import.git) is a simple tool that generates [git-fast-import](http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html)-compatible data from a WordPress export XML file. It retains creation time of each post, so you can use Ikiwiki's --getctime to get the preserve creation times on checkout. +[This](http://git.chris-lamb.co.uk/?p=ikiwiki-wordpress-import.git) is a simple tool that generates [git-fast-import](http://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html)-compatible data from a WordPress export XML file. It retains creation time of each post, so you can use Ikiwiki's --gettime to get the preserve creation times on checkout. WordPress categories are mapped onto Ikiwiki tags. The ability to import comments is planned. diff --git a/doc/tips/inside_dot_ikiwiki/discussion.mdwn b/doc/tips/inside_dot_ikiwiki/discussion.mdwn index 34d5b9252..69df369ec 100644 --- a/doc/tips/inside_dot_ikiwiki/discussion.mdwn +++ b/doc/tips/inside_dot_ikiwiki/discussion.mdwn @@ -6,14 +6,15 @@ My database appears corrupted: No idea how this happened. I've blown it away and recreated it but, for future reference, is there any less violent way to recover from this situation? I miss having the correct created and last edited times. --[[sabr]] > update: fixed ctimes and mtimes using [these instructions](http://u32.net/Mediawiki_Conversion/Git_Import/#Correct%20Creation%20and%20Last%20Edited%20time) --[[sabr]] -> That's overly complex. Just run `ikiwiki -setup your.setup -getctime`. +> That's overly complex. Just run `ikiwiki -setup your.setup -gettime`. > BTW, I'd be interested in examining such a corrupt storable file to try > to see what happened to it. --[[Joey]] ->> --getctime appears to only set the last edited date. It's not supposed to set the creation date, is it? The only place that info is stored is in the git repo. +>> --gettime appears to only set the last edited date. It's not supposed to set the creation date, is it? The only place that info is stored is in the git repo. >>> Pulling the page creation date out of the git history is exactly what ->>> --getctime does. --[[Joey]] +>>> --gettime does. (It used to be called --getctime, and only do that; now +>>> it also pulls out the last modified date). --[[Joey]] >> Alas, I seem to have lost the bad index file to periodic /tmp wiping; I'll send it to you if it happens again. --[[sabr]] diff --git a/doc/todo/auto_getctime_on_fresh_build.mdwn b/doc/todo/auto_getctime_on_fresh_build.mdwn index ea95fb8c9..760c56fa1 100644 --- a/doc/todo/auto_getctime_on_fresh_build.mdwn +++ b/doc/todo/auto_getctime_on_fresh_build.mdwn @@ -1,9 +1,13 @@ [[!tag wishlist]] -It might be a good idea to enable --getctime when `.ikiwiki` does not +It might be a good idea to enable --gettime when `.ikiwiki` does not exist. This way a new checkout of a `srcdir` would automatically get -ctimes right. (Running --getctime whenever a rebuild is done would be too +ctimes right. (Running --gettime whenever a rebuild is done would be too slow.) --[[Joey]] Could this be too annoying in some cases, eg, checking out a large wiki that needs to get set up right away? --[[Joey]] + +> Not for git with the new, optimised --getctime. For other VCS.. well, +> pity they're not as fast as git ;), but it is a one-time expense... +> [[done]] --[[Joey]] diff --git a/doc/usage.mdwn b/doc/usage.mdwn index db1e36a10..553fef01e 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -320,13 +320,11 @@ also be configured using a setup file. intercepted. If you enable this option then you must run at least the CGI portion of ikiwiki over SSL. -* --getctime +* --gettime - Pull creation time for each new page out of the revision control - system. This rarely used option provides a way to get the real creation - times of items in weblogs, such as when building a wiki from a new - VCS checkout. It is unoptimised and quite slow. It is best used - with --rebuild, to force ikiwiki to get the ctime for all pages. + Extract creation and modification times for each new page from the + the revision control's log. This is done automatically when building a + wiki for the first time, so you normally do not need to use this option. * --set var=value diff --git a/ikiwiki.in b/ikiwiki.in index 38e4d3201..801ff9a0b 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -44,7 +44,8 @@ sub getconfig () { "wrappergroup=s" => \$config{wrappergroup}, "usedirs!" => \$config{usedirs}, "prefix-directives!" => \$config{prefix_directives}, - "getctime" => \$config{getctime}, + "getctime" => \$config{gettime}, + "gettime" => \$config{gettime}, "numbacklinks=i" => \$config{numbacklinks}, "rcs=s" => \$config{rcs}, "no-rcs" => sub { $config{rcs}="" }, diff --git a/mtime-to-git b/mtime-to-git deleted file mode 100755 index 9875af5d7..000000000 --- a/mtime-to-git +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -# Sets mtimes of all files in the tree their last change date -# based on git's log. Useful to avoid too new dates after a -# fresh checkout, which lead to ikiwiki unnecessarily rebuilding -# basewiki files on upgrade. -if [ -d .git ]; then - for file in $(git ls-files); do - date="$(git log -1 --date=rfc "$file" | grep ^Date: | sed -e 's/Date://')" - if [ -n "$date" ]; then - echo "$date $file" - touch -d"$date" $file - fi - done -fi -- cgit v1.2.3 From dee2940c0bc97080088c99f399cd0ff0df3bec23 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 16 Apr 2010 18:29:45 -0400 Subject: automatically run --gettime, and optimise it for git * Automatically run --gettime the first time ikiwiki is run on a given srcdir. * Optimise --gettime for git, so it's appropriatly screamingly fast. (This could be done for other backends too.) * However, --gettime for git no longer follows renames. * Use above to fix up timestamps on docwiki, as well as ensure that timestamps on basewiki files shipped in the deb are sane. --- IkiWiki.pm | 2 +- IkiWiki/Plugin/git.pm | 48 ++++++++++++++++++++++++++++++++++++------------ IkiWiki/Render.pm | 11 +++++++++-- debian/changelog | 7 +++++++ debian/control | 2 +- doc/plugins/write.mdwn | 4 ++++ doc/usage.mdwn | 2 +- docwiki.setup | 17 ++++++++++++++++- ikiwiki.in | 2 +- 9 files changed, 76 insertions(+), 19 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 7655dada5..b37b1f344 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -442,7 +442,6 @@ sub getsetup () { }, gettime => { type => "internal", - default => 0, description => "running in gettime mode", safe => 0, rebuild => 0, @@ -1512,6 +1511,7 @@ sub loadindex () { open ($in, "<", "$config{wikistatedir}/indexdb") || return; } else { + $config{gettime}=1; # first build return; } } diff --git a/IkiWiki/Plugin/git.pm b/IkiWiki/Plugin/git.pm index 86d80186f..aa402c04f 100644 --- a/IkiWiki/Plugin/git.pm +++ b/IkiWiki/Plugin/git.pm @@ -616,27 +616,51 @@ sub rcs_diff ($) { } } -sub rcs_getctime ($) { +{ +my %time_cache; + +sub findtimes ($$) { my $file=shift; + my $id=shift; # 0 = mtime ; 1 = ctime + # Remove srcdir prefix $file =~ s/^\Q$config{srcdir}\E\/?//; - my @raw_lines = run_or_die('git', 'log', - '--follow', '--no-merges', - '--pretty=raw', '--raw', '--abbrev=40', '--always', '-c', - '-r', '--', $file); - my @ci; - while (my $parsed = parse_diff_tree("", \@raw_lines)) { - push @ci, $parsed; + if (! keys %time_cache) { + my $date; + foreach my $line (run_or_die('git', 'log', + '--pretty=format:%ct', + '--name-only', '--relative')) { + if (! defined $date && $line =~ /^(\d+)$/) { + $date=$line; + } + elsif (! length $line) { + $date=undef; + } + else { + if (! $time_cache{$line}) { + $time_cache{$line}[0]=$date; # mtime + } + $time_cache{$line}[1]=$date; # ctime + } + } } - my $ctime = $ci[$#ci]->{'author_epoch'}; - debug("ctime for '$file': ". localtime($ctime)); - return $ctime; + return exists $time_cache{$file} ? $time_cache{$file}[$id] : 0; +} + +} + +sub rcs_getctime ($) { + my $file=shift; + + return findtimes($file, 1); } sub rcs_getmtime ($) { - error "rcs_getmtime is not implemented for git\n"; # TODO + my $file=shift; + + return findtimes($file, 0); } sub rcs_receive () { diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index e1cb68462..a6b0f0617 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -352,6 +352,8 @@ sub find_new_files ($) { my @new; my @internal_new; + my $times_noted; + foreach my $file (@$files) { my $page=pagename($file); if (exists $pagesources{$page} && $pagesources{$page} ne $file) { @@ -363,7 +365,12 @@ sub find_new_files ($) { if (isinternal($page)) { push @internal_new, $file; } - else { + elsif ($config{rcs}) { + if (! $times_noted) { + debug(sprintf(gettext("querying %s for file creation and modification times.."), $config{rcs})); + $times_noted=1; + } + push @new, $file; if ($config{gettime} && -e "$config{srcdir}/$file") { eval { @@ -377,7 +384,7 @@ sub find_new_files ($) { } my $mtime; eval { - my $mtime=rcs_getmtime("$config{srcdir}/$file"); + $mtime=rcs_getmtime("$config{srcdir}/$file"); }; if ($@) { print STDERR $@; diff --git a/debian/changelog b/debian/changelog index 615d5916f..60a67cbe3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -47,8 +47,15 @@ ikiwiki (3.20100415) UNRELEASED; urgency=low * Rename --getctime to --gettime. (The old name still works for backwards compatability.) * --gettime now also looks up last modification time. + * Automatically run --gettime the first time ikiwiki is run on + a given srcdir. * Add rcs_getmtime to plugin API; currently only implemented for git. + * Optimise --gettime for git, so it's appropriatly screamingly + fast. (This could be done for other backends too.) + * However, --gettime for git no longer follows renames. + * Use above to fix up timestamps on docwiki, as well as ensure that + timestamps on basewiki files shipped in the deb are sane. -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/debian/control b/debian/control index 87f7d8209..ae06f32b0 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Build-Depends-Indep: dpkg-dev (>= 1.9.0), libxml-simple-perl, libtimedate-perl, libhtml-template-perl, libhtml-scrubber-perl, wdg-html-validator, libhtml-parser-perl, liburi-perl, perlmagick, po4a (>= 0.34), - libfile-chdir-perl + libfile-chdir-perl, Maintainer: Joey Hess Uploaders: Josh Triplett Standards-Version: 3.8.4 diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index cf7044b2c..0bf6fcf48 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -1085,6 +1085,8 @@ it up in the history. It's ok if this is not implemented, and throws an error. +If the RCS cannot determine a ctime for the file, return 0. + #### `rcs_getmtime($)` This is used to get the page modification time for a file from the RCS, by @@ -1092,6 +1094,8 @@ looking it up in the history. It's ok if this is not implemented, and throws an error. +If the RCS cannot determine a mtime for the file, return 0. + #### `rcs_receive()` This is called when ikiwiki is running as a pre-receive hook (or diff --git a/doc/usage.mdwn b/doc/usage.mdwn index 553fef01e..2e12517ea 100644 --- a/doc/usage.mdwn +++ b/doc/usage.mdwn @@ -320,7 +320,7 @@ also be configured using a setup file. intercepted. If you enable this option then you must run at least the CGI portion of ikiwiki over SSL. -* --gettime +* --gettime, --no-gettime Extract creation and modification times for each new page from the the revision control's log. This is done automatically when building a diff --git a/docwiki.setup b/docwiki.setup index 8278b73ea..6bc200066 100644 --- a/docwiki.setup +++ b/docwiki.setup @@ -1,6 +1,18 @@ #!/usr/bin/perl # Configuration file for ikiwiki to build its documentation wiki. +# Use git during the build, if it's available and if we're building +# from a git checkout. This ensures ikiwiki gets the right mtimes and +# ctimes for files in the doc wiki. +our $rcs="norcs"; +BEGIN { + my $git=`which git 2>&1`; + chomp $git; + if (-x $git && -d ".git") { + $rcs="git"; + } +} + use IkiWiki::Setup::Standard { wikiname => "ikiwiki", srcdir => "doc", @@ -9,7 +21,7 @@ use IkiWiki::Setup::Standard { underlaydirbase => "underlays", underlaydir => "underlays/basewiki", discussion => 0, - exclude => qr/\/discussion|bugs\/*|todo\/*|forum\/*/, + exclude => qr/\/discussion|bugs\/*|todo\/*|forum\/*/, # save space locale => '', verbose => 1, syslog => 0, @@ -17,4 +29,7 @@ use IkiWiki::Setup::Standard { usedirs => 0, prefix_directives => 1, add_plugins => [qw{goodstuff version haiku polygen fortune table}], + disable_plugins => [qw{recentchanges}], # not appropriate for doc dir + rcs => $rcs, + gitorigin_branch => '', # don't pull during build } diff --git a/ikiwiki.in b/ikiwiki.in index 801ff9a0b..acd37f802 100755 --- a/ikiwiki.in +++ b/ikiwiki.in @@ -45,7 +45,7 @@ sub getconfig () { "usedirs!" => \$config{usedirs}, "prefix-directives!" => \$config{prefix_directives}, "getctime" => \$config{gettime}, - "gettime" => \$config{gettime}, + "gettime!" => \$config{gettime}, "numbacklinks=i" => \$config{numbacklinks}, "rcs=s" => \$config{rcs}, "no-rcs" => sub { $config{rcs}="" }, -- cgit v1.2.3 From 2269a4c74b24378d8e7e2229ca3374a197d08d9c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 17 Apr 2010 12:54:22 -0400 Subject: whitespace --- IkiWiki.pm | 24 ++++++++++++------------ IkiWiki/Render.pm | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 2f26a16ce..3812961dc 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -12,20 +12,20 @@ use Storable; use open qw{:utf8 :std}; use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase - %pagestate %wikistate %renderedfiles %oldrenderedfiles - %pagesources %destsources %depends %depends_simple %hooks - %forcerebuild %loaded_plugins %typedlinks %oldtypedlinks - %autofiles %del_hash}; + %pagestate %wikistate %renderedfiles %oldrenderedfiles + %pagesources %destsources %depends %depends_simple %hooks + %forcerebuild %loaded_plugins %typedlinks %oldtypedlinks + %autofiles %del_hash}; use Exporter q{import}; our @EXPORT = qw(hook debug error template htmlpage deptype - add_depends pagespec_match pagespec_match_list bestlink - htmllink readfile writefile pagetype srcfile pagename - displaytime will_render gettext ngettext urlto targetpage - add_underlay pagetitle titlepage linkpage newpagefile - inject add_link add_autofile - %config %links %pagestate %wikistate %renderedfiles - %pagesources %destsources %typedlinks); + add_depends pagespec_match pagespec_match_list bestlink + htmllink readfile writefile pagetype srcfile pagename + displaytime will_render gettext ngettext urlto targetpage + add_underlay pagetitle titlepage linkpage newpagefile + inject add_link add_autofile + %config %links %pagestate %wikistate %renderedfiles + %pagesources %destsources %typedlinks); our $VERSION = 3.00; # plugin interface version, next is ikiwiki version our $version='unknown'; # VERSION_AUTOREPLACE done by Makefile, DNE our $installdir='/usr'; # INSTALLDIR_AUTOREPLACE done by Makefile, DNE @@ -1891,7 +1891,7 @@ sub define_gettext () { return shift; } }; - *ngettext=sub { + *ngettext=sub { $getobj->() if $getobj; if ($gettext_obj) { $gettext_obj->nget(@_); diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 796af6af2..c80030deb 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -43,7 +43,7 @@ sub backlinks ($) { my @links; foreach my $p (backlink_pages($page)) { my $href=urlto($p, $page); - + # Trim common dir prefixes from both pages. my $p_trimmed=$p; my $page_trimmed=$page; -- cgit v1.2.3 From b7d50abc0f3dbe99d2a3664c12ea95d24bfcf04b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 17 Apr 2010 13:35:15 -0400 Subject: refactor autofiles Made add_autofile take a generator function, and just register the autofile, for later possible creation. The testing is moved into Render, which allows cleaning up some stuff. --- IkiWiki.pm | 35 ++++++++++------------------------ IkiWiki/Plugin/tag.pm | 12 ++++++------ IkiWiki/Render.pm | 52 +++++++++++++++++++++++++++++++++++++-------------- 3 files changed, 54 insertions(+), 45 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 3812961dc..c22c75df8 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -15,7 +15,7 @@ use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %pagestate %wikistate %renderedfiles %oldrenderedfiles %pagesources %destsources %depends %depends_simple %hooks %forcerebuild %loaded_plugins %typedlinks %oldtypedlinks - %autofiles %del_hash}; + %autofiles}; use Exporter q{import}; our @EXPORT = qw(hook debug error template htmlpage deptype @@ -1956,6 +1956,15 @@ sub add_link ($$;$) { } } +sub add_autofile ($$$) { + my $file=shift; + my $plugin=shift; + my $generator=shift; + + $autofiles{$file}{plugin}=$plugin; + $autofiles{$file}{generator}=$generator; +} + sub sortspec_translate ($$) { my $spec = shift; my $reverse = shift; @@ -2021,30 +2030,6 @@ sub sortspec_translate ($$) { return eval 'sub { '.$code.' }'; } -sub add_autofile ($$) { - my $autofile=shift; - my $plugin=shift; - - if (srcfile($autofile, 1)) { - return 0; - } - - my ($file, $page) = verify_src_file("$config{srcdir}/$autofile", $config{srcdir}); - - if ((!defined $file) || - (exists $pagestate{$page}{$plugin}{autofile_deleted})) { - return 0; - } - - if (exists $del_hash{$file}) { - $pagestate{$page}{$plugin}{autofile_deleted}=1; - return 0; - } - - $autofiles{$file}=$plugin; - return 1; -} - sub pagespec_translate ($) { my $spec=shift; diff --git a/IkiWiki/Plugin/tag.pm b/IkiWiki/Plugin/tag.pm index 9e6f417bf..7a918a4e8 100644 --- a/IkiWiki/Plugin/tag.pm +++ b/IkiWiki/Plugin/tag.pm @@ -70,13 +70,13 @@ sub gentag ($) { my $tagfile = newpagefile(tagpage($tag), $config{default_pageext}); $tagfile=~s/^\///; - return if (! add_autofile($tagfile, "tag")); + add_autofile($tagfile, sub { + debug(sprintf(gettext("creating tag page %s"), $tag)); - debug(sprintf(gettext("creating tag page %s"), $tag)); - - my $template=template("autotag.tmpl"); - $template->param(tag => $tag); - writefile($tagfile, $config{srcdir}, $template->output); + my $template=template("autotag.tmpl"); + $template->param(tag => $tag); + writefile($tagfile, $config{srcdir}, $template->output); + }); } } diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index c80030deb..83242a197 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -680,6 +680,37 @@ sub render_backlinks ($) { } } +sub gen_autofile ($$$) { + my $autofile=shift; + my $pages=shift; + my $del=shift; + + if (srcfile($autofile, 1)) { + return 0; + } + + my ($file, $page) = verify_src_file("$config{srcdir}/$autofile", $config{srcdir}); + + if ((!defined $file) || + (exists $wikistate{$autofiles{$autofile}{plugin}}{autofile_deleted})) { + return 0; + } + + if ($pages->{$page}) { + return 0; + } + + if (grep { $_ eq $file } @$del) { + $wikistate{$autofiles{$autofile}{generator}}{autofile_deleted}=1; + return 0; + } + + $autofiles{$autofile}{generator}->(); + $pages->{$page}=1; + return 1; +} + + sub refresh () { srcdir_check(); run_hooks(refresh => sub { shift->() }); @@ -689,26 +720,19 @@ sub refresh () { my ($changed, $internal_changed)=find_changed($files); run_hooks(needsbuild => sub { shift->($changed) }); my $oldlink_targets=calculate_old_links($changed, $del); - %del_hash = map { $_ => 1 } @{$del}; foreach my $file (@$changed) { scan($file); } - while (my $autofile = shift @{[keys %autofiles]}) { - my $plugin=$autofiles{$autofile}; - my $page=pagename($autofile); - if ($pages->{$page}) { - debug(sprintf(gettext("%s has multiple possible source pages"), $page)); + foreach my $autofile (keys %autofiles) { + if (gen_autofile($autofile, $pages, $del)) { + push @{$files}, $autofile; + push @{$new}, $autofile if find_new_files([$autofile]); + push @{$changed}, $autofile if find_changed([$autofile]); + + scan($autofile); } - $pages->{$page}=1; - - push @{$files}, $autofile; - push @{$new}, $autofile if find_new_files([$autofile]); - push @{$changed}, $autofile if find_changed([$autofile]); - - scan($autofile); - delete $autofiles{$autofile}; } calculate_links(); -- cgit v1.2.3 From a97964688b73d0a3237c798dce3fb064ff29ff11 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 17 Apr 2010 19:05:40 -0400 Subject: unfinished file_prune revamp Many calls to file_prune were incorrectly calling it with 2 parameters. In cases where the filename being checked is relative to the srcdir, that is not needed. Made absolute filenames be pruned. (This won't work for the 2 parameter call style.) --- IkiWiki.pm | 2 +- IkiWiki/Plugin/attachment.pm | 2 +- IkiWiki/Plugin/comments.pm | 4 ++-- IkiWiki/Plugin/editpage.pm | 4 ++-- IkiWiki/Plugin/rename.pm | 5 ++--- IkiWiki/Receive.pm | 2 +- t/file_pruned.t | 40 +++++++++++++++++++++++++++++++++++++--- 7 files changed, 46 insertions(+), 13 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index b37b1f344..a5f83ac7a 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -355,7 +355,7 @@ sub getsetup () { }, wiki_file_prune_regexps => { type => "internal", - default => [qr/(^|\/)\.\.(\/|$)/, qr/^\./, qr/\/\./, + default => [qr/(^|\/)\.\.(\/|$)/, qr/^\//, qr/^\./, qr/\/\./, qr/\.x?html?$/, qr/\.ikiwiki-new$/, qr/(^|\/).svn\//, qr/.arch-ids\//, qr/{arch}\//, qr/(^|\/)_MTN\//, qr/(^|\/)_darcs\//, diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index ad1dd9bca..8c3ff887a 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -137,7 +137,7 @@ sub formbuilder (@) { $filename=linkpage(IkiWiki::possibly_foolish_untaint( attachment_location($form->field('page')). IkiWiki::basename($filename))); - if (IkiWiki::file_pruned($filename, $config{srcdir})) { + if (IkiWiki::file_pruned($filename)) { error(gettext("bad attachment filename")); } diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 0aa043215..1c219b6c6 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -338,7 +338,7 @@ sub editcomment ($$) { my $page = $form->field('page'); $page = IkiWiki::possibly_foolish_untaint($page); if (! defined $page || ! length $page || - IkiWiki::file_pruned($page, $config{srcdir})) { + IkiWiki::file_pruned($page)) { error(gettext("bad page name")); } @@ -548,7 +548,7 @@ sub commentmoderation ($$) { # pending comment before untainting. my ($f)= $id =~ /$config{wiki_file_regexp}/; if (! defined $f || ! length $f || - IkiWiki::file_pruned($f, $config{srcdir})) { + IkiWiki::file_pruned($f)) { error("illegal file"); } diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index 44fe5514a..ee1de8eaa 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -94,7 +94,7 @@ sub cgi_editpage ($$) { $page=possibly_foolish_untaint($page); my $absolute=($page =~ s#^/+##); if (! defined $page || ! length $page || - file_pruned($page, $config{srcdir})) { + file_pruned($page)) { error(gettext("bad page name")); } @@ -220,7 +220,7 @@ sub cgi_editpage ($$) { my $best_loc; if (! defined $from || ! length $from || $from ne $form->field('from') || - file_pruned($from, $config{srcdir}) || + file_pruned($from) || $from=~/^\// || $absolute || $form->submitted) { diff --git a/IkiWiki/Plugin/rename.pm b/IkiWiki/Plugin/rename.pm index 1a9da6363..69e615ead 100644 --- a/IkiWiki/Plugin/rename.pm +++ b/IkiWiki/Plugin/rename.pm @@ -63,9 +63,8 @@ sub check_canrename ($$$$$$) { error(gettext("no change to the file name was specified")); } - # Must be a legal filename, and not absolute. - if (IkiWiki::file_pruned($destfile, $config{srcdir}) || - $destfile=~/^\//) { + # Must be a legal filename. + if (IkiWiki::file_pruned($destfile)) { error(sprintf(gettext("illegal name"))); } diff --git a/IkiWiki/Receive.pm b/IkiWiki/Receive.pm index cd94d0938..ae1bd8bef 100644 --- a/IkiWiki/Receive.pm +++ b/IkiWiki/Receive.pm @@ -82,7 +82,7 @@ sub test () { my ($file)=$change->{file}=~/$config{wiki_file_regexp}/; $file=IkiWiki::possibly_foolish_untaint($file); if (! defined $file || ! length $file || - IkiWiki::file_pruned($file, $config{srcdir})) { + IkiWiki::file_pruned($file)) { error(gettext("bad file name %s"), $file); } diff --git a/t/file_pruned.t b/t/file_pruned.t index f9c1c257e..4335ed917 100755 --- a/t/file_pruned.t +++ b/t/file_pruned.t @@ -1,41 +1,75 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 27; +use Test::More tests => 54; BEGIN { use_ok("IkiWiki"); } %config=IkiWiki::defaultconfig(); ok(IkiWiki::file_pruned("src/.htaccess", "src")); +ok(IkiWiki::file_pruned(".htaccess")); ok(IkiWiki::file_pruned("src/.ikiwiki/", "src")); +ok(IkiWiki::file_pruned(".ikiwiki/")); ok(IkiWiki::file_pruned("src/.ikiwiki/index", "src")); +ok(IkiWiki::file_pruned(".ikiwiki/index")); ok(IkiWiki::file_pruned("src/CVS/foo", "src")); +ok(IkiWiki::file_pruned("CVS/foo")); ok(IkiWiki::file_pruned("src/subdir/CVS/foo", "src")); +ok(IkiWiki::file_pruned("subdir/CVS/foo")); ok(IkiWiki::file_pruned("src/.svn", "src")); +ok(IkiWiki::file_pruned(".svn")); ok(IkiWiki::file_pruned("src/subdir/.svn", "src")); +ok(IkiWiki::file_pruned("subdir/.svn")); ok(IkiWiki::file_pruned("src/subdir/.svn/foo", "src")); +ok(IkiWiki::file_pruned("subdir/.svn/foo")); ok(IkiWiki::file_pruned("src/.git", "src")); +ok(IkiWiki::file_pruned(".git")); ok(IkiWiki::file_pruned("src/subdir/.git", "src")); +ok(IkiWiki::file_pruned("subdir/.git")); ok(IkiWiki::file_pruned("src/subdir/.git/foo", "src")); +ok(IkiWiki::file_pruned("subdir/.git/foo")); ok(! IkiWiki::file_pruned("src/svn/fo", "src")); +ok(! IkiWiki::file_pruned("svn/fo")); ok(! IkiWiki::file_pruned("src/git", "src")); +ok(! IkiWiki::file_pruned("git")); ok(! IkiWiki::file_pruned("src/index.mdwn", "src")); +ok(! IkiWiki::file_pruned("index.mdwn")); ok(! IkiWiki::file_pruned("src/index.", "src")); +ok(! IkiWiki::file_pruned("index.")); # these are ok because while the filename starts with ".", the canonpathed # version does not ok(! IkiWiki::file_pruned("src/.", "src")); ok(! IkiWiki::file_pruned("src/./", "src")); +# OTOH, without a srcdir, no canonpath, so they're not allowed. +ok(IkiWiki::file_pruned(".")); +ok(IkiWiki::file_pruned("./")); + +# Without a srcdir, absolute filenames are not allowed. +ok(IkiWiki::file_pruned("/etc/passwd")); +ok(IkiWiki::file_pruned("//etc/passwd")); +ok(IkiWiki::file_pruned("/")); +ok(IkiWiki::file_pruned("//")); +ok(IkiWiki::file_pruned("///")); + ok(IkiWiki::file_pruned("src/..", "src")); +ok(IkiWiki::file_pruned("..")); ok(IkiWiki::file_pruned("src/../", "src")); +ok(IkiWiki::file_pruned("../")); ok(IkiWiki::file_pruned("src/../", "src")); +ok(IkiWiki::file_pruned("../")); +# This is perhaps counterintuitive. ok(! IkiWiki::file_pruned("src", "src")); + +# Dots, etc, in the srcdir are ok. ok(! IkiWiki::file_pruned("/.foo/src", "/.foo/src")); ok(IkiWiki::file_pruned("/.foo/src/.foo/src", "/.foo/src")); ok(! IkiWiki::file_pruned("/.foo/src/index.mdwn", "/.foo/src/index.mdwn")); -ok(IkiWiki::file_pruned("x/y/foo.dpkg-tmp", "src")); -ok(IkiWiki::file_pruned("x/y/foo.ikiwiki-new", "src")); +ok(IkiWiki::file_pruned("src/y/foo.dpkg-tmp", "src")); +ok(IkiWiki::file_pruned("y/foo.dpkg-tmp")); +ok(IkiWiki::file_pruned("src/y/foo.ikiwiki-new", "src")); +ok(IkiWiki::file_pruned("y/foo.ikiwiki-new")); -- cgit v1.2.3 From cff3937b681a6c2505eb52b43b2e3e7086f99c45 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 20 Apr 2010 14:08:29 -0400 Subject: remove 2 argument form of file_pruned --- IkiWiki.pm | 9 +-------- t/file_pruned.t | 39 ++------------------------------------- 2 files changed, 3 insertions(+), 45 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index a5f83ac7a..6d3b6c606 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1843,15 +1843,8 @@ sub deptype (@) { } my $file_prune_regexp; -sub file_pruned ($;$) { +sub file_pruned ($) { my $file=shift; - if (@_) { - require File::Spec; - $file=File::Spec->canonpath($file); - my $base=File::Spec->canonpath(shift); - return if $file eq $base; - $file =~ s#^\Q$base\E/+##; - } if (defined $config{include} && length $config{include}) { return 0 if $file =~ m/$config{include}/; diff --git a/t/file_pruned.t b/t/file_pruned.t index 4335ed917..34f366610 100755 --- a/t/file_pruned.t +++ b/t/file_pruned.t @@ -1,52 +1,31 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 54; +use Test::More tests => 27; BEGIN { use_ok("IkiWiki"); } %config=IkiWiki::defaultconfig(); -ok(IkiWiki::file_pruned("src/.htaccess", "src")); ok(IkiWiki::file_pruned(".htaccess")); -ok(IkiWiki::file_pruned("src/.ikiwiki/", "src")); ok(IkiWiki::file_pruned(".ikiwiki/")); -ok(IkiWiki::file_pruned("src/.ikiwiki/index", "src")); ok(IkiWiki::file_pruned(".ikiwiki/index")); -ok(IkiWiki::file_pruned("src/CVS/foo", "src")); ok(IkiWiki::file_pruned("CVS/foo")); -ok(IkiWiki::file_pruned("src/subdir/CVS/foo", "src")); ok(IkiWiki::file_pruned("subdir/CVS/foo")); -ok(IkiWiki::file_pruned("src/.svn", "src")); ok(IkiWiki::file_pruned(".svn")); -ok(IkiWiki::file_pruned("src/subdir/.svn", "src")); ok(IkiWiki::file_pruned("subdir/.svn")); -ok(IkiWiki::file_pruned("src/subdir/.svn/foo", "src")); ok(IkiWiki::file_pruned("subdir/.svn/foo")); -ok(IkiWiki::file_pruned("src/.git", "src")); ok(IkiWiki::file_pruned(".git")); -ok(IkiWiki::file_pruned("src/subdir/.git", "src")); ok(IkiWiki::file_pruned("subdir/.git")); -ok(IkiWiki::file_pruned("src/subdir/.git/foo", "src")); ok(IkiWiki::file_pruned("subdir/.git/foo")); -ok(! IkiWiki::file_pruned("src/svn/fo", "src")); ok(! IkiWiki::file_pruned("svn/fo")); -ok(! IkiWiki::file_pruned("src/git", "src")); ok(! IkiWiki::file_pruned("git")); -ok(! IkiWiki::file_pruned("src/index.mdwn", "src")); ok(! IkiWiki::file_pruned("index.mdwn")); -ok(! IkiWiki::file_pruned("src/index.", "src")); ok(! IkiWiki::file_pruned("index.")); - -# these are ok because while the filename starts with ".", the canonpathed -# version does not -ok(! IkiWiki::file_pruned("src/.", "src")); -ok(! IkiWiki::file_pruned("src/./", "src")); -# OTOH, without a srcdir, no canonpath, so they're not allowed. ok(IkiWiki::file_pruned(".")); ok(IkiWiki::file_pruned("./")); -# Without a srcdir, absolute filenames are not allowed. +# absolute filenames are not allowed. ok(IkiWiki::file_pruned("/etc/passwd")); ok(IkiWiki::file_pruned("//etc/passwd")); ok(IkiWiki::file_pruned("/")); @@ -54,22 +33,8 @@ ok(IkiWiki::file_pruned("//")); ok(IkiWiki::file_pruned("///")); -ok(IkiWiki::file_pruned("src/..", "src")); ok(IkiWiki::file_pruned("..")); -ok(IkiWiki::file_pruned("src/../", "src")); -ok(IkiWiki::file_pruned("../")); -ok(IkiWiki::file_pruned("src/../", "src")); ok(IkiWiki::file_pruned("../")); -# This is perhaps counterintuitive. -ok(! IkiWiki::file_pruned("src", "src")); - -# Dots, etc, in the srcdir are ok. -ok(! IkiWiki::file_pruned("/.foo/src", "/.foo/src")); -ok(IkiWiki::file_pruned("/.foo/src/.foo/src", "/.foo/src")); -ok(! IkiWiki::file_pruned("/.foo/src/index.mdwn", "/.foo/src/index.mdwn")); - -ok(IkiWiki::file_pruned("src/y/foo.dpkg-tmp", "src")); ok(IkiWiki::file_pruned("y/foo.dpkg-tmp")); -ok(IkiWiki::file_pruned("src/y/foo.ikiwiki-new", "src")); ok(IkiWiki::file_pruned("y/foo.ikiwiki-new")); -- cgit v1.2.3 From 0fa25a361cbb49711938599d6cf06201ce0cc79a Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Wed, 21 Apr 2010 00:16:32 +0200 Subject: Always give createlink class to links to nonexistent pages With this change, the with class createlink is always created around the link text, even when no CGI URL is defined. This allows styling of these 'links' in this case too. The same class is used as when CGI URL is defined so that e.g. clones of the same ikiwiki, one with CGI and one without, display in the same way (modulo the missing question mark link). (cherry picked from commit 290d1b498f00f63e6d41218ddb76d87e68ed5081) --- IkiWiki.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 6d3b6c606..ba2c09c36 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1086,14 +1086,16 @@ sub htmllink ($$$;@) { $bestlink=htmlpage($bestlink); if (! $destsources{$bestlink}) { - return $linktext unless length $config{cgiurl}; - return " "create", page => lc($link), from => $lpage - ). - "\" rel=\"nofollow\">?$linktext" + )."\" rel=\"nofollow\">?"; + } + return "$cgilink$linktext" } } -- cgit v1.2.3 From d6810097ce7e51989573db4052a636647d7bbbd7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 21 Apr 2010 12:50:34 -0400 Subject: layout --- IkiWiki.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index ba2c09c36..4084d4997 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1089,11 +1089,11 @@ sub htmllink ($$$;@) { my $cgilink = ""; if (length $config{cgiurl}) { $cgilink = " "create", - page => lc($link), - from => $lpage - )."\" rel=\"nofollow\">?"; + cgiurl( + do => "create", + page => lc($link), + from => $lpage + )."\" rel=\"nofollow\">?"; } return "$cgilink$linktext" } -- cgit v1.2.3 From 673d6c958050b7ce07d5d8512d5370f9531225cd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 21 Apr 2010 19:45:56 -0400 Subject: add missing undef guard in derel --- IkiWiki.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 4084d4997..8af290745 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2245,7 +2245,7 @@ sub derel ($$) { if ($path =~ m!^\./!) { $from=~s#/?[^/]+$## if defined $from; $path=~s#^\./##; - $path="$from/$path" if length $from; + $path="$from/$path" if defined $from && length $from; } return $path; -- cgit v1.2.3 From 32dd388f8dbb1f52a46c40a2e0b9a00eca43f40e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 21 Apr 2010 21:38:53 -0400 Subject: indent --- IkiWiki.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 8af290745..0791e1e75 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2221,7 +2221,7 @@ sub merge_influences { my $anded=shift; if (! $anded || (($this || %{$this->[1]}) && - ($other || %{$other->[1]}))) { + ($other || %{$other->[1]}))) { foreach my $influence (keys %{$other->[1]}) { $this->[1]{$influence} |= $other->[1]{$influence}; } -- cgit v1.2.3 From 2b175d7c1fe997277800c0d501332e96de475c6d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Apr 2010 00:12:15 -0400 Subject: improved fix for depends_simple_mixup Avoid adding the page matched against as an influence for currently failing pagespec matches, while still adding any other influences. This avoids bloating depends_simple with lots of bogus influences when matching eg, "!link(done)". It's only necessary for the page being tested to be an influence of that if the page matches. --- IkiWiki.pm | 14 +++++++++++++- doc/bugs/depends_simple_mixup.mdwn | 6 +++++- 2 files changed, 18 insertions(+), 2 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 0791e1e75..509f9ba2e 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1818,10 +1818,12 @@ sub add_depends ($$;$) { foreach my $p (keys %pagesources) { my $r=$sub->($p, location => $page); my $i=$r->influences; + my $static=$r->influences_static; foreach my $k (keys %$i) { + next unless $r || $static || $k eq $page; $depends_simple{$page}{lc $k} |= $i->{$k}; } - last if $r->influences_static; + last if $static; } $depends{$page}{$pagespec} |= $deptype; @@ -2136,6 +2138,9 @@ sub pagespec_match_list ($$;@) { my $r=$sub->($p, %params, location => $page); error(sprintf(gettext("cannot match pages: %s"), $r)) if $r->isa("IkiWiki::ErrorReason"); + unless ($r) { + $r->remove_influence($p); + } $accum |= $r; if ($r) { push @matches, $p; @@ -2232,6 +2237,13 @@ sub merge_influences { } } +sub remove_influence { + my $this=shift; + my $torm=shift; + + delete $this->[1]{$torm}; +} + package IkiWiki::ErrorReason; our @ISA = 'IkiWiki::FailReason'; diff --git a/doc/bugs/depends_simple_mixup.mdwn b/doc/bugs/depends_simple_mixup.mdwn index 79bfa8bdc..a5910d02e 100644 --- a/doc/bugs/depends_simple_mixup.mdwn +++ b/doc/bugs/depends_simple_mixup.mdwn @@ -81,4 +81,8 @@ non-$page influences. Hmm, commit f2b3d1341447cbf29189ab490daae418fbe5d02d seems thuroughly wrong. So, what about influence info for other matches like `!author(foo)` etc? Currently, none is returned, but it should -be a content influence. (Backlink influence data is ok.) +be a content influence. (Backlink influence data seems ok.) + +---- + +[[done]] again! -- cgit v1.2.3 From 8dc7f3005ebf36d5b126867e7ca0440d495d8ee3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Apr 2010 13:17:45 -0400 Subject: only remove page from influences when influences are not static This matches what add_depends done --- IkiWiki.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 19ed69d75..ec8b32a63 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2148,7 +2148,7 @@ sub pagespec_match_list ($$;@) { my $r=$sub->($p, %params, location => $page); error(sprintf(gettext("cannot match pages: %s"), $r)) if $r->isa("IkiWiki::ErrorReason"); - unless ($r) { + unless ($r || $r->influences_static) { $r->remove_influence($p); } $accum |= $r; -- cgit v1.2.3 From 23d62f42bd8fe18087cd293962a79d937cf5a3bc Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Apr 2010 14:35:00 -0400 Subject: remove add_templates option Templates are moving into the srcdir, and will also be searched for in configured underlays, so this is redundant. --- IkiWiki.pm | 9 +-------- IkiWiki/Plugin/underlay.pm | 11 ----------- doc/plugins/underlay.mdwn | 6 ------ 3 files changed, 1 insertion(+), 25 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index ec8b32a63..c2c2337b4 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -157,13 +157,6 @@ sub getsetup () { safe => 0, # path rebuild => 1, }, - templatedirs => { - type => "internal", - default => [], - description => "additional directories containing template files", - safe => 0, - rebuild => 0, - }, underlaydir => { type => "string", default => "$installdir/share/ikiwiki/basewiki", @@ -1661,7 +1654,7 @@ sub saveindex () { sub template_file ($) { my $template=shift; - foreach my $dir ($config{templatedir}, @{$config{templatedirs}}, + foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { return "$dir/$template" if -e "$dir/$template"; } diff --git a/IkiWiki/Plugin/underlay.pm b/IkiWiki/Plugin/underlay.pm index 116fe7324..3ea19c635 100644 --- a/IkiWiki/Plugin/underlay.pm +++ b/IkiWiki/Plugin/underlay.pm @@ -27,14 +27,6 @@ sub getsetup () { safe => 0, rebuild => 1, }, - add_templates => { - type => "string", - example => ["$ENV{HOME}/.ikiwiki/templates"], - description => "extra template directories to add", - advanced => 1, - safe => 0, - rebuild => 1, - }, } sub checkconfig () { @@ -43,9 +35,6 @@ sub checkconfig () { add_underlay($dir); } } - if ($config{add_templates}) { - push @{$config{templatedirs}}, @{$config{add_templates}}; - } } 1; diff --git a/doc/plugins/underlay.mdwn b/doc/plugins/underlay.mdwn index 8836a394c..0cf819472 100644 --- a/doc/plugins/underlay.mdwn +++ b/doc/plugins/underlay.mdwn @@ -12,9 +12,3 @@ revision control, like photos or software releases. Directories in `add_underlays` should usually be absolute. If relative, they're interpreted as relative to the parent directory of the basewiki underlay, which is probably not particularly useful in this context. - --- - -This plugin also adds an `add_templates` option to the setup file. -Its value is a list of template directories to look for template files in, -if they are not present in the `templatedir`. -- cgit v1.2.3 From abd233931247ef38f1b084afd5906619f02c13b6 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Apr 2010 15:34:32 -0400 Subject: look for templates in srcdir and underlays, first This entailed changing template_params; it no longer takes the template filename as its first parameter. Add template_depends to api and replace calls to template() with template_depends() in appropriate places, where a dependency should be added on the template. Other plugins don't use template(), so will need further work. Also, includes are disabled for security. Enabling includes only when using templates from the templatedir would be nice, but would add a lot of complexity to the implementation. --- IkiWiki.pm | 59 +++++++++++++++++++++++++++------------------- IkiWiki/Plugin/comments.pm | 2 +- IkiWiki/Plugin/editpage.pm | 2 +- IkiWiki/Plugin/google.pm | 2 +- IkiWiki/Plugin/inline.pm | 22 ++++++++++------- IkiWiki/Plugin/search.pm | 2 +- IkiWiki/Render.pm | 4 +++- doc/plugins/write.mdwn | 8 +++++++ 8 files changed, 63 insertions(+), 38 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index c2c2337b4..1327e4db5 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -18,8 +18,8 @@ use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %autofiles}; use Exporter q{import}; -our @EXPORT = qw(hook debug error template htmlpage deptype - add_depends pagespec_match pagespec_match_list bestlink +our @EXPORT = qw(hook debug error htmlpage template template_depends + deptype add_depends pagespec_match pagespec_match_list bestlink htmllink readfile writefile pagetype srcfile pagename displaytime will_render gettext ngettext urlto targetpage add_underlay pagetitle titlepage linkpage newpagefile @@ -1652,47 +1652,58 @@ sub saveindex () { } sub template_file ($) { - my $template=shift; + my $name=shift; + my $template=srcfile("templates/$name", 1); + return $template if defined $template; + foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { - return "$dir/$template" if -e "$dir/$template"; + return "$dir/$name" if -e "$dir/$name"; } return; } sub template_params (@) { - my $filename=template_file(shift); - - if (! defined $filename) { - return if wantarray; - return ""; - } + filter => sub { + my $text_ref = shift; + ${$text_ref} = decode_utf8(${$text_ref}); + }, + loop_context_vars => 1, + die_on_bad_params => 0, + @_, + no_includes => 1, +} - my @ret=( - filter => sub { - my $text_ref = shift; - ${$text_ref} = decode_utf8(${$text_ref}); - }, - filename => $filename, - loop_context_vars => 1, - die_on_bad_params => 0, +sub template ($;@) { + require HTML::Template; + return HTML::Template->new(template_params( + filename => template_file(shift), @_ - ); - return wantarray ? @ret : {@ret}; + )); } -sub template ($;@) { +sub template_depends ($$;@) { + my $name=shift; + my $page=shift; + + if (defined $page) { + add_depends($page, "templates/$name"); + } + my $filename=template_file($name); + require HTML::Template; - return HTML::Template->new(template_params(@_)); + return HTML::Template->new(template_params( + filename => $filename, + @_ + )); } sub misctemplate ($$;@) { my $title=shift; my $pagebody=shift; - my $template=template("misc.tmpl"); - $template->param( + my $template=template("misc.tmpl", title => $title, indexlink => indexlink(), wikiname => $config{wikiname}, diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 58bd4b851..ed75a6e46 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -274,7 +274,7 @@ sub editcomment ($$) { action => $config{cgiurl}, header => 0, table => 0, - template => scalar IkiWiki::template_params('editcomment.tmpl'), + template => template('editcomment.tmpl'), ); IkiWiki::decode_form_utf8($form); diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index 26e38abc1..5c94ecbca 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -78,7 +78,7 @@ sub cgi_editpage ($$) { action => $config{cgiurl}, header => 0, table => 0, - template => scalar template_params("editpage.tmpl"), + template => template("editpage.tmpl"), ); decode_form_utf8($form); diff --git a/IkiWiki/Plugin/google.pm b/IkiWiki/Plugin/google.pm index 48ad4c8ce..68cb16513 100644 --- a/IkiWiki/Plugin/google.pm +++ b/IkiWiki/Plugin/google.pm @@ -36,7 +36,7 @@ sub pagetemplate (@) { # Add search box to page header. if ($template->query(name => "searchform")) { if (! defined $form) { - my $searchform = template("googleform.tmpl", blind_cache => 1); + my $searchform = template_depends("googleform.tmpl", $page, blind_cache => 1); $searchform->param(url => $config{url}); $form=$searchform->output; } diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 3359af314..043649742 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -299,7 +299,7 @@ sub preprocess_inline (@) { (exists $params{postform} && yesno($params{postform}))) && IkiWiki->can("cgi_editpage")) { # Add a blog post form, with feed buttons. - my $formtemplate=template("blogpost.tmpl", blind_cache => 1); + my $formtemplate=template_depends("blogpost.tmpl", $params{page}, blind_cache => 1); $formtemplate->param(cgiurl => $config{cgiurl}); $formtemplate->param(rootpage => rootpage(%params)); $formtemplate->param(rssurl => $rssurl) if $feeds && $rss; @@ -320,19 +320,23 @@ sub preprocess_inline (@) { } elsif ($feeds && !$params{preview} && ($emptyfeeds || @feedlist)) { # Add feed buttons. - my $linktemplate=template("feedlink.tmpl", blind_cache => 1); + my $linktemplate=template_depends("feedlink.tmpl", $params{page}, blind_cache => 1); $linktemplate->param(rssurl => $rssurl) if $rss; $linktemplate->param(atomurl => $atomurl) if $atom; $ret.=$linktemplate->output; } if (! $feedonly) { - require HTML::Template; - my @params=IkiWiki::template_params($params{template}.".tmpl", blind_cache => 1); - if (! @params) { - error sprintf(gettext("nonexistant template %s"), $params{template}); + my $template; + if (! $raw) { + eval { + $template=template_depends($params{template}.".tmpl", $params{page}, + blind_cache => 1); + }; + if (! $@ || ! $template) { + error sprintf(gettext("nonexistant template %s"), $params{template}); + } } - my $template=HTML::Template->new(@params) unless $raw; my $needcontent=$raw || (!($archive && $quick) && $template->query(name => 'content')); foreach my $page (@list) { @@ -534,7 +538,7 @@ sub genfeed ($$$$$@) { my $url=URI->new(encode_utf8(urlto($page,"",1))); - my $itemtemplate=template($feedtype."item.tmpl", blind_cache => 1); + my $itemtemplate=template_depends($feedtype."item.tmpl", $page, blind_cache => 1); my $content=""; my $lasttime = 0; foreach my $p (@pages) { @@ -598,7 +602,7 @@ sub genfeed ($$$$$@) { $lasttime = $pagemtime{$p} if $pagemtime{$p} > $lasttime; } - my $template=template($feedtype."page.tmpl", blind_cache => 1); + my $template=template_depends($feedtype."page.tmpl", $page, blind_cache => 1); $template->param( title => $page ne "index" ? pagetitle($page) : $config{wikiname}, wikiname => $config{wikiname}, diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index a1e7026ca..55edf8752 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -52,7 +52,7 @@ sub pagetemplate (@) { # Add search box to page header. if ($template->query(name => "searchform")) { if (! defined $form) { - my $searchform = template("searchform.tmpl", blind_cache => 1); + my $searchform = template_depends("searchform.tmpl", $page, blind_cache => 1); $searchform->param(searchaction => $config{cgiurl}); $form=$searchform->output; } diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 49d080c16..7cf19645e 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -74,7 +74,9 @@ sub genpage ($$) { $templatefile=$file; } }); - my $template=template(defined $templatefile ? $templatefile : 'page.tmpl', blind_cache => 1); + my $template=template_depends( + defined $templatefile ? $templatefile : 'page.tmpl', $page, + blind_cache => 1); my $actions=0; if (length $config{cgiurl}) { diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 9e8c59f63..eaa008131 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -705,6 +705,14 @@ Creates and returns a [[!cpan HTML::Template]] object. The first parameter is the name of the file in the template directory. The optional remaining parameters are passed to `HTML::Template->new`. +### `template_depends($$;@)` + +Use this instead of `template()` if the content of a template is being +included into a page. This causes the page to depend on the template, +so it will be updated if the template is modified. + +Like `template()`, except the second parameter is the page. + ### `htmlpage($)` Passed a page name, returns the base name that will be used for a the html -- cgit v1.2.3 From bbd7e73f64cb5e24965343f7e605870e060c5df1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Apr 2010 15:58:06 -0400 Subject: refactor to remove template_params template_file will be kept separate, since it needs to be memoized --- IkiWiki.pm | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 1327e4db5..0aaf60569 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1664,23 +1664,8 @@ sub template_file ($) { return; } -sub template_params (@) { - filter => sub { - my $text_ref = shift; - ${$text_ref} = decode_utf8(${$text_ref}); - }, - loop_context_vars => 1, - die_on_bad_params => 0, - @_, - no_includes => 1, -} - sub template ($;@) { - require HTML::Template; - return HTML::Template->new(template_params( - filename => template_file(shift), - @_ - )); + template_depends(shift, undef, @_); } sub template_depends ($$;@) { @@ -1693,10 +1678,17 @@ sub template_depends ($$;@) { my $filename=template_file($name); require HTML::Template; - return HTML::Template->new(template_params( + return HTML::Template->new( + filter => sub { + my $text_ref = shift; + ${$text_ref} = decode_utf8(${$text_ref}); + }, + loop_context_vars => 1, + die_on_bad_params => 0, filename => $filename, - @_ - )); + @_, + no_includes => 1, + ); } sub misctemplate ($$;@) { -- cgit v1.2.3 From 54898d16d4c86fddcb1b5588eac67a729c14deeb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 23 Apr 2010 14:44:37 -0400 Subject: allow a bare page name to be specified as a template --- IkiWiki.pm | 31 +++++++++++++++++++++---------- doc/plugins/write.mdwn | 11 +++++++++-- template-transition-notes | 1 + 3 files changed, 31 insertions(+), 12 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 0aaf60569..03441b594 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1653,9 +1653,18 @@ sub saveindex () { sub template_file ($) { my $name=shift; + + my $tpage="templates/$name"; + if ($name !~ /\.tmpl$/ && exists $pagesources{$tpage}) { + $tpage=$pagesources{$tpage}; + $name.=".tmpl"; + } - my $template=srcfile("templates/$name", 1); - return $template if defined $template; + my $template=srcfile($tpage, 1); + if (defined $template) { + return $template, $tpage if wantarray; + return $template; + } foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { @@ -1664,18 +1673,16 @@ sub template_file ($) { return; } -sub template ($;@) { - template_depends(shift, undef, @_); -} - sub template_depends ($$;@) { my $name=shift; my $page=shift; - - if (defined $page) { - add_depends($page, "templates/$name"); + + my ($filename, $tpage)=template_file($name); + if (defined $page && defined $tpage) { + add_depends($page, $tpage); } - my $filename=template_file($name); + + return unless defined $filename; require HTML::Template; return HTML::Template->new( @@ -1691,6 +1698,10 @@ sub template_depends ($$;@) { ); } +sub template ($;@) { + template_depends(shift, undef, @_); +} + sub misctemplate ($$;@) { my $title=shift; my $pagebody=shift; diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index eaa008131..1407b5a12 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -702,8 +702,15 @@ the entire wiki build and make the wiki unusable. ### `template($;@)` Creates and returns a [[!cpan HTML::Template]] object. The first parameter -is the name of the file in the template directory. The optional remaining -parameters are passed to `HTML::Template->new`. +is the name of the template file. The optional remaining parameters are +passed to `HTML::Template->new`. + +The template file is first looked for in the templates/ subdirectory of the +srcdir. Failing that, it is looked for in the templatedir. Typically +the filename will have a ".tmpl" extension. If a filename with no extension +is passed, a wiki page in templates/ with its name is used as the template. +That should only be done for templates which it is safe to let wiki users +edit. ### `template_depends($$;@)` diff --git a/template-transition-notes b/template-transition-notes index 193dd79d4..ccff3e78f 100644 --- a/template-transition-notes +++ b/template-transition-notes @@ -3,3 +3,4 @@ * includes no longer allowed in templates * template directive no longer uses $foo.tmpl , only page $foo. +* template_params removed (not exported API) -- cgit v1.2.3 From 78fd3b35a2805489185a14e00b53b450eec961f1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 23 Apr 2010 15:02:07 -0400 Subject: allow template pages to not be under templates/ --- IkiWiki.pm | 4 +++- doc/plugins/write.mdwn | 14 ++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 03441b594..78612cd08 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1654,7 +1654,7 @@ sub saveindex () { sub template_file ($) { my $name=shift; - my $tpage="templates/$name"; + my $tpage=($name =~ /^\//) ? $name : "templates/$name"; if ($name !~ /\.tmpl$/ && exists $pagesources{$tpage}) { $tpage=$pagesources{$tpage}; $name.=".tmpl"; @@ -1665,6 +1665,8 @@ sub template_file ($) { return $template, $tpage if wantarray; return $template; } + + $name=~s:/::; # avoid path traversal foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 1407b5a12..00b54bdd3 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -705,12 +705,14 @@ Creates and returns a [[!cpan HTML::Template]] object. The first parameter is the name of the template file. The optional remaining parameters are passed to `HTML::Template->new`. -The template file is first looked for in the templates/ subdirectory of the -srcdir. Failing that, it is looked for in the templatedir. Typically -the filename will have a ".tmpl" extension. If a filename with no extension -is passed, a wiki page in templates/ with its name is used as the template. -That should only be done for templates which it is safe to let wiki users -edit. +Normally, the template file is first looked for in the templates/ subdirectory +of the srcdir. Failing that, it is looked for in the templatedir. + +Wiki pages can be used as templates. This should be done only for templates +which it is safe to let wiki users edit. Enable it by passing a filename +with no ".tmpl" extension. Template pages are normally looked for in +the templates/ directory. If the page name starts with "/", a page +elsewhere in the wiki can be used. ### `template_depends($$;@)` -- cgit v1.2.3 From 96c9c8aa925120423fc563dbf233c73fc805288b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 23 Apr 2010 16:20:02 -0400 Subject: fix return of tpage --- IkiWiki.pm | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 78612cd08..7382f11e4 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1661,16 +1661,20 @@ sub template_file ($) { } my $template=srcfile($tpage, 1); - if (defined $template) { - return $template, $tpage if wantarray; - return $template; + if (! defined $template) { + $name=~s:/::; # avoid path traversal + foreach my $dir ($config{templatedir}, + "$installdir/share/ikiwiki/templates") { + if (-e "$dir/$name") { + $template="$dir/$name"; + last; + } + } } - $name=~s:/::; # avoid path traversal - - foreach my $dir ($config{templatedir}, - "$installdir/share/ikiwiki/templates") { - return "$dir/$name" if -e "$dir/$name"; + if (defined $template) { + return $template, $tpage if wantarray; + return $template; } return; } -- cgit v1.2.3 From 7099978b7255db504ea17ccd07533e86c2b262fa Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 24 Apr 2010 16:00:18 -0400 Subject: bugfix --- IkiWiki.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 7382f11e4..8bae6b72f 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1712,7 +1712,8 @@ sub misctemplate ($$;@) { my $title=shift; my $pagebody=shift; - my $template=template("misc.tmpl", + my $template=template("misc.tmpl"); + $template->param( title => $title, indexlink => indexlink(), wikiname => $config{wikiname}, -- cgit v1.2.3 From c2656f08f3a3671b0ba7dc861d53347c7f695ec1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 24 Apr 2010 16:11:33 -0400 Subject: template() - return params in list context I forgot CGI::Formbuilder's horrible interface that needs template parameters instead of a constructed object. --- IkiWiki.pm | 7 +- IkiWiki/Plugin/comments.pm | 2 +- IkiWiki/Plugin/editpage.pm | 2 +- doc/plugins/write.mdwn | 8 +- po/bg.po | 236 ++++++++++++++++++++++--------------------- po/cs.po | 243 +++++++++++++++++++++++--------------------- po/da.po | 242 ++++++++++++++++++++++++-------------------- po/de.po | 242 ++++++++++++++++++++++++-------------------- po/es.po | 246 ++++++++++++++++++++++++--------------------- po/fr.po | 242 ++++++++++++++++++++++++-------------------- po/gu.po | 235 +++++++++++++++++++++++-------------------- po/ikiwiki.pot | 218 ++++++++++++++++++++------------------- po/it.po | 242 ++++++++++++++++++++++++-------------------- po/pl.po | 241 +++++++++++++++++++++++--------------------- po/sv.po | 236 ++++++++++++++++++++++--------------------- 15 files changed, 1416 insertions(+), 1226 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 8bae6b72f..c218ed8ab 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1690,8 +1690,7 @@ sub template_depends ($$;@) { return unless defined $filename; - require HTML::Template; - return HTML::Template->new( + my @opts=( filter => sub { my $text_ref = shift; ${$text_ref} = decode_utf8(${$text_ref}); @@ -1702,6 +1701,10 @@ sub template_depends ($$;@) { @_, no_includes => 1, ); + return @opts if wantarray; + + require HTML::Template; + return HTML::Template->new(@opts); } sub template ($;@) { diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index ed75a6e46..f7dc99dca 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -274,7 +274,7 @@ sub editcomment ($$) { action => $config{cgiurl}, header => 0, table => 0, - template => template('editcomment.tmpl'), + template => { template('editcomment.tmpl') }, ); IkiWiki::decode_form_utf8($form); diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index 5c94ecbca..7bb6eb07c 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -78,7 +78,7 @@ sub cgi_editpage ($$) { action => $config{cgiurl}, header => 0, table => 0, - template => template("editpage.tmpl"), + template => { template("editpage.tmpl") }, ); decode_form_utf8($form); diff --git a/doc/plugins/write.mdwn b/doc/plugins/write.mdwn index 9128c7f54..a9ea7db73 100644 --- a/doc/plugins/write.mdwn +++ b/doc/plugins/write.mdwn @@ -701,9 +701,11 @@ the entire wiki build and make the wiki unusable. ### `template($;@)` -Creates and returns a [[!cpan HTML::Template]] object. The first parameter -is the name of the template file. The optional remaining parameters are -passed to `HTML::Template->new`. +Creates and returns a [[!cpan HTML::Template]] object. (In a list context, +returns the parameters needed to construct the obhect.) + +The first parameter is the name of the template file. The optional remaining +parameters are passed to `HTML::Template->new`. Normally, the template file is first looked for in the templates/ subdirectory of the srcdir. Failing that, it is looked for in the templatedir. diff --git a/po/bg.po b/po/bg.po index 5585a10d6..f85323ea3 100644 --- a/po/bg.po +++ b/po/bg.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki-bg\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2007-01-12 01:19+0200\n" "Last-Translator: Damyan Ivanov \n" "Language-Team: Bulgarian \n" @@ -55,7 +55,7 @@ msgstr "Предпочитанията са запазени." msgid "You are banned." msgstr "Достъпът ви е забранен." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Грешка" @@ -137,7 +137,7 @@ msgstr "създаване на нова страницa „%s”" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "готово" @@ -178,7 +178,7 @@ msgstr "" msgid "attachment upload" msgstr "" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "" @@ -210,55 +210,55 @@ msgstr "" msgid "Anonymous" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, fuzzy, perl-format msgid "commenting on %s" msgstr "създаване на %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -268,7 +268,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "" @@ -298,14 +298,14 @@ msgstr "премахване на старата страница „%s”" msgid "%s is not an editable page" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "създаване на %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "промяна на %s" @@ -325,9 +325,10 @@ msgstr "не е указан файл на обвивката" msgid "edittemplate %s registered for %s" msgstr "" -#: ../IkiWiki/Plugin/edittemplate.pm:138 +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 #, fuzzy -msgid "failed to process" +msgid "failed to process template:" msgstr "грешка при обработване на шаблона" #: ../IkiWiki/Plugin/format.pm:30 @@ -358,18 +359,18 @@ msgstr "грешка при четене на „%s”: %s" msgid "%s is an attachment, not a page." msgstr "" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "" @@ -458,12 +459,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "" +msgid "template %s not found" +msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "модулът „RPC::XML::Client” не е намерен; източникът не е проверен" @@ -494,21 +495,25 @@ msgstr "" "грешка при зареждането на perl-модула „Markdown.pm” (%s) или „/usr/bin/" "markdown” (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 #, fuzzy msgid "stylesheet not found" msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 #, fuzzy msgid "redir page not found" msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 #, fuzzy msgid "redir cycle is not allowed" msgstr "шаблонът „%s” не е намерен" +#: ../IkiWiki/Plugin/meta.pm:383 +msgid "sort=meta requires a parameter" +msgstr "" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Огледала" @@ -525,10 +530,6 @@ msgstr "" msgid "more" msgstr "" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "функцията „getctime” не е реализирана" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "" @@ -546,39 +547,39 @@ msgstr "Всички страници имат връзки от други ст msgid "bad or missing template" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Акаунтът е създаден. Можете да влезете." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Грешка при създаване на акаунта." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Грешка при изпращане на поща" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "" @@ -609,94 +610,94 @@ msgstr "модулът „RPC::XML::Client” не е намерен; източ msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, fuzzy, perl-format msgid "building %s" msgstr "промяна на %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "крешка при компилиране на файла %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, fuzzy, perl-format msgid "failed to update %s" msgstr "крешка при компилиране на файла %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "крешка при компилиране на файла %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "грешка при запис на файла „%s”: %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, fuzzy, perl-format msgid "failed to write %s" msgstr "грешка при запис на файла „%s”: %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 #, fuzzy msgid "failed to translate" msgstr "приставката „linkmap”: грешка при изпълнение на „dot”" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -841,44 +842,44 @@ msgstr "" msgid "no change to the file name was specified" msgstr "не е указан файл на обвивката" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, fuzzy, perl-format msgid "rename %s" msgstr "обновяване на страницата „%s”" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, fuzzy, perl-format msgid "update for rename of %s to %s" msgstr "обновяване на страниците от уики „%s”: %s от потребител „%s”" @@ -983,21 +984,21 @@ msgstr "" msgid "parse fail at line %d: %s" msgstr "грешка при запис на файла „%s”: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "създаване на нова страницa „%s”" + +#: ../IkiWiki/Plugin/template.pm:33 #, fuzzy msgid "missing id parameter" msgstr "липсващ параметър „id” на шаблона" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" +#, fuzzy, perl-format +msgid "%s not found" msgstr "шаблонът „%s” не е намерен" -#: ../IkiWiki/Plugin/template.pm:66 -#, fuzzy -msgid "failed to process:" -msgstr "грешка при обработване на шаблона" - #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "" @@ -1056,54 +1057,59 @@ msgstr "" msgid "bad file name %s" msgstr "пропускане на невалидното име на файл „%s”" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "сканиране на „%s”" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "пропускане на невалидното име на файл „%s”" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "премахване на старата страница „%s”" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "обновяване на страницата „%s”, съдържаща препратки към „%s”" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "премахване на „%s” понеже не се генерира от „%s”" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "обновяване на страницата „%s”, зависеща от „%s”" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "обновяване на „%s” и осъвременяване на обратните връзки" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: неуспех при обновяване на страницата „%s”" @@ -1176,64 +1182,65 @@ msgstr "формат: ikiwiki [опции] източник местоназна msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 msgid "usage: --set-yaml var=value" msgstr "" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "генериране на обвивки..." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "обновяване на уики..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "осъвременяване на уики..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Дискусия" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "При използване на пареметъра „--cgi” е необходимо да се укаже и " "местоположението на уикито чрез параметъра „--url”" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "открита е циклична завидимост при %s на „%s” на дълбочина %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "непознат вид сортиране „%s”" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "непознат вид сортиране „%s”" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "грешка при четене на „%s”: %s" @@ -1258,6 +1265,13 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#, fuzzy +#~ msgid "failed to process" +#~ msgstr "грешка при обработване на шаблона" + +#~ msgid "getctime not implemented" +#~ msgstr "функцията „getctime” не е реализирана" + #, fuzzy #~ msgid "failed to read %s" #~ msgstr "грешка при запис на файла „%s”: %s" @@ -1316,10 +1330,6 @@ msgstr "" #~ "изпълнява като „svn post-commit hook”. Няма да бъдат разпратени " #~ "известявания" -#, fuzzy -#~ msgid "%s not found" -#~ msgstr "шаблонът „%s” не е намерен" - #~ msgid "What's this?" #~ msgstr "Какво е това?" diff --git a/po/cs.po b/po/cs.po index 0b45bb97a..71195bae2 100644 --- a/po/cs.po +++ b/po/cs.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2009-09-11 20:23+0200\n" "Last-Translator: Miroslav Kure \n" "Language-Team: Czech \n" @@ -55,7 +55,7 @@ msgstr "Nastavení uloženo." msgid "You are banned." msgstr "Jste vyhoštěni." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Chyba" @@ -136,7 +136,7 @@ msgstr "vytvářím novou stránku %s" msgid "deleting bucket.." msgstr "mažu bucket..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "hotovo" @@ -174,7 +174,7 @@ msgstr "chybné jméno souboru s přílohou" msgid "attachment upload" msgstr "příloha nahrána" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "automatické vytváření indexu" @@ -208,55 +208,55 @@ msgstr "komentář musí mít obsah" msgid "Anonymous" msgstr "Anonym" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "chybný název stránky" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "komentář k %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "stránka „%s“ neexistuje, takže nemůžete komentovat" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "komentáře na stránce „%s“ jsou uzamčeny" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "komentář uložen pro schválení" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Váš komentář bude zobrazen po schválení moderátorem" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Přidán komentář" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Přidán komentář: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "nejste přihlášeni jako správce" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Schvalování komentářů" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "schvalování komentářů" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, fuzzy, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -266,7 +266,7 @@ msgstr[1] "Komentáře" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 #, fuzzy msgid "Comment" msgstr "Komentáře" @@ -297,14 +297,14 @@ msgstr "odstraňuji starý náhled %s" msgid "%s is not an editable page" msgstr "%s není editovatelná stránka" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "vytvářím %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "upravuji %s" @@ -322,9 +322,11 @@ msgstr "nebyl zadán parametr match" msgid "edittemplate %s registered for %s" msgstr "edittemplate %s byla zaregistrována pro %s" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "nepodařilo se zpracovat" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "nepodařilo se zpracovat:" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -352,18 +354,18 @@ msgstr "není stránkou" msgid "%s is an attachment, not a page." msgstr "%s není ani příloha, ani stránka." -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "nejste oprávněni měnit %s" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "nemůžete pracovat se souborem s přístupovým oprávněními %s" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "nejste oprávněni měnit přístupová oprávnění souborů" @@ -445,12 +447,12 @@ msgstr "parametry %s a %s nelze použít zároveň" msgid "Add a new post titled:" msgstr "Přidat nový příspěvek nazvaný:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "neexistující šablona %s" +msgid "template %s not found" +msgstr "šablona %s nebyla nalezena" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client nebyl nalezen, nepinkám" @@ -478,18 +480,23 @@ 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:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "styl nebyl nalezen" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "stránka, na kterou vede přesměrování, nebyla nalezena" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "cykly nejsou v přesměrování povoleny" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "vyžaduje parametry „from“ a „to“" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Zrcadla" @@ -507,10 +514,6 @@ msgstr "schvalování komentářů" msgid "more" msgstr "více" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime není implementováno" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "Přihlásit pomocí" @@ -527,39 +530,39 @@ msgstr "Na každou stránku vede odkaz z jiné stránky." msgid "bad or missing template" msgstr "chybná nebo chybějící šablona" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Vytvoření účtu bylo úspěšné. Nyní se můžete přihlásit." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Chyba při vytváření účtu." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "Bez e-mailové adresy nelze zaslat postup na resetování hesla." -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Nepodařilo se odeslat email." -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "Postup na resetování hesla vám byl odeslán na e-mail." -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "chybné URL pro resetování hesla" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "resetování hesla bylo zamítnuto" @@ -589,40 +592,40 @@ msgstr "LWP nebyl nalezen, nepinkám" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "varování: rozpoznána stará verze po4a, doporučen přechod na 0.35." -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "%s není platným kódem jazyka" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" "%s není platnou hodnotou parametru po_link_to, používám po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" "po_link_to=negotiated vyžaduje zapnuté usedirs, používám po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "znovusestavuji všechny stránky, aby se opravily meta nadpisy" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "sestavuji %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "aktualizovány PO soubory" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -630,7 +633,7 @@ msgstr "" "Nemohu odstranit překlad. Nicméně pokud bude odstraněna hlavní stránka, " "budou odstraněny také její překlady." -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -638,50 +641,50 @@ msgstr "" "Nemohu přejmenovat překlad. Nicméně pokud bude přejmenována hlavní stránka, " "budou přejmenovány také její překlady." -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "POT soubor (%s) neexistuje" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "nepodařilo se zkopírovat PO soubor na %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "nepodařilo se aktualizovat %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "nepodařilo se zkopírovat POT soubor na %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "N/A" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "nepodařilo se přeložit %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "odstraněny zastaralé PO soubory" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "nepodařilo se zapsat %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "překlad se nezdařil" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "neplatná gettext data, pro pokračování v úpravách se vraťte na předchozí " @@ -825,44 +828,44 @@ msgstr "%s není ve zdrojovém adresáři a proto nelze přejmenovat" msgid "no change to the file name was specified" msgstr "jméno souboru nebylo změněno" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "neplatné jméno" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s již existuje" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s již na disku existuje" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "přejmenování %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "Také přejmenovat podstránky a přílohy" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Najednou lze přejmenovat pouze jednu přílohu." -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Vyberte přílohu, kterou chcete přejmenovat." -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "přejmenování %s na %s" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "aktualizace pro přejmenování %s na %s" @@ -960,18 +963,19 @@ msgstr "Stáhnout zdrojová data" msgid "parse fail at line %d: %s" msgstr "zpracovávání selhalo na řádku %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "vytvářím novou stránku %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "chybí parametr id" #: ../IkiWiki/Plugin/template.pm:47 #, perl-format -msgid "template %s not found" -msgstr "šablona %s nebyla nalezena" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "nepodařilo se zpracovat:" +msgid "%s not found" +msgstr "%s nenalezen" #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1034,12 +1038,12 @@ msgstr "nemohu určit identitu nedůvěryhodného uživatele %s" msgid "bad file name %s" msgstr "chybné jméno souboru %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "prohledávám %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1048,42 +1052,47 @@ msgstr "" "v cestě ke zdrojovému adresáři (%s) byl nalezen symbolický odkaz -- chcete-" "li to povolit, nastavte proměnnou allow_symlinks_before_srcdir" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "přeskakuji chybné jméno souboru %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s má několik možných zdrojových stránek" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "odstraňuji starou stránku %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "sestavuji %s, která odkazuje na %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "odstraňuji %s, již není sestavována pomocí %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "sestavuji %s, která závisí na %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "sestavuji %s, aby se aktualizovaly zpětné odkazy" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: nelze sestavit %s" @@ -1156,63 +1165,64 @@ msgstr "použití: ikiwiki [volby] zdroj cíl" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup konfigurační.soubor" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "použití: --set proměnná=hodnota" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "použití: --set proměnná=hodnota" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "generuji obaly..." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "znovusestavuji wiki..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "obnovuji wiki..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Diskuse" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Při použití --cgi musíte pomocí --url zadat url k wiki" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "nelze použít několik rcs modulů" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "nepodařilo se nahrát externí modul vyžadovaný modulem %s: %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Byla rozpoznána smyčka na %s v hloubce %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "ano" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "Pro řazení pomocí title_natural je nutný modul Sort::Naturally" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "neznámý typ řazení %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "neznámý typ řazení %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "nelze vybrat stránky: %s" @@ -1237,6 +1247,18 @@ msgstr "Který uživatel (wiki účet nebo openid) bude správce?" msgid "What is the domain name of the web server?" msgstr "Jaké je doménové jméno webového serveru?" +#~ msgid "failed to process" +#~ msgstr "nepodařilo se zpracovat" + +#~ msgid "nonexistant template %s" +#~ msgstr "neexistující šablona %s" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime není implementováno" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "Pro řazení pomocí title_natural je nutný modul Sort::Naturally" + #~ msgid "failed to read %s" #~ msgstr "nepodařilo se přečíst %s" @@ -1284,9 +1306,6 @@ msgstr "Jaké je doménové jméno webového serveru?" #~ "REV není nastavena, není spuštěna ze svn post-commit, nemohu zaslat " #~ "oznámení" -#~ msgid "%s not found" -#~ msgstr "%s nenalezen" - #~ msgid "What's this?" #~ msgstr "Co to je?" diff --git a/po/da.po b/po/da.po index be7a95e6a..f830d667d 100644 --- a/po/da.po +++ b/po/da.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.14159\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2009-07-23 01:07+0200\n" "Last-Translator: Jonas Smedegaard \n" "Language-Team: None\n" @@ -59,7 +59,7 @@ msgstr "Indstillinger gemt" msgid "You are banned." msgstr "Du er banlyst." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Fejl" @@ -140,7 +140,7 @@ msgstr "opretter ny side %s" msgid "deleting bucket.." msgstr "sletter bundt.." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "færdig" @@ -181,7 +181,7 @@ msgstr "dårligt vedhæftningsfilnavn" msgid "attachment upload" msgstr "vedhæftningsoplægning" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "automatisk indeks-dannelse" @@ -215,55 +215,55 @@ msgstr "kommentar skal have indhold" msgid "Anonymous" msgstr "Anonym" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "dårligt sidenavn" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "kommenterer på %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "siden '%s' eksisterer ikke, så du kan ikke kommentere" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "kommentarer på side '%s' er lukket" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "kommentar gemt for moderering" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Din kommentar vil blive tilføjet efter moderatorgenemsyn" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Tilføjede en kommentar" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Tilføjede en kommentar: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "du er ikke logget på som en administrator" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Kommentarmoderering" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "kommentarkoderering" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, fuzzy, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -273,7 +273,7 @@ msgstr[1] "Kommentarer" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 #, fuzzy msgid "Comment" msgstr "Kommentarer" @@ -304,14 +304,14 @@ msgstr "fjerner gammelt smugkig %s" msgid "%s is not an editable page" msgstr "%s er ikke en redigérbar side" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "opretter %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "redigerer %s" @@ -329,9 +329,11 @@ msgstr "sammenligning ikke angivet" msgid "edittemplate %s registered for %s" msgstr "redigeringsskabelon %s registreret for %s" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "dannelsen mislykkedes" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "dannelsen mislykkedes:" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -360,18 +362,18 @@ msgstr "kan ikke få sider til at passe sammen: %s" msgid "%s is an attachment, not a page." msgstr "%s er ikke en redigérbar side" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "Du har ikke lov til at ændre %s" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "du kan ikke påvirke en fil med modus %s" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "du har ikke lov til at ændre modus for filer" @@ -456,12 +458,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "Tilføj nyt indlæg med følgende titel:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "ikke-eksisterende skabelon: %s" +msgid "template %s not found" +msgstr "skabelon %s ikke fundet" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client ikke fundet, pinger ikke" @@ -491,18 +493,23 @@ msgstr "" "Indlæsning af perl-modulet Markdown.pm (%s) eller /usr/bin/markdown (%s) " "mislykkedes" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "stilsnit (stylesheet) ikke fundet" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "henvisningsside ikke fundet" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "ring af henvisninger er ikke tilladt" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "kræver 'from'- og 'to'-parametre" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Spejle" @@ -520,10 +527,6 @@ msgstr "kommentarkoderering" msgid "more" msgstr "mere" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime ikke implementeret" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "Log på med" @@ -540,40 +543,40 @@ msgstr "Alle sider har henvisninger fra andre sider." msgid "bad or missing template" msgstr "dårlig eller manglende skabelon" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Konto korrekt oprettet. Nu kan du logge på." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Fejl ved kontooprettelse." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" "Ingen emailadresse, så kan ikke sende adgangskodenulstillingsinstruktioner." -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Afsendelse af mail mislykkedes" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "Du har fået tilsendt adgangskodenulstillingsinstruktioner." -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "Ukorrekt adgangskodenumstillings-URL" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "adgangskodenulstilling afvist" @@ -603,12 +606,12 @@ msgstr "LWP ikke fundet, pinger ikke" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "%s er ikke en gyldig sprogkode" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" @@ -616,7 +619,7 @@ msgstr "" "%s er ikke en gyldig værdi for po_link_to, falder tilbage til " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" @@ -624,21 +627,21 @@ msgstr "" "po_link_to=negotiated kræver at usedirs er aktiveret, falder tilbage til " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "gendanner alle sider for at korrigere meta titler" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "danner %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "opdaterer PO-filer" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -646,7 +649,7 @@ msgstr "" "Kan ikke fjerne en oversættelse. Fjern i stedet hovedsiden, så fjernes dens " "oversættelser også." -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -654,50 +657,50 @@ msgstr "" "Kan ikke omdøbe en oversættelse. Omdøb i stedet hovedsiden, så omdøbes dens " "oversættelser også." -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "POT-filen %s eksisterer ikke" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "kopiering af POT-filen til %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "opdatering af %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "kopiering af POT-filen til %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "N/A" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "oversættelse af %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "forældede PO filer fjernet" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "skrivning af %s mislykkedes" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "oversættelse mislykkedes" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "forkert gettext-data, gå tilbage til forrige side og fortsæt redigering" @@ -840,44 +843,44 @@ msgstr "%s er ikke i srcdir, så kan ikke blive omdøbt" msgid "no change to the file name was specified" msgstr "ingen ændring til filnavnet blev angivet" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "ugyldigt navn" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s eksisterer allerede" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s eksisterer allerede på disken" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "omdøb %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "Omdøb også UnderSider og vedhæftninger" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Kun en vedhæftning kan blive omdøbt ad gangen." -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Vælg vedhæftningen som skal omdøbes." -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "omdøb %s til %s" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "opdatering til omdøbning af %s til %s" @@ -975,18 +978,19 @@ msgstr "Direkte datanedlastning" msgid "parse fail at line %d: %s" msgstr "afkodningsfejl på linje %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "opretter ny side %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "manglende id-parameter" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "skabelon %s ikke fundet" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "dannelsen mislykkedes:" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "fødning ikke fundet" #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1049,12 +1053,12 @@ msgstr "kan ikke afgøre id for ikke-tillidsfulde skribent %s" msgid "bad file name %s" msgstr "dårligt filnavn %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "gennemlæser %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1063,42 +1067,47 @@ msgstr "" "symbolsk lænke fundet i srcdir-sti (%s) -- sæt allow_symlinks_before_srcdir " "for at tillade dette" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "udelader forkert filnavn %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s har flere mulige kildesider" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "fjerner gammel side %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "danner %s, som henviser til %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "fjerner %s, ikke længere dannet af %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "danner %s, som afhænger af %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "danner %s, for at opdatere dens krydshenvisninger (backlinks)" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: kan ikke danne %s" @@ -1171,64 +1180,65 @@ msgstr "brug: ikiwiki [valg] kilde mål" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup opsætningsfil" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "brug: --set var=værdi" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "brug: --set var=værdi" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "bygger wrappers.." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "genopbygger wiki..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "genopfrisker wiki..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Diskussion" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Skal angive url til wiki med --url når der bruges --cgi" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "kan ikke bruge flere samtidige RCS-udvidelser" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" "indlæsning af ekstern udvidelse krævet af udvidelsen %s mislykkedes: %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "forudberegningssløkke fundet på %s ved dybde %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "ja" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "Sort::Naturally krævet for title_natural sortering" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "ukendt sorteringsform %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "ukendt sorteringsform %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "kan ikke få sider til at passe sammen: %s" @@ -1253,6 +1263,18 @@ msgstr "Hvilken bruger (wiki konto eller openid) skal være administrator?" msgid "What is the domain name of the web server?" msgstr "Hvad er webserverens domænenavn?" +#~ msgid "failed to process" +#~ msgstr "dannelsen mislykkedes" + +#~ msgid "nonexistant template %s" +#~ msgstr "ikke-eksisterende skabelon: %s" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime ikke implementeret" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "Sort::Naturally krævet for title_natural sortering" + #~ msgid "failed to read %s" #~ msgstr "læsning af %s mislykkedes" diff --git a/po/de.po b/po/de.po index e5a18d47b..2452c8d21 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.14159\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2010-03-14 16:09+0530\n" "Last-Translator: Sebastian Kuhnert \n" "Language-Team: German \n" @@ -56,7 +56,7 @@ msgstr "Einstellungen gespeichert." msgid "You are banned." msgstr "Sie sind ausgeschlossen worden." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Fehler" @@ -137,7 +137,7 @@ msgstr "erstelle neue Seite %s" msgid "deleting bucket.." msgstr "lösche Behälter (bucket)..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "fertig" @@ -176,7 +176,7 @@ msgstr "fehlerhafter Dateiname für Anhang" msgid "attachment upload" msgstr "Anhang hochladen" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "automatische Index-Erstellung" @@ -210,56 +210,56 @@ msgstr "ein Kommentar sollte Inhalt haben" msgid "Anonymous" msgstr "Anonym" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "fehlerhafter Seitenname" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "kommentiere %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" "Seite %s existiert nicht, Sie können sie deshalb auch nicht kommentieren" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "Kommentare zur Seite %s sind gesperrt" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "Der Kommentar wurde zur Moderation gespeichert" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Ihr Kommentar wird nach Moderation verschickt" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Kommentar hinzugefügt" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Kommentar hinzugefügt: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "Sie sind nicht als Administrator angemeldet" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Kommentar-Moderation" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "Kommentar-Moderation" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -269,7 +269,7 @@ msgstr[1] "%i Kommentare" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "Kommentieren" @@ -299,14 +299,14 @@ msgstr "entferne alte Vorschau %s" msgid "%s is not an editable page" msgstr "Seite %s kann nicht bearbeitet werden" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "erstelle %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "bearbeite %s" @@ -324,9 +324,11 @@ msgstr "Übereinstimmung nicht angegeben" msgid "edittemplate %s registered for %s" msgstr "edittemplate %s für %s registriert" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "Ablauf fehlgeschlagen" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "Fehler beim Ablauf:" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -354,18 +356,18 @@ msgstr "Keine Seite" msgid "%s is an attachment, not a page." msgstr "Seite %s ist ein Anhang und keine Seite." -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "Sie dürfen %s nicht verändern" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "Sie können eine Datei mit den Zugriffsrechten %s nicht nutzen" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "Sie dürfen die Zugriffsrechte der Datei nicht ändern" @@ -451,12 +453,12 @@ msgstr "die Parameter %s und %s können nicht zusammen benutzt werden" msgid "Add a new post titled:" msgstr "Füge einen neuen Beitrag hinzu. Titel:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "nicht-vorhandene Vorlage %s" +msgid "template %s not found" +msgstr "Vorlage %s nicht gefunden" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client nicht gefunden, führe Ping nicht aus" @@ -487,18 +489,23 @@ msgstr "" "laden des Perlmoduls Markdown.pm (%s) oder /usr/bin/markdown (%s) " "fehlgeschlagen" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "Stylesheet nicht gefunden" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "Umleitungsseite nicht gefunden" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "Zyklische Umleitungen sind nicht erlaubt" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "erfordert die Parameter 'from' und 'to'" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Spiegel" @@ -515,10 +522,6 @@ msgstr "Kommentar muss moderiert werden" msgid "more" msgstr "mehr" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime ist nicht implementiert" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "Anmelden mit" @@ -535,41 +538,41 @@ msgstr "Alle Seiten haben mindestens einen Verweis von einer anderen Seite." msgid "bad or missing template" msgstr "fehlerhafte oder fehlende Vorlage" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "Ihre Benutzerseite: " -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "Benutzerseite erstellen" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Kontoerstellung erfolgreich. Sie können sich jetzt anmelden." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Konto konnte nicht erstellt werden." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" "es gibt keine E-Mail Adresse, deshalb kann keine Anweisung zum Zurücksetzen " "des Passwortes zugeschickt werden." -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Es konnte keine E-Mail versandt werden" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "Ihnen wurden Anweisungen zum Zurücksetzen des Passworts zugesandt." -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "fehlerhafte URL zum Zurücksetzen des Passworts" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "zurücksetzen des Passworts abgelehnt" @@ -599,12 +602,12 @@ msgstr "LWP nicht gefunden, führe Ping nicht aus" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "Warnung: Altes po4a erkannt! Empfehle Aktualisierung auf 0.35" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "%s ist keine gültige Sprachkodierung" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" @@ -612,7 +615,7 @@ msgstr "" "%s ist kein gültiger Wert für po_link_to, greife zurück auf " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" @@ -620,21 +623,21 @@ msgstr "" "po_link_to=negotiated benötigt usedirs eingeschaltet, greife zurück auf " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "um die meta-titeln zu reparieren werden alle Seiten neu erstellt" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "erzeuge %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "PO-Dateien aktualisiert" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -642,7 +645,7 @@ msgstr "" "Übersetzung kann nicht entfernt werden. Wenn die Master Seite entfernt wird, " "werden auch ihre Übersetzungen entfernt." -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -650,50 +653,50 @@ msgstr "" "Eine Übersetzung kann nicht umbenannt werden. Wenn die Master Seite " "unbenannt wird, werden auch ihre Übersetzungen unbenannt." -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "POT-Datei (%s) existiert nicht" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "konnte die PO-Datei nicht aus dem Underlay nach %s kopieren" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "aktualisieren von %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "kopieren der POT-Datei nach %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "N/A" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "übersetzen von %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "überflüssige PO-Dateien wurden entfernt" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "schreiben von %s fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "übersetzen fehlgeschlagen" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "ungültige gettext Datei, gehe zurück zur vorherigen Seite um weiter zu " @@ -839,44 +842,44 @@ msgstr "%s ist nicht im srcdir und kann deshalb nicht umbenannt werden" msgid "no change to the file name was specified" msgstr "es wurde keine Änderung des Dateinamens angegeben" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "unzulässiger Name" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s existiert bereits" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s existiert bereits auf der Festplatte" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "benenne %s um" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "Auch Unterseiten (SubPages) und Anhänge umbenennen" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Es kann immer nur ein Anhang gleichzeitig umbenannt werden." -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Bitte wählen Sie den Anhang aus, der umbenannt werden soll." -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "benenne %s in %s um" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "aktualisiert zum Umbenennen von %s nach %s" @@ -974,18 +977,19 @@ msgstr "Direkter Daten-Download" msgid "parse fail at line %d: %s" msgstr "Auswertungsfehler in Zeile %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "erstelle neue Seite %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "fehlender Parameter id" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "Vorlage %s nicht gefunden" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "Fehler beim Ablauf:" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "Vorlage (feed) nicht gefunden" #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1051,12 +1055,12 @@ msgstr "" msgid "bad file name %s" msgstr "fehlerhafter Dateiname %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "durchsuche %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1065,42 +1069,47 @@ msgstr "" "symbolischer Verweis im srcdir Pfad (%s) gefunden -- setzen Sie " "allow_symlinks_before_srcdir, um dies zu erlauben" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "überspringe fehlerhaften Dateinamen %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s hat mehrere mögliche Quellseiten" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "entferne alte Seite %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "erzeuge %s, die auf %s verweist" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "entferne %s, wird nicht länger von %s erzeugt" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "erzeuge %s, die von %s abhängt" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "erzeuge %s, um dessen Rückverweise zu aktualisieren" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: kann %s nicht erzeugen" @@ -1176,66 +1185,67 @@ msgstr "Aufruf: ikiwiki [Optionen] Quelle Ziel" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup Konfigurationsdatei" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "Aufruf: --set Variable=Wert" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "Aufruf: --set Variable=Wert" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "erzeuge Wrapper.." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "erzeuge Wiki neu.." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "aktualisiere Wiki.." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Diskussion" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Es muss eine URL zum Wiki mit --url angegeben werden, wenn --cgi verwandt " "wird" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" "Es können nicht mehrere Versionskontrollsystem-Erweiterungen verwandt werden" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "Laden der für %s benötigten externen Erweiterung fehlgeschlagen: %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Präprozessorschleife auf %s in Tiefe %i erkannt" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "ja" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "Sort::Naturally wird benötigt für title_natural sort" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "Unbekannter Sortierungstyp %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "Unbekannter Sortierungstyp %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "Kann die Seiten nicht zuordnen: %s" @@ -1260,6 +1270,18 @@ msgstr "Wer (Wiki-Konto oder OpenID) soll Administrator sein?" msgid "What is the domain name of the web server?" msgstr "Wie lautet der Domainname des Webservers?" +#~ msgid "failed to process" +#~ msgstr "Ablauf fehlgeschlagen" + +#~ msgid "nonexistant template %s" +#~ msgstr "nicht-vorhandene Vorlage %s" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime ist nicht implementiert" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "Sort::Naturally wird benötigt für title_natural sort" + #~ msgid "failed to read %s" #~ msgstr "lesen von %s fehlgeschlagen" diff --git a/po/es.po b/po/es.po index 413572866..a6f3a2c6b 100644 --- a/po/es.po +++ b/po/es.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: es\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2009-06-14 12:32+0200\n" "Last-Translator: Victor Moral \n" "Language-Team: \n" @@ -60,7 +60,7 @@ msgstr "Las preferencias se han guardado." msgid "You are banned." msgstr "Ha sido expulsado." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Error" @@ -142,7 +142,7 @@ msgstr "creando nueva página %s" msgid "deleting bucket.." msgstr "borrando el directorio.." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "completado" @@ -183,7 +183,7 @@ msgstr "nombre de archivo adjunto erróneo" msgid "attachment upload" msgstr "enviado el adjunto" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "creación de índice automática" @@ -217,55 +217,55 @@ msgstr "Un comentario debe tener algún contenido" msgid "Anonymous" msgstr "Anónimo" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "nombre de página erróneo" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "creando comentarios en la página %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "la página '%s' no existe, así que no se puede comentar sobre ella" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "los comentarios para la página '%s' están cerrados" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "comentario guardado a la espera de aprobación" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Su comentario será publicado después de que el moderador lo revise" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Añadir un comentario" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Comentario añadido: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "No está registrado como un administrador" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Aprobación de comentarios" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "aprobación de comentarios" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, fuzzy, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -275,7 +275,7 @@ msgstr[1] "Comentarios" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 #, fuzzy msgid "Comment" msgstr "Comentarios" @@ -306,14 +306,14 @@ msgstr "eliminando la antigua previsualización %s" msgid "%s is not an editable page" msgstr "la página %s no es modificable" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "creando página %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "modificando página %s" @@ -331,9 +331,11 @@ msgstr "falta indicar la coincidencia de páginas (match)" msgid "edittemplate %s registered for %s" msgstr "plantilla de edición %s registrada para %s" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "fallo en el proceso" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "se ha producido un error fatal mientras procesaba la plantilla:" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -362,18 +364,18 @@ msgstr "no encuentro páginas coincidentes: %s" msgid "%s is an attachment, not a page." msgstr "la página %s no es modificable" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "No puede cambiar %s" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "no puede actuar sobre un archivo con permisos %s" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "No puede cambiar los permisos de acceso de un archivo" @@ -460,12 +462,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "Añadir una entrada nueva titulada:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "la plantilla %s no existe " +msgid "template %s not found" +msgstr "no he encontrado la plantilla %s" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "No he encontrado el componente RPC::XML::Client, no envío señal alguna" @@ -495,18 +497,23 @@ 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:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "hoja de estilo no encontrada " -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "falta la página a donde redirigir" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "ciclo de redirección no permitido" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "los parámetros 'from' y 'to' son obligatorios" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Réplicas" @@ -524,10 +531,6 @@ msgstr "aprobación de comentarios" msgid "more" msgstr "ver más" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "la funcionalidad getctime no está incluida" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "Identificarse mediante " @@ -545,43 +548,43 @@ msgstr "Todas las páginas están referenciadas entre sí." msgid "bad or missing template" msgstr "plantilla errónea ó no existente" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Cuenta de usuario creada con éxito. Ahora puede identificarse." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Error creando la cuenta de usuario." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" "No tengo dirección de correo electrónica, así que no puedo enviar " "instrucciones para reiniciar la contraseña" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "No he podido enviar el mensaje de correo electrónico" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" "Las instrucciones para reiniciar la contraseña se le han enviado por correo " "electrónico" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "el url para reiniciar la contraseña es incorrecto" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "reinicio de contraseña denegado" @@ -611,94 +614,94 @@ msgstr "No he encontrado el componente LWP, no envío señal alguna" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, fuzzy, perl-format msgid "%s is not a valid language code" msgstr "%s no es un archivo" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, fuzzy, perl-format msgid "building %s" msgstr "Informaremos a %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, fuzzy, perl-format msgid "POT file (%s) does not exist" msgstr "No existe la página %s." -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "ha fallado la compilación del programa %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, fuzzy, perl-format msgid "failed to update %s" msgstr "ha fallado la compilación del programa %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "ha fallado la compilación del programa %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "dimensionamiento fallido: %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, fuzzy, perl-format msgid "failed to write %s" msgstr "dimensionamiento fallido: %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 #, fuzzy msgid "failed to translate" msgstr "no he podido ejecutar el programa dot" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -840,44 +843,44 @@ msgstr "%s no está en el directorio fuente por lo que no puede ser renombrado" msgid "no change to the file name was specified" msgstr "no se ha indicado cambio alguno en el nombre del archivo" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "nombre no válido" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s ya existe" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s ya existe en el disco" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "cambiando de nombre %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "También cambia de nombre las subpáginas y los adjuntos" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Únicamente un adjunto puede ser renombrado a la vez." -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Por favor, seleccione el adjunto al que cambiar el nombre." -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "%s cambia de nombre a %s" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "actualizado el cambio de nombre de %s a %s" @@ -979,18 +982,19 @@ msgstr "Enlace directo para descarga" msgid "parse fail at line %d: %s" msgstr "error de análisis en la línea %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "creando nueva página %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "falta el parámetro \"id\"" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "no he encontrado la plantilla %s" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "se ha producido un error fatal mientras procesaba la plantilla:" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "fuente de datos no encontrada" #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1055,12 +1059,12 @@ msgstr "no puedo determinar el identificador de un usuario no fiable como %s" msgid "bad file name %s" msgstr "el nombre de archivo %s es erróneo" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "explorando %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1069,44 +1073,49 @@ msgstr "" "encontrado un enlace simbólico en la ruta del directorio fuente (%s) -- use " "la directiva allow_symlinks_before_srcdir para permitir la acción" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "ignorando el archivo %s porque su nombre no es correcto" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s tiene mútiples páginas fuente posibles" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "eliminando la antigua página %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "convirtiendo la página %s, la cual referencia a %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "eliminando la página %s puesto que ya no se deriva de %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "convirtiendo la página %s, la cual depende de %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "" "convirtiendo la página %s para actualizar la lista de páginas que hacen " "referencia a ella." -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: no puedo convertir la página %s" @@ -1181,69 +1190,68 @@ msgstr "uso: ikiwiki [opciones] origen destino" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup archivo_de_configuración" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "uso: --set variable=valor" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "uso: --set variable=valor" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "generando programas auxiliares.." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "reconstruyendo el wiki.." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "actualizando el wiki.." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Comentarios" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Es obligatorio especificar un url al wiki con el parámetro --url si se " "utiliza el parámetro --cgi" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "no puedo emplear varios complementos rcs" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "no he podido cargar el complemento externo %s necesario para %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "" "se ha detectado en la página %s un bucle de preprocesado en la iteración " "número %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "si" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "" -"Se necesita el módulo Sort::Naturally para el tipo de ordenación " -"title_natural" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "no conozco este tipo de ordenación %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "no conozco este tipo de ordenación %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "no encuentro páginas coincidentes: %s" @@ -1271,6 +1279,20 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "¿ Cuál es el dominio para el servidor web ?" +#~ msgid "failed to process" +#~ msgstr "fallo en el proceso" + +#~ msgid "nonexistant template %s" +#~ msgstr "la plantilla %s no existe " + +#~ msgid "getctime not implemented" +#~ msgstr "la funcionalidad getctime no está incluida" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "" +#~ "Se necesita el módulo Sort::Naturally para el tipo de ordenación " +#~ "title_natural" + #, fuzzy #~ msgid "failed to read %s" #~ msgstr "no puedo leer de %s: %s " diff --git a/po/fr.po b/po/fr.po index 6be9482ce..b98a498c0 100644 --- a/po/fr.po +++ b/po/fr.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 3.141\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2009-08-17 10:06+0200\n" "Last-Translator: Philippe Batailler \n" "Language-Team: French \n" @@ -57,7 +57,7 @@ msgstr "Les préférences ont été enregistrées." msgid "You are banned." msgstr "Vous avez été banni." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Erreur" @@ -138,7 +138,7 @@ msgstr "Création de la nouvelle page %s" msgid "deleting bucket.." msgstr "Suppression du compartiment S3 (« bucket »)..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "Terminé" @@ -176,7 +176,7 @@ msgstr "Nom de la pièce jointe incorrect" msgid "attachment upload" msgstr "Envoi de la pièce jointe" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "Génération de l'index automatique" @@ -210,55 +210,55 @@ msgstr "Un commentaire doit avoir un contenu." msgid "Anonymous" msgstr "Anonyme" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "Nom de page incorrect" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "Faire un commentaire sur %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "La page '%s' n'existe pas, commentaire impossible." -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "Le commentaire pour la page '%s' est terminé." -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "Le commentaire a été enregistré, en attente de « modération »" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Votre commentaire sera publié après vérification par le modérateur" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Commentaire ajouté" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Commentaire ajouté : %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "Vous n'êtes pas authentifié comme administrateur" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Modération du commentaire" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "modération du commentaire" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, fuzzy, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -268,7 +268,7 @@ msgstr[1] "Commentaires" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 #, fuzzy msgid "Comment" msgstr "Commentaires" @@ -299,14 +299,14 @@ msgstr "Suppression de l'ancienne prévisualisation %s" msgid "%s is not an editable page" msgstr "%s n'est pas une page éditable" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "Création de %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "Édition de %s" @@ -324,9 +324,11 @@ msgstr "correspondance non indiquée" msgid "edittemplate %s registered for %s" msgstr "edittemplate %s enregistré pour %s" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "Échec du traitement" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "Échec du traitement :" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -354,18 +356,18 @@ msgstr "Ce n'est pas une page." msgid "%s is an attachment, not a page." msgstr "%s est une pièce jointe, pas une page." -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "Vous n'êtes pas autorisé à modifier %s" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "Vous ne pouvez pas modifier un fichier dont le mode est %s" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "Vous n'êtes pas autorisé à modifier le mode des fichiers" @@ -452,12 +454,12 @@ msgstr "Les paramètres %s et %s ne peuvent être utilisés ensemble." msgid "Add a new post titled:" msgstr "Ajouter un nouvel article dont le titre est :" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "Le modèle de page %s n'existe pas" +msgid "template %s not found" +msgstr "Modèle de page %s introuvable" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client introuvable, pas de réponse au ping" @@ -486,18 +488,23 @@ msgstr "" "Échec du chargement du module Perl Markdown.pm (%s) ou de /usr/bin/markdown " "(%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "Feuille de style introuvable " -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "Page de redirection introuvable" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "Redirection cyclique non autorisée" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "les paramètres « from » et « to » sont nécessaires." + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Miroirs" @@ -515,10 +522,6 @@ msgstr "modération du commentaire" msgid "more" msgstr "lire la suite" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime n'est pas implémenté" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "S'identifier en tant que" @@ -535,43 +538,43 @@ msgstr "Toutes les pages sont liées à d'autres pages." msgid "bad or missing template" msgstr "Modèle de page incorrect ou manquant" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Le compte a été créé. Vous pouvez maintenant vous identifier." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Erreur lors de la création du compte." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" "Aucune adresse indiquée. Impossible d'envoyer les instructions pour " "réinitialiser le mot de passe." -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Impossible d'envoyer un courriel" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" "Vous avez reçu un message contenant les instructions pour réinitialiser le " "mot de passe" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "Adresse pour la réinitialisation du mot de passe incorrecte" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "réinitialisation du mot de passe refusée" @@ -603,12 +606,12 @@ msgstr "" "Note : ancienne version de po4a détectée. Il est recommandé d'installer la " "version 0.35." -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "%s n'est pas un code de langue valable" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" @@ -616,7 +619,7 @@ msgstr "" "%s n'est pas une valeur correcte pour po_link_to, retour à la valeur par " "défaut." -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" @@ -624,23 +627,23 @@ msgstr "" "po_link_to=negotiated nécessite que usedirs soit activé, retour à " "po_link_to=default." -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" "Reconstruction de toutes les pages pour corriger les titres (greffon " "« meta »)." -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "construction de %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "Fichiers PO mis à jour." -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -648,7 +651,7 @@ msgstr "" "Impossible de supprimer cette traduction. Si la page maître est supprimée, " "alors ses traductions seront supprimées." -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -656,50 +659,50 @@ msgstr "" "Impossible de renommer cette traduction. Si la page maître est renommée, " "alors ses traductions pourront être renommées." -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "Le fichier POT %s n'existe pas." -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "Impossible de copier le fichier PO underlay dans %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "Impossible de mettre à jour %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "Impossible de copier le fichier POT dans %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "N/A" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "Impossible de traduire %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "Fichiers PO obsolètes supprimés." -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "Impossible de modifier %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "Impossible de traduire" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "Données gettext incorrectes, retour à la page précédente pour la poursuite " @@ -844,44 +847,44 @@ msgstr "%s n'est pas dans srcdir. Impossible de le renommer" msgid "no change to the file name was specified" msgstr "Aucun changement dans le nom du fichier n'a été spécifié" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "Appellation interdite" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s existe déjà" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s existe déjà sur le disque" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "%s renommé" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "« SubPages » et attachements renommés." -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Modification de pièce jointe : une seule à la fois" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Veuillez sélectionner la pièce jointe à renommer" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "Renomme %s en %s" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "mise à jour, suite au changement de %s en %s" @@ -979,18 +982,19 @@ msgstr "Téléchargement direct des données" msgid "parse fail at line %d: %s" msgstr "Erreur d'analyse à la ligne %d : %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "Création de la nouvelle page %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "Paramètre d'identification manquant" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "Modèle de page %s introuvable" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "Échec du traitement :" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "Flux introuvable " #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1054,12 +1058,12 @@ msgstr "" msgid "bad file name %s" msgstr "Nom de fichier incorrect %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "Examen de %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1068,42 +1072,47 @@ msgstr "" "Lien symbolique trouvé dans l'adresse de srcdir (%s) -- pour l'autoriser, " "activez le paramètre « allow_symlinks_before_srcdir »." -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "Omission du fichier au nom incorrect %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s peut être associé à plusieurs pages source." -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "Suppression de l'ancienne page %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "Reconstruction de %s, qui est lié à %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "Suppression de %s, qui n'est plus rendu par %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "Reconstruction de %s, qui dépend de %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "Reconstruction de %s, afin de mettre à jour ses rétroliens" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki : impossible de reconstruire %s" @@ -1181,64 +1190,65 @@ msgstr "Syntaxe : ikiwiki [options] source destination" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup fichier de configuration" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "Syntaxe : -- set var=valeur" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "Syntaxe : -- set var=valeur" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "Création des fichiers CGI..." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "Reconstruction du wiki..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "Rafraîchissement du wiki..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Discussion" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Vous devez indiquer l'URL du wiki par --url lors de l'utilisation de --cgi" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "Impossible d'utiliser plusieurs systèmes de contrôle des versions" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "Impossible de charger le greffon externe nécessaire au greffon %s : %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "Une boucle de prétraitement a été détectée sur %s à hauteur de %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "oui" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "Sort::Naturally est nécessaire pour un tri « title_natural »" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "Type de tri %s inconnu" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "Type de tri %s inconnu" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "Impossible de trouver les pages %s" @@ -1263,6 +1273,18 @@ msgstr "Identifiant de l'administrateur (utilisateur du wiki ou openid) :" msgid "What is the domain name of the web server?" msgstr "Nom de domaine du serveur HTTP :" +#~ msgid "failed to process" +#~ msgstr "Échec du traitement" + +#~ msgid "nonexistant template %s" +#~ msgstr "Le modèle de page %s n'existe pas" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime n'est pas implémenté" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "Sort::Naturally est nécessaire pour un tri « title_natural »" + #~ msgid "failed to read %s" #~ msgstr "Impossible de lire %s" diff --git a/po/gu.po b/po/gu.po index d4bfd42c0..4f652358d 100644 --- a/po/gu.po +++ b/po/gu.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki-gu\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2007-01-11 16:05+0530\n" "Last-Translator: Kartik Mistry \n" "Language-Team: Gujarati \n" @@ -54,7 +54,7 @@ msgstr "પ્રાથમિકતાઓ સંગ્રહાઇ." msgid "You are banned." msgstr "તમારા પર પ્રતિબંધ છે." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "ક્ષતિ" @@ -135,7 +135,7 @@ msgstr "નવું પાનું %s બનાવે છે" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "સંપૂર્ણ" @@ -176,7 +176,7 @@ msgstr "" msgid "attachment upload" msgstr "" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "" @@ -208,55 +208,55 @@ msgstr "" msgid "Anonymous" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, fuzzy, perl-format msgid "commenting on %s" msgstr "%s બનાવે છે" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -266,7 +266,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "" @@ -296,14 +296,14 @@ msgstr "જુનાં પાનાં દૂર કરે છે %s" msgid "%s is not an editable page" msgstr "%s એ સુધારી શકાય તેવું પાનું નથી" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "%s બનાવે છે" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "%s સુધારે છે" @@ -323,9 +323,10 @@ msgstr "આવરણ ફાઇલનામ સ્પષ્ટ કરેલ ન msgid "edittemplate %s registered for %s" msgstr "" -#: ../IkiWiki/Plugin/edittemplate.pm:138 +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 #, fuzzy -msgid "failed to process" +msgid "failed to process template:" msgstr "ક્રિયા કરવામાં નિષ્ફળ:" #: ../IkiWiki/Plugin/format.pm:30 @@ -356,18 +357,18 @@ msgstr "વાંચી શકાતી નથી %s: %s" msgid "%s is an attachment, not a page." msgstr "%s એ સુધારી શકાય તેવું પાનું નથી" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "" @@ -453,12 +454,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "આ શિર્ષકથી નવું પોસ્ટ ઉમેરો:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "અસ્તિત્વમાં ન હોય તેવું ટેમ્પલેટ %s" +msgid "template %s not found" +msgstr "ટેમ્પલેટ %s મળ્યું નહી" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client મળ્યું નહી, પિંગ કરવામાં આવતું નથી" @@ -485,20 +486,24 @@ msgstr "" 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:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "સ્ટાઇલશીટ મળ્યું નહી" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 #, fuzzy msgid "redir page not found" msgstr "ફીડ મળ્યું નહી" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 #, fuzzy msgid "redir cycle is not allowed" msgstr "ફીડ મળ્યું નહી" +#: ../IkiWiki/Plugin/meta.pm:383 +msgid "sort=meta requires a parameter" +msgstr "" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "મિરરો" @@ -515,10 +520,6 @@ msgstr "" msgid "more" msgstr "વધુ" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime અમલમાં મૂકાયેલ નથી" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "" @@ -536,39 +537,39 @@ msgstr "બધા પાનાંઓ બીજા પાનાંઓ વડે msgid "bad or missing template" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "ખાતું બનાવવાનું સફળ. તમે હવે લોગઇન કરી શકો છો." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "ખાતું બનાવવામાં ક્ષતિ." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "મેઇલ મોકલવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "" @@ -599,94 +600,94 @@ msgstr "RPC::XML::Client મળ્યું નહી, પિંગ કરવા msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, fuzzy, perl-format msgid "%s is not a valid language code" msgstr "%s એ સુધારી શકાય તેવું પાનું નથી" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, fuzzy, perl-format msgid "building %s" msgstr "%s સુધારે છે" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "%s કમ્પાઇલ કરવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, fuzzy, perl-format msgid "failed to update %s" msgstr "%s કમ્પાઇલ કરવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "%s કમ્પાઇલ કરવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "માપ બદલવામાં નિષ્ફળ: %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, fuzzy, perl-format msgid "failed to write %s" msgstr "%s લખવામાં નિષ્ફળ: %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 #, fuzzy msgid "failed to translate" msgstr "ડોટ ચલાવવામાં નિષ્ફળ" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -831,44 +832,44 @@ msgstr "" msgid "no change to the file name was specified" msgstr "આવરણ ફાઇલનામ સ્પષ્ટ કરેલ નથી" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, fuzzy, perl-format msgid "rename %s" msgstr "રેન્ડર કરે છે %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, fuzzy, perl-format msgid "update for rename of %s to %s" msgstr "%s નો સુધારો %s નાં %s વડે" @@ -970,19 +971,20 @@ msgstr "સીધી માહિતી ડાઉનલોડ" msgid "parse fail at line %d: %s" msgstr "ઉકેલવાનું લીટી %d પર નિષ્ફળ: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "નવું પાનું %s બનાવે છે" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "ખોવાયેલ આઇડી વિકલ્પ" #: ../IkiWiki/Plugin/template.pm:47 #, perl-format -msgid "template %s not found" +msgid "%s not found" msgstr "ટેમ્પલેટ %s મળ્યું નહી" -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "ક્રિયા કરવામાં નિષ્ફળ:" - #: ../IkiWiki/Plugin/teximg.pm:72 #, fuzzy msgid "missing tex code" @@ -1042,54 +1044,59 @@ msgstr "" msgid "bad file name %s" msgstr "ખરાબ ફાઇલ નામ છોડી દે છે %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "%s શોધે છે" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "ખરાબ ફાઇલ નામ છોડી દે છે %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "જુનાં પાનાં દૂર કરે છે %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "રેન્ડર કરે છે %s, જે %s સાથે જોડાણ ધરાવે છે" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "દૂર કરે છે %s, હવે %s વડે રેન્ડર કરાતું નથી" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "રેન્ડર કરે છે %s, જે %s પર આધારિત છે" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "રેન્ડર કરે છે %s, તેનાં પાછળનાં જોડાણો સુધારવા માટે" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: %s રેન્ડર કરી શકાતું નથી" @@ -1162,62 +1169,63 @@ msgstr "ઉપયોગ: ikiwiki [વિકલ્પો] source dest" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 msgid "usage: --set-yaml var=value" msgstr "" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "આવરણ બનાવે છે.." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "વીકી ફરીથી બનાવે છે.." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "વીકીને તાજી કરે છે.." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "ચર્ચા" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "જ્યારે --cgi ઉપયોગ કરતાં હોય ત્યારે વીકીનું યુઆરએલ સ્પષ્ટ કરવું જ પડશે" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "%s પર શોધાયેલ લુપ %s પર ચલાવે છે %i ઉંડાણ પર" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "અજાણ્યો ગોઠવણી પ્રકાર %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "અજાણ્યો ગોઠવણી પ્રકાર %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "વાંચી શકાતી નથી %s: %s" @@ -1242,6 +1250,16 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#, fuzzy +#~ msgid "failed to process" +#~ msgstr "ક્રિયા કરવામાં નિષ્ફળ:" + +#~ msgid "nonexistant template %s" +#~ msgstr "અસ્તિત્વમાં ન હોય તેવું ટેમ્પલેટ %s" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime અમલમાં મૂકાયેલ નથી" + #, fuzzy #~ msgid "failed to read %s" #~ msgstr "%s વાંચવામાં નિષ્ફળ: %s" @@ -1295,9 +1313,6 @@ msgstr "" #~ msgstr "" #~ "REV ગોઠવેલ નથી, svn post-commit hook માંથી ચાલતું નથી, નોંધ મોકલી શકાશે નહી" -#~ msgid "%s not found" -#~ msgstr "ટેમ્પલેટ %s મળ્યું નહી" - #~ msgid "What's this?" #~ msgstr "આ શું છે?" diff --git a/po/ikiwiki.pot b/po/ikiwiki.pot index c2f4e24a9..638e724d5 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: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -55,7 +55,7 @@ msgstr "" msgid "You are banned." msgstr "" -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "" @@ -136,7 +136,7 @@ msgstr "" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "" @@ -174,7 +174,7 @@ msgstr "" msgid "attachment upload" msgstr "" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "" @@ -206,55 +206,55 @@ msgstr "" msgid "Anonymous" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -264,7 +264,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "" @@ -294,14 +294,14 @@ msgstr "" msgid "%s is not an editable page" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "" @@ -319,8 +319,9 @@ msgstr "" msgid "edittemplate %s registered for %s" msgstr "" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +msgid "failed to process template:" msgstr "" #: ../IkiWiki/Plugin/format.pm:30 @@ -349,18 +350,18 @@ msgstr "" msgid "%s is an attachment, not a page." msgstr "" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "" @@ -442,12 +443,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" +msgid "template %s not found" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "" @@ -474,18 +475,22 @@ msgstr "" msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "" +#: ../IkiWiki/Plugin/meta.pm:383 +msgid "sort=meta requires a parameter" +msgstr "" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "" @@ -502,10 +507,6 @@ msgstr "" msgid "more" msgstr "" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "" @@ -522,39 +523,39 @@ msgstr "" msgid "bad or missing template" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "" @@ -584,93 +585,93 @@ msgstr "" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -812,44 +813,44 @@ msgstr "" msgid "no change to the file name was specified" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "" @@ -947,17 +948,18 @@ msgstr "" msgid "parse fail at line %d: %s" msgstr "" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, perl-format +msgid "creating tag page %s" +msgstr "" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "" #: ../IkiWiki/Plugin/template.pm:47 #, perl-format -msgid "template %s not found" -msgstr "" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" +msgid "%s not found" msgstr "" #: ../IkiWiki/Plugin/teximg.pm:72 @@ -1017,54 +1019,59 @@ msgstr "" msgid "bad file name %s" msgstr "" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." msgstr "" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:434 +#, perl-format +msgid "removing obsolete %s" +msgstr "" + +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "" @@ -1137,62 +1144,63 @@ msgstr "" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 msgid "usage: --set-yaml var=value" msgstr "" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "" -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "" -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "" -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" +#: ../IkiWiki.pm:2009 +#, perl-format +msgid "invalid sort type %s" msgstr "" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "" diff --git a/po/it.po b/po/it.po index b1b3dbd55..45efc2d3f 100644 --- a/po/it.po +++ b/po/it.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: Ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2009-08-16 11:01+0100\n" "Last-Translator: Luca Bruno \n" "Language-Team: Italian TP \n" @@ -53,7 +53,7 @@ msgstr "Preferenze salvate." msgid "You are banned." msgstr "Avete ricevuto un ban." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Errore" @@ -135,7 +135,7 @@ msgstr "creazione nuova pagina %s" msgid "deleting bucket.." msgstr "eliminazione contenitore..." -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "fatto" @@ -173,7 +173,7 @@ msgstr "nome file dell'allegato non valido" msgid "attachment upload" msgstr "carica allegato" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "generazione automatica dell'indice" @@ -207,55 +207,55 @@ msgstr "i commenti devono avere un contenuto" msgid "Anonymous" msgstr "Anonimo" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "nome pagina non valido" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, perl-format msgid "commenting on %s" msgstr "commento su %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "la pagina «%s» non esiste, impossibile commentarla" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "i commenti per la pagina «%s» sono chiusi" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "commento trattenuto per moderazione" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "Il commento sarà pubblicato dopo la verifica del moderatore" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "Aggiunto commento" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "Aggiunto commento: %s" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "non siete autenticati come amministratore" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "Moderazione commenti" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "moderazione commento" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, fuzzy, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -265,7 +265,7 @@ msgstr[1] "Commenti" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 #, fuzzy msgid "Comment" msgstr "Commenti" @@ -296,14 +296,14 @@ msgstr "rimozione vecchia anteprima %s" msgid "%s is not an editable page" msgstr "%s non è una pagina modificabile" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "creazione %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "modifica %s" @@ -321,9 +321,11 @@ msgstr "corrispondenza non specificata" msgid "edittemplate %s registered for %s" msgstr "edittemplate %s registrato per %s" -#: ../IkiWiki/Plugin/edittemplate.pm:138 -msgid "failed to process" -msgstr "errore nell'elaborazione" +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 +#, fuzzy +msgid "failed to process template:" +msgstr "errore nell'elaborazione:" #: ../IkiWiki/Plugin/format.pm:30 msgid "must specify format and text" @@ -351,18 +353,18 @@ msgstr "non è una pagina" msgid "%s is an attachment, not a page." msgstr "%s è un allegato, non una pagina." -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "non è permesso modificare %s" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "non è permesso lavorare su un file in modalità %s" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "non è permesso cambiare la modalità del file" @@ -447,12 +449,12 @@ msgstr "i parametri %s e %s non possono essere usati insieme" msgid "Add a new post titled:" msgstr "Aggiungere un nuovo articolo dal titolo:" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "modello %s non esistente" +msgid "template %s not found" +msgstr "modello %s non trovato" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client non trovato, impossibile inviare ping" @@ -481,18 +483,23 @@ msgid "failed to load Markdown.pm perl module (%s) or /usr/bin/markdown (%s)" msgstr "" "impossibile caricare il modulo perl Markdown.pm (%s) o /usr/bin/markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 msgid "stylesheet not found" msgstr "foglio di stile non trovato" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 msgid "redir page not found" msgstr "pagina di reindirizzamento non trovata" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 msgid "redir cycle is not allowed" msgstr "ciclo di reindirizzamento non ammesso" +#: ../IkiWiki/Plugin/meta.pm:383 +#, fuzzy +msgid "sort=meta requires a parameter" +msgstr "sono richiesti i parametri \"to\" e \"from\"" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Mirror" @@ -510,10 +517,6 @@ msgstr "moderazione commento" msgid "more" msgstr "altro" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime non implementata" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "Accedi tramite" @@ -530,42 +533,42 @@ msgstr "Tutte le pagine hanno collegamenti in entrata da altre pagine." msgid "bad or missing template" msgstr "modello errato o mancante" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Account creato con successo. È ora possibile effettuare l'accesso." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Errore nella creazione dell'account." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" "Nessun indirizzo email, impossibile inviare per email le istruzioni per " "reimpostare la password." -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Impossibile spedire il messaggio" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" "Il messaggio con le istruzioni per reimpostare la password è stato inviato." -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "url per il reset della password non corretto" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "reset della password non permesso" @@ -597,19 +600,19 @@ msgstr "" "attenzione: è presente un vecchio po4a. Si raccomanda di aggiornare almeno " "alla versione 0.35." -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "%s non è una codifica di lingua valida" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" "%s non è un valore per po_link_to valido, verrà utilizzato po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" @@ -617,21 +620,21 @@ msgstr "" "po_link_to=negotiated richiede che venga abilitato usedirs, verrà utilizzato " "po_link_to=default" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "rigenerazione di tutte le pagine per sistemare i meta-titoli" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, perl-format msgid "building %s" msgstr "compilazione di %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "file PO aggiornati" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." @@ -639,7 +642,7 @@ msgstr "" "Impossibile eliminare una traduzione. Tuttavia, se la pagina principale è " "stata eliminata anche le traduzioni lo saranno." -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." @@ -647,50 +650,50 @@ msgstr "" "Impossibile rinominare una traduzione. Tuttavia, se la pagina principale è " "stata rinominata anche le traduzioni lo saranno." -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "Il file POT (%s) non esiste" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, perl-format msgid "failed to copy underlay PO file to %s" msgstr "impossibile copiare il file PO di underlay in %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, perl-format msgid "failed to update %s" msgstr "impossibile aggiornare %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, perl-format msgid "failed to copy the POT file to %s" msgstr "impossibile copiare il file POT in %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "N/D" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, perl-format msgid "failed to translate %s" msgstr "impossibile tradurre %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "file PO obsoleti rimossi" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, perl-format msgid "failed to write %s" msgstr "impossibile scrivere %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 msgid "failed to translate" msgstr "impossibile tradurre" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" "dati gettext non validi, tornare alle pagina precedente per continuare le " @@ -836,44 +839,44 @@ msgstr "%s non è in src, quindi non può essere rinominato" msgid "no change to the file name was specified" msgstr "non è stata specificata nessuna modifica al nome del file" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "nome non valido" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "%s esiste già" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "%s già presente su disco" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, perl-format msgid "rename %s" msgstr "rinomina di %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "Rinomina anche SottoPagine e allegati" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "Si può rinominare un solo allegato alla volta." -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "Selezionare l'allegato da rinominare." -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "rinomina %s in %s" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, perl-format msgid "update for rename of %s to %s" msgstr "aggiornamento per rinomina di %s in %s" @@ -971,18 +974,19 @@ msgstr "Scaricamento diretto dei dati" msgid "parse fail at line %d: %s" msgstr "errore di interpretazione alla riga %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "creazione nuova pagina %s" + +#: ../IkiWiki/Plugin/template.pm:33 msgid "missing id parameter" msgstr "parametro id mancante" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "modello %s non trovato" - -#: ../IkiWiki/Plugin/template.pm:66 -msgid "failed to process:" -msgstr "errore nell'elaborazione:" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "notiziario non trovato" #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" @@ -1045,12 +1049,12 @@ msgstr "impossibile determinare l'id del committer non fidato %s" msgid "bad file name %s" msgstr "nome file %s scorretto" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "scansione %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " @@ -1059,42 +1063,47 @@ msgstr "" "collegamento simbolico trovato nel percorso srcdir (%s) -- impostare " "allow_symlinks_before_srcdir per abilitare questa configurazione" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "ignorato il file dal nome scorretto %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "%s ha diverse pagine sorgenti possibili" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "rimozione della vecchia pagina %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, perl-format msgid "building %s, which links to %s" msgstr "compilazione di %s, che è collegato a %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, perl-format msgid "removing %s, no longer built by %s" msgstr "rimozione di %s, non più richiesto da %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, perl-format msgid "building %s, which depends on %s" msgstr "compilazione di %s, che dipende da %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, perl-format msgid "building %s, to update its backlinks" msgstr "compilazione di %s, per aggiornare i collegamenti ai precedenti" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: impossibile compilare %s" @@ -1168,63 +1177,64 @@ msgstr "utilizzo: ikiwiki [opzioni] sorgente destinazione" msgid " ikiwiki --setup configfile" msgstr " ikiwiki --setup configfile" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "utilizzo: --set var=valore" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 #, fuzzy msgid "usage: --set-yaml var=value" msgstr "utilizzo: --set var=valore" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "generazione contenitori..." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "ricostruzione wiki..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "aggiornamento wiki..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Discussione" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Occorre specificare l'url del wiki tramite --url quando si usa --cgi" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "impossibile usare più plugin rcs" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "impossibile caricare il plugin esterno per il plugin %s: %s" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "ciclo del preprocessore individuato su %s alla profondità %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "sì" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "Sort::Naturally è richiesto per l'ordinamento title_natural" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "ordinamento %s sconosciuto" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "ordinamento %s sconosciuto" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, perl-format msgid "cannot match pages: %s" msgstr "impossibile trovare pagine corrispondenti: %s" @@ -1249,6 +1259,18 @@ msgstr "Quale utente (openid o del wiki) sarà l'amministratore?" msgid "What is the domain name of the web server?" msgstr "Qual è il nome del dominio del server web?" +#~ msgid "failed to process" +#~ msgstr "errore nell'elaborazione" + +#~ msgid "nonexistant template %s" +#~ msgstr "modello %s non esistente" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime non implementata" + +#~ msgid "Sort::Naturally needed for title_natural sort" +#~ msgstr "Sort::Naturally è richiesto per l'ordinamento title_natural" + #~ msgid "failed to read %s" #~ msgstr "impossibile leggere %s" diff --git a/po/pl.po b/po/pl.po index 9fb3cacc0..837c5acd2 100644 --- a/po/pl.po +++ b/po/pl.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki 1.51\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2007-04-27 22:05+0200\n" "Last-Translator: Pawel Tecza \n" "Language-Team: Debian L10n Polish \n" @@ -57,7 +57,7 @@ msgstr "Preferencje zapisane." msgid "You are banned." msgstr "Twój dostęp został zabroniony przez administratora." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Błąd" @@ -139,7 +139,7 @@ msgstr "tworzenie nowej strony %s" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "gotowe" @@ -180,7 +180,7 @@ msgstr "" msgid "attachment upload" msgstr "" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "" @@ -212,55 +212,55 @@ msgstr "" msgid "Anonymous" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, fuzzy, perl-format msgid "commenting on %s" msgstr "tworzenie %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -270,7 +270,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "" @@ -300,14 +300,14 @@ msgstr "usuwanie starej strony %s" msgid "%s is not an editable page" msgstr "Strona %s nie może być edytowana" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "tworzenie %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "edycja %s" @@ -327,9 +327,10 @@ msgstr "nieokreślona nazwa pliku osłony" msgid "edittemplate %s registered for %s" msgstr "" -#: ../IkiWiki/Plugin/edittemplate.pm:138 +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 #, fuzzy -msgid "failed to process" +msgid "failed to process template:" msgstr "awaria w trakcie przetwarzania:" #: ../IkiWiki/Plugin/format.pm:30 @@ -360,18 +361,18 @@ msgstr "awaria w trakcie odczytu %s: %s" msgid "%s is an attachment, not a page." msgstr "Strona %s nie może być edytowana" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "" @@ -460,12 +461,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "Tytuł nowego wpisu" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "brakujący szablon %s" +msgid "template %s not found" +msgstr "nieznaleziony szablon %s" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "Nieznaleziony moduł RPC::XML::Client, brak możliwości pingowania" @@ -497,21 +498,25 @@ msgstr "" "Awaria w trakcie ładowania perlowego modułu Markdown.pm (%s) lub " "uruchamiania programu /usr/bin/markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 #, fuzzy msgid "stylesheet not found" msgstr "nieznaleziony szablon ze stylami CSS" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 #, fuzzy msgid "redir page not found" msgstr "nieznaleziony kanał RSS" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 #, fuzzy msgid "redir cycle is not allowed" msgstr "nieznaleziony kanał RSS" +#: ../IkiWiki/Plugin/meta.pm:383 +msgid "sort=meta requires a parameter" +msgstr "" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Kopie lustrzane" @@ -528,10 +533,6 @@ msgstr "" msgid "more" msgstr "więcej" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "niedostępna funkcja getctime" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "" @@ -549,39 +550,39 @@ msgstr "Dla każdej strony istnieje odnośnik z innej strony" msgid "bad or missing template" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Konto założone pomyślnie. Teraz można zalogować się." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Błąd w trakcie zakładania konta." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Awaria w trakcie wysyłania wiadomości" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "" @@ -612,94 +613,94 @@ msgstr "Nieznaleziony moduł RPC::XML::Client, brak możliwości pingowania" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, fuzzy, perl-format msgid "%s is not a valid language code" msgstr "Strona %s nie może być edytowana" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, fuzzy, perl-format msgid "building %s" msgstr "edycja %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "awaria w trakcie kompilowania %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, fuzzy, perl-format msgid "failed to update %s" msgstr "awaria w trakcie kompilowania %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "awaria w trakcie kompilowania %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "awaria w trakcie zmiany rozmiaru: %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, fuzzy, perl-format msgid "failed to write %s" msgstr "awaria w trakcie zapisu %s: %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 #, fuzzy msgid "failed to translate" msgstr "awaria w trakcie uruchamiania dot" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -846,44 +847,44 @@ msgstr "" msgid "no change to the file name was specified" msgstr "nieokreślona nazwa pliku osłony" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, fuzzy, perl-format msgid "rename %s" msgstr "renderowanie %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, fuzzy, perl-format msgid "update for rename of %s to %s" msgstr "aktualizacja stron wiki %s: %s przez użytkownika %s" @@ -990,20 +991,20 @@ msgstr "Bezpośrednie pobieranie danych" msgid "parse fail at line %d: %s" msgstr "awaria w trakcie przetwarzania linii %d: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "tworzenie nowej strony %s" + +#: ../IkiWiki/Plugin/template.pm:33 #, fuzzy msgid "missing id parameter" msgstr "brakujący parametr id" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" -msgstr "nieznaleziony szablon %s" - -#: ../IkiWiki/Plugin/template.pm:66 -#, fuzzy -msgid "failed to process:" -msgstr "awaria w trakcie przetwarzania:" +#, fuzzy, perl-format +msgid "%s not found" +msgstr "nie znaleziono %s" #: ../IkiWiki/Plugin/teximg.pm:72 #, fuzzy @@ -1064,54 +1065,59 @@ msgstr "" msgid "bad file name %s" msgstr "pomijanie nieprawidłowej nazwy pliku %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "skanowanie %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "pomijanie nieprawidłowej nazwy pliku %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "usuwanie starej strony %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "renderowanie %s z odnośnikiem do %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "usuwanie %s nie tworzonego już przez %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "renderowanie %s zależącego od %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "renderowanie %s w celu aktualizacji powrotnych odnośników" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: awaria w trakcie tworzenia %s" @@ -1184,64 +1190,65 @@ msgstr "użycie: ikiwiki [parametry] źródło cel" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 msgid "usage: --set-yaml var=value" msgstr "" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "tworzenie osłon..." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "przebudowywanie wiki..." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "odświeżanie wiki..." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Dyskusja" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "" "Użycie parametru --cgi wymaga podania adresu URL do wiki za pomocą parametru " "--url" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "polecenie preprocesora %s wykryte w %s na głębokości %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "nieznany sposób sortowania %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "nieznany sposób sortowania %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "awaria w trakcie odczytu %s: %s" @@ -1266,6 +1273,16 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#, fuzzy +#~ msgid "failed to process" +#~ msgstr "awaria w trakcie przetwarzania:" + +#~ msgid "nonexistant template %s" +#~ msgstr "brakujący szablon %s" + +#~ msgid "getctime not implemented" +#~ msgstr "niedostępna funkcja getctime" + #, fuzzy #~ msgid "failed to read %s" #~ msgstr "awaria w trakcie odczytu %s: %s" @@ -1323,10 +1340,6 @@ msgstr "" #~ "Brak możliwości wysłania powiadomień od Subversion przez \"haczyk\" post-" #~ "commit z powodu nieustawionego parametru REV" -#, fuzzy -#~ msgid "%s not found" -#~ msgstr "nie znaleziono %s" - #~ msgid "What's this?" #~ msgstr "Więcej o OpenID" diff --git a/po/sv.po b/po/sv.po index 0d4c6202e..2cba1cc2e 100644 --- a/po/sv.po +++ b/po/sv.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: ikiwiki\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2010-04-03 14:18-0400\n" +"POT-Creation-Date: 2010-04-24 16:15-0400\n" "PO-Revision-Date: 2007-01-10 23:47+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -54,7 +54,7 @@ msgstr "Inställningar sparades." msgid "You are banned." msgstr "Du är bannlyst." -#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1296 +#: ../IkiWiki/CGI.pm:411 ../IkiWiki/CGI.pm:412 ../IkiWiki.pm:1291 msgid "Error" msgstr "Fel" @@ -136,7 +136,7 @@ msgstr "skapar nya sidan %s" msgid "deleting bucket.." msgstr "" -#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:230 +#: ../IkiWiki/Plugin/amazon_s3.pm:38 ../ikiwiki.in:231 msgid "done" msgstr "klar" @@ -177,7 +177,7 @@ msgstr "" msgid "attachment upload" msgstr "" -#: ../IkiWiki/Plugin/autoindex.pm:105 +#: ../IkiWiki/Plugin/autoindex.pm:117 msgid "automatic index generation" msgstr "" @@ -209,55 +209,55 @@ msgstr "" msgid "Anonymous" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:340 ../IkiWiki/Plugin/editpage.pm:98 +#: ../IkiWiki/Plugin/comments.pm:342 ../IkiWiki/Plugin/editpage.pm:98 msgid "bad page name" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:345 +#: ../IkiWiki/Plugin/comments.pm:347 #, fuzzy, perl-format msgid "commenting on %s" msgstr "skapar %s" -#: ../IkiWiki/Plugin/comments.pm:363 +#: ../IkiWiki/Plugin/comments.pm:365 #, perl-format msgid "page '%s' doesn't exist, so you can't comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:370 +#: ../IkiWiki/Plugin/comments.pm:372 #, perl-format msgid "comments on page '%s' are closed" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:467 +#: ../IkiWiki/Plugin/comments.pm:469 msgid "comment stored for moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:469 +#: ../IkiWiki/Plugin/comments.pm:471 msgid "Your comment will be posted after moderator review" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:482 +#: ../IkiWiki/Plugin/comments.pm:484 msgid "Added a comment" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:486 +#: ../IkiWiki/Plugin/comments.pm:488 #, perl-format msgid "Added a comment: %s" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:528 ../IkiWiki/Plugin/websetup.pm:270 +#: ../IkiWiki/Plugin/comments.pm:530 ../IkiWiki/Plugin/websetup.pm:270 msgid "you are not logged in as an admin" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:579 +#: ../IkiWiki/Plugin/comments.pm:581 msgid "Comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:618 +#: ../IkiWiki/Plugin/comments.pm:620 msgid "comment moderation" msgstr "" -#: ../IkiWiki/Plugin/comments.pm:761 +#: ../IkiWiki/Plugin/comments.pm:759 #, perl-format msgid "%i comment" msgid_plural "%i comments" @@ -267,7 +267,7 @@ msgstr[1] "" #. translators: Here "Comment" is a verb; #. translators: the user clicks on it to #. translators: post a comment. -#: ../IkiWiki/Plugin/comments.pm:771 +#: ../IkiWiki/Plugin/comments.pm:769 msgid "Comment" msgstr "" @@ -297,14 +297,14 @@ msgstr "tar bort gammal sida %s" msgid "%s is not an editable page" msgstr "" -#: ../IkiWiki/Plugin/editpage.pm:296 +#: ../IkiWiki/Plugin/editpage.pm:295 #, perl-format msgid "creating %s" msgstr "skapar %s" -#: ../IkiWiki/Plugin/editpage.pm:314 ../IkiWiki/Plugin/editpage.pm:333 -#: ../IkiWiki/Plugin/editpage.pm:343 ../IkiWiki/Plugin/editpage.pm:387 -#: ../IkiWiki/Plugin/editpage.pm:426 +#: ../IkiWiki/Plugin/editpage.pm:313 ../IkiWiki/Plugin/editpage.pm:332 +#: ../IkiWiki/Plugin/editpage.pm:342 ../IkiWiki/Plugin/editpage.pm:386 +#: ../IkiWiki/Plugin/editpage.pm:425 #, perl-format msgid "editing %s" msgstr "redigerar %s" @@ -324,9 +324,10 @@ msgstr "filnamn för wrapper har inte angivits" msgid "edittemplate %s registered for %s" msgstr "" -#: ../IkiWiki/Plugin/edittemplate.pm:138 +#: ../IkiWiki/Plugin/edittemplate.pm:125 ../IkiWiki/Plugin/inline.pm:339 +#: ../IkiWiki/Plugin/template.pm:44 #, fuzzy -msgid "failed to process" +msgid "failed to process template:" msgstr "misslyckades med att behandla mall:" #: ../IkiWiki/Plugin/format.pm:30 @@ -357,18 +358,18 @@ msgstr "kan inte läsa %s: %s" msgid "%s is an attachment, not a page." msgstr "" -#: ../IkiWiki/Plugin/git.pm:658 ../IkiWiki/Plugin/git.pm:676 +#: ../IkiWiki/Plugin/git.pm:687 ../IkiWiki/Plugin/git.pm:705 #: ../IkiWiki/Receive.pm:130 #, perl-format msgid "you are not allowed to change %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:698 +#: ../IkiWiki/Plugin/git.pm:727 #, perl-format msgid "you cannot act on a file with mode %s" msgstr "" -#: ../IkiWiki/Plugin/git.pm:702 +#: ../IkiWiki/Plugin/git.pm:731 msgid "you are not allowed to change file modes" msgstr "" @@ -455,12 +456,12 @@ msgstr "" msgid "Add a new post titled:" msgstr "" -#: ../IkiWiki/Plugin/inline.pm:333 +#: ../IkiWiki/Plugin/inline.pm:342 #, perl-format -msgid "nonexistant template %s" -msgstr "" +msgid "template %s not found" +msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/inline.pm:625 +#: ../IkiWiki/Plugin/inline.pm:635 msgid "RPC::XML::Client not found, not pinging" msgstr "RPC::XML::Client hittades inte, pingar inte" @@ -490,21 +491,25 @@ msgstr "" "misslyckades med att läsa in Perl-modulen Markdown.pm (%s) eller /usr/bin/" "markdown (%s)" -#: ../IkiWiki/Plugin/meta.pm:162 +#: ../IkiWiki/Plugin/meta.pm:174 #, fuzzy msgid "stylesheet not found" msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/meta.pm:200 +#: ../IkiWiki/Plugin/meta.pm:212 #, fuzzy msgid "redir page not found" msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/meta.pm:214 +#: ../IkiWiki/Plugin/meta.pm:226 #, fuzzy msgid "redir cycle is not allowed" msgstr "mallen %s hittades inte" +#: ../IkiWiki/Plugin/meta.pm:383 +msgid "sort=meta requires a parameter" +msgstr "" + #: ../IkiWiki/Plugin/mirrorlist.pm:44 msgid "Mirrors" msgstr "Speglar" @@ -521,10 +526,6 @@ msgstr "" msgid "more" msgstr "" -#: ../IkiWiki/Plugin/norcs.pm:66 -msgid "getctime not implemented" -msgstr "getctime inte implementerad" - #: ../IkiWiki/Plugin/openid.pm:62 msgid "Log in with" msgstr "" @@ -542,39 +543,39 @@ msgstr "Alla sidor länkas till av andra sidor." msgid "bad or missing template" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:229 +#: ../IkiWiki/Plugin/passwordauth.pm:231 msgid "Your user page: " msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:236 +#: ../IkiWiki/Plugin/passwordauth.pm:238 msgid "Create your user page" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:264 +#: ../IkiWiki/Plugin/passwordauth.pm:268 msgid "Account creation successful. Now you can Login." msgstr "Kontot har skapats. Du kan nu logga in." -#: ../IkiWiki/Plugin/passwordauth.pm:267 +#: ../IkiWiki/Plugin/passwordauth.pm:271 msgid "Error creating account." msgstr "Fel vid skapandet av konto." -#: ../IkiWiki/Plugin/passwordauth.pm:274 +#: ../IkiWiki/Plugin/passwordauth.pm:278 msgid "No email address, so cannot email password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:308 +#: ../IkiWiki/Plugin/passwordauth.pm:312 msgid "Failed to send mail" msgstr "Misslyckades med att skicka e-post" -#: ../IkiWiki/Plugin/passwordauth.pm:310 +#: ../IkiWiki/Plugin/passwordauth.pm:314 msgid "You have been mailed password reset instructions." msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:345 +#: ../IkiWiki/Plugin/passwordauth.pm:349 msgid "incorrect password reset url" msgstr "" -#: ../IkiWiki/Plugin/passwordauth.pm:348 +#: ../IkiWiki/Plugin/passwordauth.pm:352 msgid "password reset denied" msgstr "" @@ -605,94 +606,94 @@ msgstr "RPC::XML::Client hittades inte, pingar inte" msgid "warning: Old po4a detected! Recommend upgrade to 0.35." msgstr "" -#: ../IkiWiki/Plugin/po.pm:139 +#: ../IkiWiki/Plugin/po.pm:140 #, perl-format msgid "%s is not a valid language code" msgstr "" -#: ../IkiWiki/Plugin/po.pm:151 +#: ../IkiWiki/Plugin/po.pm:152 #, perl-format msgid "" "%s is not a valid value for po_link_to, falling back to po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:156 +#: ../IkiWiki/Plugin/po.pm:157 msgid "" "po_link_to=negotiated requires usedirs to be enabled, falling back to " "po_link_to=default" msgstr "" -#: ../IkiWiki/Plugin/po.pm:386 +#: ../IkiWiki/Plugin/po.pm:388 #, perl-format msgid "rebuilding all pages to fix meta titles" msgstr "" -#: ../IkiWiki/Plugin/po.pm:390 ../IkiWiki/Render.pm:655 +#: ../IkiWiki/Plugin/po.pm:392 ../IkiWiki/Render.pm:761 #, fuzzy, perl-format msgid "building %s" msgstr "redigerar %s" -#: ../IkiWiki/Plugin/po.pm:428 +#: ../IkiWiki/Plugin/po.pm:430 msgid "updated PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:452 +#: ../IkiWiki/Plugin/po.pm:454 msgid "" "Can not remove a translation. If the master page is removed, however, its " "translations will be removed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:472 +#: ../IkiWiki/Plugin/po.pm:474 msgid "" "Can not rename a translation. If the master page is renamed, however, its " "translations will be renamed as well." msgstr "" -#: ../IkiWiki/Plugin/po.pm:871 +#: ../IkiWiki/Plugin/po.pm:873 #, perl-format msgid "POT file (%s) does not exist" msgstr "" -#: ../IkiWiki/Plugin/po.pm:885 +#: ../IkiWiki/Plugin/po.pm:887 #, fuzzy, perl-format msgid "failed to copy underlay PO file to %s" msgstr "misslyckades med att kompilera %s" -#: ../IkiWiki/Plugin/po.pm:894 +#: ../IkiWiki/Plugin/po.pm:896 #, fuzzy, perl-format msgid "failed to update %s" msgstr "misslyckades med att kompilera %s" -#: ../IkiWiki/Plugin/po.pm:900 +#: ../IkiWiki/Plugin/po.pm:902 #, fuzzy, perl-format msgid "failed to copy the POT file to %s" msgstr "misslyckades med att kompilera %s" -#: ../IkiWiki/Plugin/po.pm:936 +#: ../IkiWiki/Plugin/po.pm:938 msgid "N/A" msgstr "" -#: ../IkiWiki/Plugin/po.pm:949 +#: ../IkiWiki/Plugin/po.pm:951 #, fuzzy, perl-format msgid "failed to translate %s" msgstr "misslyckades med att skriva %s: %s" -#: ../IkiWiki/Plugin/po.pm:1033 +#: ../IkiWiki/Plugin/po.pm:1035 msgid "removed obsolete PO files" msgstr "" -#: ../IkiWiki/Plugin/po.pm:1089 ../IkiWiki/Plugin/po.pm:1103 -#: ../IkiWiki/Plugin/po.pm:1142 +#: ../IkiWiki/Plugin/po.pm:1091 ../IkiWiki/Plugin/po.pm:1105 +#: ../IkiWiki/Plugin/po.pm:1144 #, fuzzy, perl-format msgid "failed to write %s" msgstr "misslyckades med att skriva %s: %s" -#: ../IkiWiki/Plugin/po.pm:1101 +#: ../IkiWiki/Plugin/po.pm:1103 #, fuzzy msgid "failed to translate" msgstr "linkmap misslyckades att köra dot" -#: ../IkiWiki/Plugin/po.pm:1154 +#: ../IkiWiki/Plugin/po.pm:1156 msgid "invalid gettext data, go back to previous page to continue edit" msgstr "" @@ -836,44 +837,44 @@ msgstr "" msgid "no change to the file name was specified" msgstr "filnamn för wrapper har inte angivits" -#: ../IkiWiki/Plugin/rename.pm:69 +#: ../IkiWiki/Plugin/rename.pm:68 #, perl-format msgid "illegal name" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:74 +#: ../IkiWiki/Plugin/rename.pm:73 #, perl-format msgid "%s already exists" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:80 +#: ../IkiWiki/Plugin/rename.pm:79 #, perl-format msgid "%s already exists on disk" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:123 +#: ../IkiWiki/Plugin/rename.pm:122 #, fuzzy, perl-format msgid "rename %s" msgstr "ritar upp %s" -#: ../IkiWiki/Plugin/rename.pm:162 +#: ../IkiWiki/Plugin/rename.pm:161 msgid "Also rename SubPages and attachments" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:249 +#: ../IkiWiki/Plugin/rename.pm:248 msgid "Only one attachment can be renamed at a time." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:252 +#: ../IkiWiki/Plugin/rename.pm:251 msgid "Please select the attachment to rename." msgstr "" -#: ../IkiWiki/Plugin/rename.pm:349 +#: ../IkiWiki/Plugin/rename.pm:348 #, perl-format msgid "rename %s to %s" msgstr "" -#: ../IkiWiki/Plugin/rename.pm:573 +#: ../IkiWiki/Plugin/rename.pm:572 #, fuzzy, perl-format msgid "update for rename of %s to %s" msgstr "uppdatering av %s, %s av %s" @@ -978,21 +979,21 @@ msgstr "" msgid "parse fail at line %d: %s" msgstr "misslyckades med att skriva %s: %s" -#: ../IkiWiki/Plugin/template.pm:34 +#: ../IkiWiki/Plugin/tag.pm:83 +#, fuzzy, perl-format +msgid "creating tag page %s" +msgstr "skapar nya sidan %s" + +#: ../IkiWiki/Plugin/template.pm:33 #, fuzzy msgid "missing id parameter" msgstr "mall saknar id-parameter" #: ../IkiWiki/Plugin/template.pm:47 -#, perl-format -msgid "template %s not found" +#, fuzzy, perl-format +msgid "%s not found" msgstr "mallen %s hittades inte" -#: ../IkiWiki/Plugin/template.pm:66 -#, fuzzy -msgid "failed to process:" -msgstr "misslyckades med att behandla mall:" - #: ../IkiWiki/Plugin/teximg.pm:72 msgid "missing tex code" msgstr "" @@ -1051,54 +1052,59 @@ msgstr "" msgid "bad file name %s" msgstr "hoppar över felaktigt filnamn %s" -#: ../IkiWiki/Render.pm:153 +#: ../IkiWiki/Render.pm:162 #, perl-format msgid "scanning %s" msgstr "söker av %s" -#: ../IkiWiki/Render.pm:274 +#: ../IkiWiki/Render.pm:284 #, perl-format msgid "" "symlink found in srcdir path (%s) -- set allow_symlinks_before_srcdir to " "allow this" msgstr "" -#: ../IkiWiki/Render.pm:303 ../IkiWiki/Render.pm:330 +#: ../IkiWiki/Render.pm:315 #, perl-format msgid "skipping bad filename %s" msgstr "hoppar över felaktigt filnamn %s" -#: ../IkiWiki/Render.pm:308 +#: ../IkiWiki/Render.pm:330 #, perl-format msgid "%s has multiple possible source pages" msgstr "" -#: ../IkiWiki/Render.pm:413 +#: ../IkiWiki/Render.pm:372 #, perl-format -msgid "removing old page %s" +msgid "querying %s for file creation and modification times.." +msgstr "" + +#: ../IkiWiki/Render.pm:434 +#, fuzzy, perl-format +msgid "removing obsolete %s" msgstr "tar bort gammal sida %s" -#: ../IkiWiki/Render.pm:486 +#: ../IkiWiki/Render.pm:507 #, fuzzy, perl-format msgid "building %s, which links to %s" msgstr "ritar upp %s, vilken länkar till %s" -#: ../IkiWiki/Render.pm:495 +#: ../IkiWiki/Render.pm:516 #, fuzzy, perl-format msgid "removing %s, no longer built by %s" msgstr "tar bort %s, som inte längre ritas upp av %s" -#: ../IkiWiki/Render.pm:618 +#: ../IkiWiki/Render.pm:671 ../IkiWiki/Render.pm:777 #, fuzzy, perl-format msgid "building %s, which depends on %s" msgstr "ritar upp %s, vilken är beroende av %s" -#: ../IkiWiki/Render.pm:631 +#: ../IkiWiki/Render.pm:684 #, fuzzy, perl-format msgid "building %s, to update its backlinks" msgstr "ritar upp %s, för att uppdatera dess bakåtlänkar" -#: ../IkiWiki/Render.pm:707 +#: ../IkiWiki/Render.pm:819 #, fuzzy, perl-format msgid "ikiwiki: cannot build %s" msgstr "ikiwiki: kan inte rita upp %s" @@ -1171,62 +1177,63 @@ msgstr "användning: ikiwiki [flaggor] källa mål" msgid " ikiwiki --setup configfile" msgstr "" -#: ../ikiwiki.in:95 +#: ../ikiwiki.in:96 msgid "usage: --set var=value" msgstr "" -#: ../ikiwiki.in:102 +#: ../ikiwiki.in:103 msgid "usage: --set-yaml var=value" msgstr "" -#: ../ikiwiki.in:156 +#: ../ikiwiki.in:157 msgid "generating wrappers.." msgstr "genererar wrappers.." -#: ../ikiwiki.in:219 +#: ../ikiwiki.in:220 msgid "rebuilding wiki.." msgstr "bygger om wiki.." -#: ../ikiwiki.in:222 +#: ../ikiwiki.in:223 msgid "refreshing wiki.." msgstr "uppdaterar wiki.." -#: ../IkiWiki.pm:238 +#: ../IkiWiki.pm:233 msgid "Discussion" msgstr "Diskussion" -#: ../IkiWiki.pm:530 +#: ../IkiWiki.pm:524 msgid "Must specify url to wiki with --url when using --cgi" msgstr "Måste ange url till wiki med --url när --cgi används" -#: ../IkiWiki.pm:576 +#: ../IkiWiki.pm:570 msgid "cannot use multiple rcs plugins" msgstr "" -#: ../IkiWiki.pm:605 +#: ../IkiWiki.pm:599 #, perl-format msgid "failed to load external plugin needed for %s plugin: %s" msgstr "" -#: ../IkiWiki.pm:1278 +#: ../IkiWiki.pm:1273 #, fuzzy, perl-format msgid "preprocessing loop detected on %s at depth %i" msgstr "%s förbehandlingsslinga detekterades på %s, djup %i" -#: ../IkiWiki.pm:1901 +#: ../IkiWiki.pm:1932 msgid "yes" msgstr "" -#: ../IkiWiki.pm:2044 -msgid "Sort::Naturally needed for title_natural sort" -msgstr "" +#: ../IkiWiki.pm:2009 +#, fuzzy, perl-format +msgid "invalid sort type %s" +msgstr "okänd sorteringstyp %s" -#: ../IkiWiki.pm:2055 +#: ../IkiWiki.pm:2030 #, perl-format msgid "unknown sort type %s" msgstr "okänd sorteringstyp %s" -#: ../IkiWiki.pm:2074 +#: ../IkiWiki.pm:2166 #, fuzzy, perl-format msgid "cannot match pages: %s" msgstr "kan inte läsa %s: %s" @@ -1251,6 +1258,13 @@ msgstr "" msgid "What is the domain name of the web server?" msgstr "" +#, fuzzy +#~ msgid "failed to process" +#~ msgstr "misslyckades med att behandla mall:" + +#~ msgid "getctime not implemented" +#~ msgstr "getctime inte implementerad" + #, fuzzy #~ msgid "failed to read %s" #~ msgstr "misslyckades med att skriva %s: %s" @@ -1305,10 +1319,6 @@ msgstr "" #~ "REV är inte inställt, kör inte från svn post-commit-hook, kan inte skicka " #~ "notifieringar" -#, fuzzy -#~ msgid "%s not found" -#~ msgstr "mallen %s hittades inte" - #~ msgid "What's this?" #~ msgstr "Vad är det här?" -- cgit v1.2.3 From 0d8fc55d3356ea7da2ce175d25230d207bd32088 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 24 Apr 2010 19:50:23 -0400 Subject: bugfix --- IkiWiki.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index c218ed8ab..c2cadd35f 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1654,7 +1654,7 @@ sub saveindex () { sub template_file ($) { my $name=shift; - my $tpage=($name =~ /^\//) ? $name : "templates/$name"; + my $tpage=($name =~ s/^\///) ? $name : "templates/$name"; if ($name !~ /\.tmpl$/ && exists $pagesources{$tpage}) { $tpage=$pagesources{$tpage}; $name.=".tmpl"; -- cgit v1.2.3 From ca9c6cc254d934837406ef9bb0dc5d021983661b Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 24 Apr 2010 20:22:20 -0400 Subject: add support for mass dependencies Registered by passing "" as page name to add_depends. --- IkiWiki.pm | 4 ++-- IkiWiki/Plugin/google.pm | 6 +++++- IkiWiki/Plugin/search.pm | 6 +++++- IkiWiki/Render.pm | 19 +++++++++---------- 4 files changed, 21 insertions(+), 14 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index c2cadd35f..0ac49ade9 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -13,8 +13,8 @@ use open qw{:utf8 :std}; use vars qw{%config %links %oldlinks %pagemtime %pagectime %pagecase %pagestate %wikistate %renderedfiles %oldrenderedfiles - %pagesources %destsources %depends %depends_simple %hooks - %forcerebuild %loaded_plugins %typedlinks %oldtypedlinks + %pagesources %destsources %depends %depends_simple @mass_depends + %hooks %forcerebuild %loaded_plugins %typedlinks %oldtypedlinks %autofiles}; use Exporter q{import}; diff --git a/IkiWiki/Plugin/google.pm b/IkiWiki/Plugin/google.pm index 68cb16513..529a2c801 100644 --- a/IkiWiki/Plugin/google.pm +++ b/IkiWiki/Plugin/google.pm @@ -25,6 +25,10 @@ sub checkconfig () { if (! length $config{url}) { error(sprintf(gettext("Must specify %s when using the %s plugin"), "url", 'google')); } + + # This is a mass dependency, so if the search form template + # changes, every page is rebuilt. + add_depends("", "googleform.tmpl"); } my $form; @@ -36,7 +40,7 @@ sub pagetemplate (@) { # Add search box to page header. if ($template->query(name => "searchform")) { if (! defined $form) { - my $searchform = template_depends("googleform.tmpl", $page, blind_cache => 1); + my $searchform = template("googleform.tmpl", blind_cache => 1); $searchform->param(url => $config{url}); $form=$searchform->output; } diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 55edf8752..c9a69f443 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -41,6 +41,10 @@ sub checkconfig () { if (! defined $config{omega_cgi}) { $config{omega_cgi}="/usr/lib/cgi-bin/omega/omega"; } + + # This is a mass dependency, so if the search form template + # changes, every page is rebuilt. + add_depends("", "searchform.tmpl"); } my $form; @@ -52,7 +56,7 @@ sub pagetemplate (@) { # Add search box to page header. if ($template->query(name => "searchform")) { if (! defined $form) { - my $searchform = template_depends("searchform.tmpl", $page, blind_cache => 1); + my $searchform = template("searchform.tmpl", blind_cache => 1); $searchform->param(searchaction => $config{cgiurl}); $form=$searchform->output; } diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 8ae0cbd4f..50af2bdec 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -591,13 +591,18 @@ sub render_dependent ($$$$$$$) { my %lc_changed = map { lc(pagename($_)) => 1 } @changed; my %lc_exists_changed = map { lc(pagename($_)) => 1 } @exists_changed; + + my $mass_reason; + foreach my $p ("page.tmpl", keys %{$depends_simple{""}}) { + $mass_reason=$p if $rendered{$p}; + } foreach my $f (@$files) { next if $rendered{$f}; my $p=pagename($f); - my $reason = undef; - - if (exists $depends_simple{$p}) { + my $reason = $mass_reason; + + if (exists $depends_simple{$p} && ! defined $reason) { foreach my $d (keys %{$depends_simple{$p}}) { if (($depends_simple{$p}{$d} & $IkiWiki::DEPEND_CONTENT && $lc_changed{$d}) @@ -771,13 +776,7 @@ sub refresh () { render_linkers($file); } - if ($rendered{"templates/page.tmpl"}) { - foreach my $f (@$files) { - next if $f eq "templates/page.tmpl"; - render($f, sprintf(gettext("building %s, which depends on %s"), $f, "templates/page.tmpl")); - } - } - elsif (@$changed || @$internal_changed || + if (@$changed || @$internal_changed || @$del || @$internal_del || @$internal_new) { 1 while render_dependent($files, $new, $internal_new, $del, $internal_del, $internal_changed, -- cgit v1.2.3 From ca9c17db57a408e6cc118cf33fcec886a72388fb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 24 Apr 2010 21:38:22 -0400 Subject: reword templatedir description --- IkiWiki.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 0ac49ade9..63a7f5e2a 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -152,7 +152,7 @@ sub getsetup () { templatedir => { type => "string", default => "$installdir/share/ikiwiki/templates", - description => "location of template files", + description => "additional directory to search for template files", advanced => 1, safe => 0, # path rebuild => 1, -- cgit v1.2.3 From 97b0c6e455f9edb99d9bd5145a8e82549ed54694 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 26 Apr 2010 17:14:03 -0400 Subject: Fix removal of rendered files in rebuild mode. Needed to handle the move of the .js files into ikiwiki/, but also this is a longstanding bug. Old pagemtime is not remembered in rebuild mode, and changing that would need a lot of changes. So instead, loop on pagectime, which is remembered. Change to remembering old pagesources info in rebuild mode. This seems safe enough. --- IkiWiki.pm | 2 +- IkiWiki/Render.pm | 2 +- debian/changelog | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 63a7f5e2a..944001d9b 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1531,8 +1531,8 @@ sub loadindex () { my $d=$pages->{$src}; my $page=pagename($src); $pagectime{$page}=$d->{ctime}; + $pagesources{$page}=$src; if (! $config{rebuild}) { - $pagesources{$page}=$src; $pagemtime{$page}=$d->{mtime}; $renderedfiles{$page}=$d->{dest}; if (exists $d->{links} && ref $d->{links}) { diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 871e005b2..b04664e41 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -409,7 +409,7 @@ sub find_del_files ($) { my @del; my @internal_del; - foreach my $page (keys %pagemtime) { + foreach my $page (keys %pagectime) { if (! $pages->{$page}) { if (isinternal($page)) { push @internal_del, $pagesources{$page}; diff --git a/debian/changelog b/debian/changelog index 53febb433..1229b1198 100644 --- a/debian/changelog +++ b/debian/changelog @@ -74,6 +74,7 @@ ikiwiki (3.20100424) UNRELEASED; urgency=low * Moved javascript files under the ikiwiki/ directory, to avoid cluttering the top of the web root. This is another things that requires a wiki rebuild on upgrade to this version. + * Fix removal of rendered files in rebuild mode. -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 -- cgit v1.2.3 From 3ac2ae1f14952bd92038183d92b1eb618c9d0f55 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 26 Apr 2010 18:47:17 -0400 Subject: Add page() PageSpec, which is like glob() but matches only pages, not other files. --- IkiWiki.pm | 10 +++++++++- debian/changelog | 2 ++ doc/ikiwiki/pagespec.mdwn | 11 ++++++----- t/pagespec_match.t | 16 +++++++++++++++- 4 files changed, 32 insertions(+), 7 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 944001d9b..623396c9c 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -2299,7 +2299,11 @@ sub match_glob ($$;@) { my $regexp=IkiWiki::glob2re($glob); if ($page=~/^$regexp$/i) { - if (! IkiWiki::isinternal($page) || $params{internal}) { + if ($params{onlypage} && + ! defined IkiWiki::pagetype($IkiWiki::pagesources{$page})) { + return IkiWiki::FailReason->new("$page is not a page"); + } + elsif (! IkiWiki::isinternal($page) || $params{internal}) { return IkiWiki::SuccessReason->new("$glob matches $page"); } else { @@ -2315,6 +2319,10 @@ sub match_internal ($$;@) { return match_glob($_[0], $_[1], @_, internal => 1) } +sub match_page ($$;@) { + return match_glob($_[0], $_[1], @_, onlypage => 1) +} + sub match_link ($$;@) { my $page=shift; my $link=lc(shift); diff --git a/debian/changelog b/debian/changelog index 1229b1198..610d0c9cb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -75,6 +75,8 @@ ikiwiki (3.20100424) UNRELEASED; urgency=low the top of the web root. This is another things that requires a wiki rebuild on upgrade to this version. * Fix removal of rendered files in rebuild mode. + * Add page() PageSpec, which is like glob() but matches only pages, + not other files. -- Joey Hess Sun, 04 Apr 2010 12:17:11 -0400 diff --git a/doc/ikiwiki/pagespec.mdwn b/doc/ikiwiki/pagespec.mdwn index 7810e790b..1c99aefac 100644 --- a/doc/ikiwiki/pagespec.mdwn +++ b/doc/ikiwiki/pagespec.mdwn @@ -24,19 +24,20 @@ match all pages except for Discussion pages and the SandBox: Some more elaborate limits can be added to what matches using these functions: +* "`glob(someglob)`" - matches pages and other files that match the given glob. + Just writing the glob by itself is actually a shorthand for this function. +* "`page(glob)`" - like `glob()`, but only matches pages, not other files * "`link(page)`" - matches only pages that link to a given page (or glob) * "`tagged(tag)`" - matches pages that are tagged or link to the given tag (or tags matched by a glob) * "`backlink(page)`" - matches only pages that a given page links to -* "`creation_month(month)`" - matches only pages created on the given month +* "`creation_month(month)`" - matches only files created on the given month * "`creation_day(mday)`" - or day of the month * "`creation_year(year)`" - or year -* "`created_after(page)`" - matches only pages created after the given page +* "`created_after(page)`" - matches only files created after the given page was created -* "`created_before(page)`" - matches only pages created before the given page +* "`created_before(page)`" - matches only files created before the given page was created -* "`glob(someglob)`" - matches pages that match the given glob. Just writing - the glob by itself is actually a shorthand for this function. * "`internal(glob)`" - like `glob()`, but matches even internal-use pages that globs do not usually match. * "`title(glob)`", "`author(glob)`", "`authorurl(glob)`", diff --git a/t/pagespec_match.t b/t/pagespec_match.t index ade9bca5a..97bcc969c 100755 --- a/t/pagespec_match.t +++ b/t/pagespec_match.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use strict; -use Test::More tests => 75; +use Test::More tests => 85; BEGIN { use_ok("IkiWiki"); } @@ -66,7 +66,21 @@ $links{"ook"}=[qw{/blog/tags/foo}]; foreach my $p (keys %links) { $pagesources{$p}="$p.mdwn"; } +$pagesources{"foo.png"}="foo.png"; +$pagesources{"foo"}="foo.mdwn"; +$IkiWiki::hooks{htmlize}{mdwn}={}; +ok(pagespec_match("foo", "foo"), "simple"); +ok(! pagespec_match("foo", "bar"), "simple fail"); +ok(pagespec_match("foo", "foo"), "simple glob"); +ok(pagespec_match("foo", "f*"), "simple glob fail"); +ok(pagespec_match("foo", "page(foo)"), "page()"); +print pagespec_match("foo", "page(foo)")."\n"; +ok(! pagespec_match("foo", "page(bar)"), "page() fail"); +ok(! pagespec_match("foo.png", "page(foo.png)"), "page() fails on non-page"); +ok(! pagespec_match("foo.png", "page(foo*)"), "page() fails on non-page glob"); +ok(pagespec_match("foo", "page(foo)"), "page() glob"); +ok(pagespec_match("foo", "page(f*)"), "page() glob fail"); ok(pagespec_match("foo", "link(bar)"), "link"); ok(pagespec_match("foo", "link(ba?)"), "glob link"); ok(! pagespec_match("foo", "link(quux)"), "failed link"); -- cgit v1.2.3 From a6e6f604bd8e9a8f90000163f8b00299829729d5 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 28 Apr 2010 12:39:13 -0400 Subject: TMPL_INCLUDE re-enabled for templates read from the templatedir. (But not in-wiki templates.) --- IkiWiki.pm | 18 +++++++++++------- debian/changelog | 2 ++ doc/news/version_3.20100427/discussion.mdwn | 4 ++++ 3 files changed, 17 insertions(+), 7 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 623396c9c..dcee376ee 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1661,7 +1661,11 @@ sub template_file ($) { } my $template=srcfile($tpage, 1); - if (! defined $template) { + if (defined $template) { + return $template, $tpage, 1 if wantarray; + return $template; + } + else { $name=~s:/::; # avoid path traversal foreach my $dir ($config{templatedir}, "$installdir/share/ikiwiki/templates") { @@ -1670,12 +1674,12 @@ sub template_file ($) { last; } } + if (defined $template) { + return $template, $tpage if wantarray; + return $template; + } } - if (defined $template) { - return $template, $tpage if wantarray; - return $template; - } return; } @@ -1683,7 +1687,7 @@ sub template_depends ($$;@) { my $name=shift; my $page=shift; - my ($filename, $tpage)=template_file($name); + my ($filename, $tpage, $untrusted)=template_file($name); if (defined $page && defined $tpage) { add_depends($page, $tpage); } @@ -1699,7 +1703,7 @@ sub template_depends ($$;@) { die_on_bad_params => 0, filename => $filename, @_, - no_includes => 1, + ($untrusted ? (no_includes => 1) : ()), ); return @opts if wantarray; diff --git a/debian/changelog b/debian/changelog index b19840865..0a70dc6ee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low * template: Fix typo. + * TMPL_INCLUDE re-enabled for templates read from the templatedir. + (But not in-wiki templates.) -- Joey Hess Tue, 27 Apr 2010 12:10:51 -0400 diff --git a/doc/news/version_3.20100427/discussion.mdwn b/doc/news/version_3.20100427/discussion.mdwn index 4daf8085f..726f9a0d2 100644 --- a/doc/news/version_3.20100427/discussion.mdwn +++ b/doc/news/version_3.20100427/discussion.mdwn @@ -1,3 +1,7 @@ *TMPL_INCLUDE is no longer supported in any template used by ikiwiki. It used to be allowed in certian templates, but not in others.* Would it be possible to make that a config option? Because I do use includes in my templates, and I don't allow users to edit templates, so it isn't a security loophole for me. --[[KathrynAndersen]] + +> I don't like config options that make wikis unsafe, but I should have +> revisted enabling includes for templates read from the templatedir -- +> it's easy to do, and I've done it now. --[[Joey]] -- cgit v1.2.3 From 6293c62cac02fdc604f12db71462ee3f1af18f1d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 30 Apr 2010 17:26:41 -0400 Subject: no need to use HTML::Entities That module is unused now. Long long ago, it used to be used to encode data in the index. Checked all modules, and every module that uses it imports it. --- IkiWiki.pm | 1 - 1 file changed, 1 deletion(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index dcee376ee..5ff1a5ae6 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -5,7 +5,6 @@ package IkiWiki; use warnings; use strict; use Encode; -use HTML::Entities; use URI::Escape q{uri_escape_utf8}; use POSIX (); use Storable; -- cgit v1.2.3 From a547d2685866898665fad221939b0b820a42a088 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 1 May 2010 20:40:31 -0400 Subject: html5 option * Ikiwiki can be configured to generate html5 instead of the default xhtml 1.0. The html5 output mode is experimental, not yet fully standards compliant, and will be subject to rapid change. --- IkiWiki.pm | 8 ++++++++ IkiWiki/Render.pm | 1 + debian/changelog | 5 ++++- doc/bugs/html5_support.mdwn | 12 +++++++----- doc/roadmap.mdwn | 1 + templates/misc.tmpl | 5 ++++- templates/page.tmpl | 5 ++++- 7 files changed, 29 insertions(+), 8 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 5ff1a5ae6..1e11d34e2 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -234,6 +234,13 @@ sub getsetup () { safe => 1, rebuild => 1, }, + html5 => { + type => "boolean", + default => 0, + description => "generate HTML5? (experimental)", + safe => 1, + rebuild => 1, + }, sslcookie => { type => "boolean", default => 0, @@ -1725,6 +1732,7 @@ sub misctemplate ($$;@) { wikiname => $config{wikiname}, pagebody => $pagebody, baseurl => baseurl(), + html5 => $config{html5}, @_, ); run_hooks(pagetemplate => sub { diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 7e3d78861..5923f5e74 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -138,6 +138,7 @@ sub genpage ($$) { mtime => displaytime($pagemtime{$page}), ctime => displaytime($pagectime{$page}), baseurl => baseurl($page), + html5 => $config{html5}, ); run_hooks(pagetemplate => sub { diff --git a/debian/changelog b/debian/changelog index 8bf6f89b6..fc5a6124b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,12 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low - * template: Fix typo. * TMPL_INCLUDE re-enabled for templates read from the templatedir. (But not in-wiki templates.) * Version dependency on liburi-perl to >= 1.36; previous versions did not support building urls from utf-8 strings. Closes: #579713 + * Ikiwiki can be configured to generate html5 instead of the default xhtml + 1.0. The html5 output mode is experimental, not yet fully standards + compliant, and will be subject to rapid change. * htmlscrubber: Allow html5 semantic tags: section, nav, article, aside hgroup, header, footer, figure, figcaption, time, mark * htmlscrubber: Also allow some other html5 tags: canvas, progress, meter, @@ -16,6 +18,7 @@ ikiwiki (3.20100428) UNRELEASED; urgency=low and form. (Also the form* override attributes for input and buttons.) * htmlscrubber: Allow additional misc html5 attributes: reversed, spellcheck, and hidden. + * template: Fix typo. -- Joey Hess Tue, 27 Apr 2010 12:10:51 -0400 diff --git a/doc/bugs/html5_support.mdwn b/doc/bugs/html5_support.mdwn index 2d27ac803..bf782a3bf 100644 --- a/doc/bugs/html5_support.mdwn +++ b/doc/bugs/html5_support.mdwn @@ -20,13 +20,14 @@ HTML5](http://www.w3.org/TR/html5-diff/). > What has been done so far, can be extended. Basically works > in browsers, if you don't care about standards. A good prerequisite > for anything else, anyway. -> 2. Switch to html5 in eg, ikiwiki 4; users have to deal with +> 2. Have both a html5 and a xhtml mode, allow user to select. +> 3. Switch to html5 in eg, ikiwiki 4; users have to deal with > any custom markup on their pages/templates that breaks then. -> 3. Have both a html5 and a xhtml mode, allow user to select. -> -> The third option seems fairly tractable from what I see here and in +> +> The second option seems fairly tractable from what I see here and in > your branch. You made only relatively minor changes to 10 templates. -> It would probably not be too dreadful to put them in ifdefs. +> It would probably not be too dreadful to put them in ifdefs. I've made a +> small start at doing that. > > Some of your changes are obvious, like using the new `time` and > and `article` elements. Others less so, and I'm particularly @@ -70,6 +71,7 @@ HTML5](http://www.w3.org/TR/html5-diff/). > [[this_todo|Add_label_to_search_form_input_field]] > * Use details tag instead of the javascript in the toggle plugin. > (Need to wait on browser support probably.) +> > --[[Joey]] # htmlscrubber.pm needs to not scrub new HTML5 elements diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index c126fd585..4b5f01c45 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -80,6 +80,7 @@ Probably incomplete list: * YADA format setup files per default? * Enable tagbase by default (so that tag autocreation will work by default). Note that this is already done for wikis created by `auto-blog.setup`. +* html5 on by default (some day..) In general, we try to use [[ikiwiki-transition]] or forced rebuilds on upgrade to deal with changes that break compatability. Some things that diff --git a/templates/misc.tmpl b/templates/misc.tmpl index 535a6f06b..0b7fefa08 100644 --- a/templates/misc.tmpl +++ b/templates/misc.tmpl @@ -1,6 +1,9 @@ - + + + diff --git a/templates/page.tmpl b/templates/page.tmpl index 7e850a56b..661d4a515 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -1,6 +1,9 @@ - + + + -- cgit v1.2.3 From 0ec1fe1944f88ed285bb467e143c4967af11ad5c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 1 May 2010 21:04:14 -0400 Subject: set html5 option as advanced for now --- IkiWiki.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 1e11d34e2..ed57710bb 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -238,6 +238,7 @@ sub getsetup () { type => "boolean", default => 0, description => "generate HTML5? (experimental)", + advanced => 1, safe => 1, rebuild => 1, }, -- cgit v1.2.3 From 970373548fda77223ebbeb6aadbdbe4884b67cef Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 2 May 2010 13:44:13 -0400 Subject: Add parameter to displaytime to specify that it is a pubdate, and in html5 mode, use time tag. --- IkiWiki.pm | 22 ++++++++++++++++++++-- IkiWiki/Plugin/comments.pm | 2 +- IkiWiki/Plugin/inline.pm | 12 +----------- IkiWiki/Plugin/relativedate.pm | 15 ++++++++++++--- IkiWiki/Render.pm | 2 +- debian/changelog | 7 +++++++ doc/bugs/html5_support.mdwn | 3 +++ doc/plugins/write.mdwn | 5 ++++- 8 files changed, 49 insertions(+), 19 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index ed57710bb..c428de77f 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -998,10 +998,18 @@ sub abs2rel ($$) { return $ret; } -sub displaytime ($;$) { +sub displaytime ($;$$) { # Plugins can override this function to mark up the time to # display. - return ''.formattime(@_).''; + my $time=formattime($_[0], $_[1]); + if ($config{html5}) { + return ''; + } + else { + return ''.$time.''; + } } sub formattime ($;$) { @@ -1017,6 +1025,16 @@ sub formattime ($;$) { return decode_utf8(POSIX::strftime($format, localtime($time))); } +sub date_3339 ($) { + my $time=shift; + + my $lc_time=POSIX::setlocale(&POSIX::LC_TIME); + POSIX::setlocale(&POSIX::LC_TIME, "C"); + my $ret=POSIX::strftime("%Y-%m-%dT%H:%M:%SZ", gmtime($time)); + POSIX::setlocale(&POSIX::LC_TIME, $lc_time); + return $ret; +} + sub beautify_urlpath ($) { my $url=shift; diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index f7dc99dca..02f1d9301 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -672,7 +672,7 @@ sub previewcomment ($$$) { my $template = template("comment.tmpl"); $template->param(content => $preview); - $template->param(ctime => displaytime($time)); + $template->param(ctime => displaytime($time, undef, 1)); IkiWiki::run_hooks(pagetemplate => sub { shift->(page => $location, diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 95fe90312..2df59f414 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -358,7 +358,7 @@ sub preprocess_inline (@) { $template->param(pageurl => urlto($page, $params{destpage})); $template->param(inlinepage => $page); $template->param(title => pagetitle(basename($page))); - $template->param(ctime => displaytime($pagectime{$page}, $params{timeformat})); + $template->param(ctime => displaytime($pagectime{$page}, $params{timeformat}, 1)); $template->param(mtime => displaytime($pagemtime{$page}, $params{timeformat})); $template->param(first => 1) if $page eq $list[0]; $template->param(last => 1) if $page eq $list[$#list]; @@ -500,16 +500,6 @@ sub date_822 ($) { return $ret; } -sub date_3339 ($) { - my $time=shift; - - my $lc_time=POSIX::setlocale(&POSIX::LC_TIME); - POSIX::setlocale(&POSIX::LC_TIME, "C"); - my $ret=POSIX::strftime("%Y-%m-%dT%H:%M:%SZ", gmtime($time)); - POSIX::setlocale(&POSIX::LC_TIME, $lc_time); - return $ret; -} - sub absolute_urls ($$) { # sucky sub because rss sucks my $content=shift; diff --git a/IkiWiki/Plugin/relativedate.pm b/IkiWiki/Plugin/relativedate.pm index 7e615f7f1..fe8ef0901 100644 --- a/IkiWiki/Plugin/relativedate.pm +++ b/IkiWiki/Plugin/relativedate.pm @@ -43,9 +43,10 @@ sub include_javascript ($;$) { '" type="text/javascript" charset="utf-8">'; } -sub mydisplaytime ($;$) { +sub mydisplaytime ($;$$) { my $time=shift; my $format=shift; + my $pubdate=shift; # This needs to be in a form that can be parsed by javascript. # Being fairly human readable is also nice, as it will be exposed @@ -53,8 +54,16 @@ sub mydisplaytime ($;$) { my $gmtime=decode_utf8(POSIX::strftime("%a, %d %b %Y %H:%M:%S %z", localtime($time))); - return ''. - IkiWiki::formattime($time, $format).''; + my $mid=' class="relativedate" title="'.$gmtime.'">'. + IkiWiki::formattime($time, $format); + + if ($config{html5}) { + return ' + + @@ -184,8 +186,8 @@ Last edited - + -- cgit v1.2.3 From 83b907c35e3a03d097c004b0d66cc37f45a4410d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 5 May 2010 18:43:49 -0400 Subject: remove misc.tmpl checking Turns out that users with a modified page.tmpl need to modify it on upgrade, at least to add the FORCEBASEURL (so edit preview works), so there is no point in trying to retain compatability. --- IkiWiki.pm | 2 +- debian/changelog | 4 ++-- doc/roadmap.mdwn | 3 --- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 54271becc..72f416489 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1744,7 +1744,7 @@ sub misctemplate ($$;@) { my $title=shift; my $content=shift; - my $template=template("misc.tmpl") || template("page.tmpl"); + my $template=template("page.tmpl"); run_hooks(pagetemplate => sub { shift->(page => "", destpage => "", template => $template); diff --git a/debian/changelog b/debian/changelog index 0c3a99f0e..6b4ba7592 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,8 @@ ikiwiki (3.20100505) UNRELEASED; urgency=low * Removed misc.tmpl. Now to theme ikiwiki, you only need to customise a single template, page.tmpl. - * misc.tmpl will, however, still be read if a locally modified version - exists. This is to avoid forcing users to update page.tmpl right now. + * If you have a locally customised page.tmpl, it needs to be updated + to set when BASEURL or FORCEBAREURL is set. -- Joey Hess Wed, 05 May 2010 18:07:29 -0400 diff --git a/doc/roadmap.mdwn b/doc/roadmap.mdwn index 729d22fb8..e257c21a2 100644 --- a/doc/roadmap.mdwn +++ b/doc/roadmap.mdwn @@ -81,9 +81,6 @@ Probably incomplete list: * Enable tagbase by default (so that tag autocreation will work by default). Note that this is already done for wikis created by `auto-blog.setup`. * [[tips/html5]] on by default (some day..) -* stop reading misc.tmpl if it exists (only done in case users have a customized - version, or an outdated version of page.tmpl that cannot be used by - misctemplate) In general, we try to use [[ikiwiki-transition]] or forced rebuilds on upgrade to deal with changes that break compatability. Some things that -- cgit v1.2.3 From 11937595687df86aa93502d2e895f747a6262c4c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 5 May 2010 20:42:56 -0400 Subject: remove unused indexlink function and template variable --- IkiWiki.pm | 4 ---- IkiWiki/Plugin/editpage.pm | 1 - 2 files changed, 5 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 72f416489..0da2c93c8 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1401,10 +1401,6 @@ sub filter ($$$) { return $content; } -sub indexlink () { - return "$config{wikiname}"; -} - sub check_canedit ($$$;$) { my $page=shift; my $q=shift; diff --git a/IkiWiki/Plugin/editpage.pm b/IkiWiki/Plugin/editpage.pm index 7bb6eb07c..670eedfd9 100644 --- a/IkiWiki/Plugin/editpage.pm +++ b/IkiWiki/Plugin/editpage.pm @@ -148,7 +148,6 @@ sub cgi_editpage ($$) { $form->field(name => "editcontent", type => "textarea", rows => 20, cols => 80); $form->tmpl_param("can_commit", $config{rcs}); - $form->tmpl_param("indexlink", indexlink()); $form->tmpl_param("helponformattinglink", htmllink($page, $page, "ikiwiki/formatting", noimageinline => 1, -- cgit v1.2.3 From ee9a4e06fcce53062b38814707a0b7d6946d4a36 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 5 May 2010 22:36:50 -0400 Subject: rename ispage variable --- IkiWiki.pm | 1 + IkiWiki/Render.pm | 1 - debian/NEWS | 2 +- templates/page.tmpl | 6 +++--- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 0da2c93c8..a79b66039 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1747,6 +1747,7 @@ sub misctemplate ($$;@) { }); $template->param( + dynamic => 1, title => $title, wikiname => $config{wikiname}, content => $content, diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 7d66bf5ec..e5ba0079b 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -138,7 +138,6 @@ sub genpage ($$) { title => $page eq 'index' ? $config{wikiname} : pagetitle(basename($page)), - ispage => 1, wikiname => $config{wikiname}, content => $content, backlinks => $backlinks, diff --git a/debian/NEWS b/debian/NEWS index 6074d6260..0f2c1f562 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -4,7 +4,7 @@ ikiwiki (3.20100505) UNRELEASED; urgency=low If you have locally modified versions of that template, you will need to update it to contain the following in the HTML : - + diff --git a/templates/page.tmpl b/templates/page.tmpl index 4920d3cc8..41fffa263 100644 --- a/templates/page.tmpl +++ b/templates/page.tmpl @@ -5,7 +5,7 @@ - + @@ -48,7 +48,7 @@ - + @@ -132,7 +132,7 @@