* Patch based on a patch from Ethan to support relative matching in

PageSpecs, by using "./". pagespec_match() has grown a new third parameter
  to support this.
master
joey 2007-02-06 21:17:25 +00:00
parent 46f0f5bdc2
commit 58141a0ebc
32 changed files with 211 additions and 160 deletions

View File

@ -854,23 +854,35 @@ sub pagespec_translate ($) { #{{{
$code.=" match_$1(\$page, ".safequote($2).")";
}
else {
$code.=" match_glob(\$page, ".safequote($word).")";
$code.=" match_glob(\$page, ".safequote($word).", \$from)";
}
}
return $code;
} #}}}
sub pagespec_match ($$) { #{{{
sub pagespec_match ($$;$) { #{{{
my $page=shift;
my $spec=shift;
my $from=shift;
if (! defined $from){
$from = "";
}
return eval pagespec_translate($spec);
} #}}}
sub match_glob ($$) { #{{{
sub match_glob ($$$) { #{{{
my $page=shift;
my $glob=shift;
my $from=shift;
# relative matching
if ($glob =~ m!^\./!) {
$from=~s!/?[^/]+$!!;
$glob=~s!^\./!!;a
$glob="$from/$glob";
}
# turn glob into safe regexp
$glob=quotemeta($glob);

View File

@ -20,7 +20,7 @@ sub preprocess (@) { #{{{
my @broken;
foreach my $page (keys %links) {
if (pagespec_match($page, $params{pages})) {
if (pagespec_match($page, $params{pages}, $params{page})) {
my $discussion=gettext("discussion");
foreach my $link (@{$links{$page}}) {
next if $link =~ /.*\/\Q$discussion\E/i && $config{discussion};

View File

@ -81,7 +81,7 @@ sub preprocess_inline (@) { #{{{
my @list;
foreach my $page (keys %pagesources) {
next if $page eq $params{page};
if (pagespec_match($page, $params{pages})) {
if (pagespec_match($page, $params{pages}, $params{page})) {
push @list, $page;
}
}

View File

@ -48,7 +48,7 @@ sub genmap ($) { #{{{
# Get all the items to map.
my %mapitems = ();
foreach my $item (keys %links) {
if (pagespec_match($item, $params{pages})) {
if (pagespec_match($item, $params{pages}, $params{page})) {
my $link=htmlpage($item);
$link=IkiWiki::abs2rel($link, IkiWiki::dirname($params{page}));
$mapitems{$item}=$link;

View File

@ -20,7 +20,7 @@ sub canedit ($$) { #{{{
return undef if defined $user && IkiWiki::is_admin($user);
foreach my $admin (@{$config{adminuser}}) {
if (pagespec_match($page, IkiWiki::userinfo_get($admin, "locked_pages"))) {
if (pagespec_match($page, IkiWiki::userinfo_get($admin, "locked_pages"), "")) {
return sprintf(gettext("%s is locked by %s and cannot be edited"),
htmllink("", "", $page, 1),
IkiWiki::userlink($admin));

View File

@ -26,7 +26,7 @@ sub preprocess (@) { #{{{
# Get all the items to map.
my @mapitems = ();
foreach my $page (keys %links) {
if (pagespec_match($page, $params{pages})) {
if (pagespec_match($page, $params{pages}, $params{page})) {
push @mapitems, $page;
}
}

View File

@ -28,7 +28,7 @@ sub preprocess (@) { #{{{
my $discussion=gettext("discussion");
foreach my $page (keys %renderedfiles) {
next if $linkedto{$page};
next unless pagespec_match($page, $params{pages});
next unless pagespec_match($page, $params{pages}, $params{page});
# If the page has a link to some other page, it's
# indirectly linked to a page via that page's backlinks.
next if grep {

View File

@ -22,7 +22,7 @@ sub preprocess (@) { #{{{
return $#pages+1 if $params{pages} eq "*"; # optimisation
my $count=0;
foreach my $page (@pages) {
$count++ if pagespec_match($page, $params{pages});
$count++ if pagespec_match($page, $params{pages}, $params{page});
}
return $count;
} # }}}

View File

@ -33,7 +33,7 @@ sub preprocess (@) { #{{{
my %counts;
my $max = 0;
foreach my $page (keys %links) {
if (pagespec_match($page, $params{pages})) {
if (pagespec_match($page, $params{pages}, $params{page})) {
use IkiWiki::Render;
my @bl = IkiWiki::backlinks($page);
$counts{$page} = scalar(@bl);

View File

@ -360,7 +360,7 @@ sub refresh () { #{{{
foreach my $file (keys %rendered, @del) {
next if $f eq $file;
my $page=pagename($file);
if (pagespec_match($page, $depends{$p})) {
if (pagespec_match($page, $depends{$p}, $p)) {
debug(sprintf(gettext("rendering %s, which depends on %s"), $f, $page));
render($f);
$rendered{$f}=1;

View File

@ -101,7 +101,7 @@ sub commit_notify_list ($@) { #{{{
length $userinfo->{$user}->{subscriptions} &&
exists $userinfo->{$user}->{email} &&
length $userinfo->{$user}->{email} &&
grep { pagespec_match($_, $userinfo->{$user}->{subscriptions}) } @pages) {
grep { pagespec_match($_, $userinfo->{$user}->{subscriptions}, "") } @pages) {
push @ret, $userinfo->{$user}->{email};
}
}

View File

@ -45,6 +45,12 @@ of two tags, use:
blog/* and (link(tag/foo) or link(tag/bar))
Note that page names in PageSpecs are matched against the absolute
filenames of the pages in the wiki, so a pagespec "foo" used on page
"a/b" will not match a page named "a/foo" or "a/b/foo". To match
relative to the directory of the page containing the pagespec, you can
use "./". For example, "./foo" on page "a/b" matches page "a/foo".
## Old syntax
The old PageSpec syntax was called a "GlobList", and worked differently in

4
debian/NEWS vendored
View File

@ -4,6 +4,10 @@ ikiwiki (1.42) unstable; urgency=low
httpauth support on your wiki, you should now enable the anonok plugin,
instead.
Third-party plugins that use pagespec_match() should be updated to pass
the new third parameter (from) to that function. This is needed for the
new relative glob matching to work.
-- Joey Hess <joeyh@debian.org> Thu, 1 Feb 2007 16:57:59 -0500
ikiwiki (1.34) unstable; urgency=low

5
debian/changelog vendored
View File

@ -17,8 +17,11 @@ ikiwiki (1.42) UNRELEASED; urgency=low
Yes, you can keep videos in the wiki..
* Add feedshow option to allow reducing the number of items included in
an rss or atom feed.
* Patch based on a patch from Ethan to support relative matching in
PageSpecs, by using "./". pagespec_match() has grown a new third parameter
to support this.
-- Joey Hess <joeyh@debian.org> Mon, 5 Feb 2007 16:51:10 -0500
-- Joey Hess <joeyh@debian.org> Tue, 6 Feb 2007 15:49:06 -0500
ikiwiki (1.41) unstable; urgency=low

View File

@ -1,10 +1,10 @@
[[meta title="example blog"]]
[[pagestats pages="*blog/tags/*"]]
[[pagestats pages="./tags/*"]]
Welcome to my blog. Have a look at the most recent posts below, or
browse the tag cloud on the right. An archive of all [[posts]] is also
available.
[[inline pages="*blog/posts/* and !*/Discussion" show="10"
actions=yes rootpage="*blog/posts"]]
[[inline pages="./posts/* and !*/Discussion" show="10"
actions=yes rootpage="./posts"]]

View File

@ -1,3 +1,3 @@
Here is a full list of posts to my [[blog|index]].
[[inline pages="*blog/posts/* and !*/Discussion" archive=yes feedshow=10 quick=yes]]
[[inline pages="./posts/* and !*/Discussion" archive=yes feedshow=10 quick=yes]]

View File

@ -1,4 +1,4 @@
Example sidebar
Categories:
[[map pages="*blog/tags/* and !*/Discussion"]]
[[map pages="./tags/* and !*/Discussion"]]

View File

@ -1,3 +1,3 @@
[[pagestats pages="*blog/tags/*"]]
[[pagestats pages="./tags/*"]]
On the right you can see the tag cloud for this blog.

View File

@ -1,4 +1,4 @@
This feed contains pages in the "life" category.
[[inline pages="link(tags/life) and *blog/posts/* and !*/Discussion"
[[inline pages="link(tags/life) and ./posts/* and !*/Discussion"
show="10" actions=yes]]

View File

@ -2,4 +2,4 @@ This is where annoucements of new releases, features, and other news is
posted. FooBar users are recommended to subscribe to this page's RSS
feed.
[[inline pages="*softwaresite/news/* and !*/Discussion" rootpage="news" show="30"]]
[[inline pages="./news/* and !*/Discussion" rootpage="news" show="30"]]

View File

@ -312,10 +312,12 @@ page created from it. (Ie, it appends ".html".)
Makes the specified page depend on the specified [[PageSpec]].
#### `pagespec_match($$)`
#### `pagespec_match($$;$)`
Passed a page name, and a [[PageSpec]], returns true if the [[PageSpec]]
matches the page.
Passed a page name, a [[PageSpec]], and the location the glob should be
matched against, returns true if the [[PageSpec]] matches the page. (If the
third parameter is not passed, relative PageSpecs will match relative to
the top of the wiki.)
#### `bestlink($$)`

View File

@ -40,12 +40,31 @@ now that I was mistaken.. "four or fewer levels deep" would be
"@ or @/@ or @/@/@ or @/@/@/@". Well, I think it has a certain appeal but
I can see why it might not be much of an improvement. :) --Ethan
> OK, I took a shot at implementing the changes. I was thinking about making
> pagespecs relative by default but I couldn't decide whether page
> `foo/bar` inlining `*` should match `foo/bar/*` or `foo/*`.
> So I punted and left things as absolute, with `./*` matching
> `foo/bar/*`, which I think is pretty clear.
> The patch is at [ikidev](http://ikidev.betacantrips.com/patches/pagespec_enhancements.patch)
> and you can see it work at
> [this page](http://ikidev.betacantrips.com/one/two/three/index.html) or
> [this page](http://ikidev.betacantrips.com/one/two/three/princess.html) --Ethan
> Seems to me that ".." would be the natural thing to use, not "@". --[[Joey]]
OK, I took a shot at implementing the changes. I was thinking about making
pagespecs relative by default but I couldn't decide whether page
`foo/bar` inlining `*` should match `foo/bar/*` or `foo/*`.
So I punted and left things as absolute, with `./*` matching
`foo/bar/*`, which I think is pretty clear.
The patch is at [ikidev](http://ikidev.betacantrips.com/patches/pagespec_enhancements.patch)
and you can see it work at
[this page](http://ikidev.betacantrips.com/one/two/three/index.html) or
[this page](http://ikidev.betacantrips.com/one/two/three/princess.html) --Ethan
> Nice patch, though I see the following problems with it:
> * The sole pagespec_match in IkiWiki::Render probably should have `$p`
> as its third parameter. This will allow add_depends to add a
> dependency on a pagespec that matches relative to the page. I made this
> changes and it seems to work, new pages are noticed in updates.
> * `! $from` fails to match pages named "0" :-)
> * '/./ matches any letter, not just "." :-) :-)
> * One other major problem. If you look at the doc/examples/blog/index.mdwn
> I changed it to use relative globs like "./posts/*", but they didn't work,
> because it looked for examples/blog/indexposts/* instead of
> examples/blog/index/posts/*. And, of course, what I really expected it to
> look for was examples/blog/posts/*. I think you may have made the wrong
> choice about that, so I changed it to go the other way. What do you think?
>
> I've committed support for ./ to ikiwiki now, based on your patch.
> --[[Joey]]

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki-bg\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-01 21:27-0500\n"
"POT-Creation-Date: 2007-02-06 15:06-0500\n"
"PO-Revision-Date: 2007-01-12 01:19+0200\n"
"Last-Translator: Damyan Ivanov <dam@modsodtsys.com>\n"
"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
@ -127,7 +127,7 @@ msgstr "непознат вид сортиране „%s”"
msgid "Discussion"
msgstr "Дискусия"
#: ../IkiWiki/Plugin/inline.pm:372
#: ../IkiWiki/Plugin/inline.pm:378
msgid "RPC::XML::Client not found, not pinging"
msgstr "модулът „RPC::XML::Client” не е намерен; източникът не е проверен"
@ -258,47 +258,47 @@ msgstr ""
"Променливата от обкръжението „REV” не е указана. Програмата не се изпълнява "
"като „svn post-commit hook”. Няма да бъдат разпратени известявания"
#: ../IkiWiki/Render.pm:232 ../IkiWiki/Render.pm:252
#: ../IkiWiki/Render.pm:247 ../IkiWiki/Render.pm:267
#, perl-format
msgid "skipping bad filename %s"
msgstr "пропускане на невалидното име на файл „%s”"
#: ../IkiWiki/Render.pm:292
#: ../IkiWiki/Render.pm:307
#, perl-format
msgid "removing old page %s"
msgstr "премахване на старата страница „%s”"
#: ../IkiWiki/Render.pm:311
#: ../IkiWiki/Render.pm:326
#, perl-format
msgid "scanning %s"
msgstr "сканиране на „%s”"
#: ../IkiWiki/Render.pm:320
#: ../IkiWiki/Render.pm:335
#, perl-format
msgid "rendering %s"
msgstr "обновяване на страницата „%s”"
#: ../IkiWiki/Render.pm:332
#: ../IkiWiki/Render.pm:347
#, perl-format
msgid "rendering %s, which links to %s"
msgstr "обновяване на страницата „%s”, съдържаща препратки към „%s”"
#: ../IkiWiki/Render.pm:349
#: ../IkiWiki/Render.pm:364
#, perl-format
msgid "rendering %s, which depends on %s"
msgstr "обновяване на страницата „%s”, зависеща от „%s”"
#: ../IkiWiki/Render.pm:387
#: ../IkiWiki/Render.pm:402
#, perl-format
msgid "rendering %s, to update its backlinks"
msgstr "обновяване на „%s” и осъвременяване на обратните връзки"
#: ../IkiWiki/Render.pm:399
#: ../IkiWiki/Render.pm:414
#, perl-format
msgid "removing %s, no longer rendered by %s"
msgstr "премахване на „%s” понеже не се генерира от „%s”"
#: ../IkiWiki/Render.pm:425
#: ../IkiWiki/Render.pm:440
#, perl-format
msgid "ikiwiki: cannot render %s"
msgstr "ikiwiki: неуспех при обновяване на страницата „%s”"
@ -385,7 +385,7 @@ msgstr "Грешка"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
#: ../IkiWiki.pm:527
#: ../IkiWiki.pm:531
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "открита е циклична завидимост при %s на „%s” на дълбочина %i"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-01 21:27-0500\n"
"POT-Creation-Date: 2007-02-06 15:06-0500\n"
"PO-Revision-Date: 2007-01-07 11:59+0100\n"
"Last-Translator: Miroslav Kure <kurem@debian.cz>\n"
"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
@ -124,7 +124,7 @@ msgstr "neznámý typ řazení %s"
msgid "Discussion"
msgstr "Diskuse"
#: ../IkiWiki/Plugin/inline.pm:372
#: ../IkiWiki/Plugin/inline.pm:378
msgid "RPC::XML::Client not found, not pinging"
msgstr "RPC::XML::Client nebyl nalezen, nepinkám"
@ -252,47 +252,47 @@ msgid ""
msgstr ""
"REV není nastavena, není spuštěna ze svn post-commit, nemohu zaslat oznámení"
#: ../IkiWiki/Render.pm:232 ../IkiWiki/Render.pm:252
#: ../IkiWiki/Render.pm:247 ../IkiWiki/Render.pm:267
#, perl-format
msgid "skipping bad filename %s"
msgstr "přeskakuji chybné jméno souboru %s"
#: ../IkiWiki/Render.pm:292
#: ../IkiWiki/Render.pm:307
#, perl-format
msgid "removing old page %s"
msgstr "odstraňuji starou stránku %s"
#: ../IkiWiki/Render.pm:311
#: ../IkiWiki/Render.pm:326
#, perl-format
msgid "scanning %s"
msgstr "prohledávám %s"
#: ../IkiWiki/Render.pm:320
#: ../IkiWiki/Render.pm:335
#, perl-format
msgid "rendering %s"
msgstr "zpracovávám %s"
#: ../IkiWiki/Render.pm:332
#: ../IkiWiki/Render.pm:347
#, perl-format
msgid "rendering %s, which links to %s"
msgstr "zpracovávám %s, která odkazuje na %s"
#: ../IkiWiki/Render.pm:349
#: ../IkiWiki/Render.pm:364
#, perl-format
msgid "rendering %s, which depends on %s"
msgstr "zpracovávám %s, která závisí na %s"
#: ../IkiWiki/Render.pm:387
#: ../IkiWiki/Render.pm:402
#, perl-format
msgid "rendering %s, to update its backlinks"
msgstr "zpracovávám %s, aby se aktualizovaly zpětné odkazy"
#: ../IkiWiki/Render.pm:399
#: ../IkiWiki/Render.pm:414
#, perl-format
msgid "removing %s, no longer rendered by %s"
msgstr "odstraňuji %s, již není zpracovávána %s"
#: ../IkiWiki/Render.pm:425
#: ../IkiWiki/Render.pm:440
#, perl-format
msgid "ikiwiki: cannot render %s"
msgstr "ikiwiki: nelze zpracovat %s"
@ -377,7 +377,7 @@ msgstr "Chyba"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
#: ../IkiWiki.pm:527
#: ../IkiWiki.pm:531
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "Byla rozpoznána smyčka direktivy %s na %s v hloubce %i"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-01 21:27-0500\n"
"POT-Creation-Date: 2007-02-06 15:06-0500\n"
"PO-Revision-Date: 2007-01-03 09:37+0100\n"
"Last-Translator: Víctor Moral <victor@taquiones.net>\n"
"Language-Team: spanish <es@li.org>\n"
@ -128,7 +128,7 @@ msgstr "no conozco este tipo de ordenación %s"
msgid "Discussion"
msgstr "Comentarios"
#: ../IkiWiki/Plugin/inline.pm:372
#: ../IkiWiki/Plugin/inline.pm:378
msgid "RPC::XML::Client not found, not pinging"
msgstr "No he encontrado el componente RPC::XML::Client, no envío señal alguna"
@ -258,49 +258,49 @@ msgstr ""
"La variable de entorno REV no está definida, por lo que no puede funcionar "
"svn post-commit; no puedo enviar notificación alguna."
#: ../IkiWiki/Render.pm:232 ../IkiWiki/Render.pm:252
#: ../IkiWiki/Render.pm:247 ../IkiWiki/Render.pm:267
#, perl-format
msgid "skipping bad filename %s"
msgstr "ignorando el archivo %s porque su no nombre no es correcto"
#: ../IkiWiki/Render.pm:292
#: ../IkiWiki/Render.pm:307
#, perl-format
msgid "removing old page %s"
msgstr "eliminando la antigua página %s"
#: ../IkiWiki/Render.pm:311
#: ../IkiWiki/Render.pm:326
#, perl-format
msgid "scanning %s"
msgstr "explorando %s"
#: ../IkiWiki/Render.pm:320
#: ../IkiWiki/Render.pm:335
#, perl-format
msgid "rendering %s"
msgstr "convirtiendo %s"
#: ../IkiWiki/Render.pm:332
#: ../IkiWiki/Render.pm:347
#, perl-format
msgid "rendering %s, which links to %s"
msgstr "convirtiendo la página %s, la cual referencia a %s"
#: ../IkiWiki/Render.pm:349
#: ../IkiWiki/Render.pm:364
#, perl-format
msgid "rendering %s, which depends on %s"
msgstr "convirtiendo la página %s, la cual depende de %s"
#: ../IkiWiki/Render.pm:387
#: ../IkiWiki/Render.pm:402
#, perl-format
msgid "rendering %s, to update its backlinks"
msgstr ""
"convirtiendo la página %s para poner al día su lista de páginas que la "
"referencian"
#: ../IkiWiki/Render.pm:399
#: ../IkiWiki/Render.pm:414
#, perl-format
msgid "removing %s, no longer rendered by %s"
msgstr "eliminando la página %s puesto que ya no se deriva de %s"
#: ../IkiWiki/Render.pm:425
#: ../IkiWiki/Render.pm:440
#, perl-format
msgid "ikiwiki: cannot render %s"
msgstr "ikwiki: no puedo convertir la página %s"
@ -388,7 +388,7 @@ msgstr "Error"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
#: ../IkiWiki.pm:527
#: ../IkiWiki.pm:531
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-01 21:27-0500\n"
"POT-Creation-Date: 2007-02-06 15:06-0500\n"
"PO-Revision-Date: 2007-01-22 22:12+0100\n"
"Last-Translator: Jean-Luc Coulon (f5ibh) <jean-luc.coulon@wanadoo.fr>\n"
"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
@ -129,7 +129,7 @@ msgstr "Type de tri %s inconnu"
msgid "Discussion"
msgstr "Discussion"
#: ../IkiWiki/Plugin/inline.pm:372
#: ../IkiWiki/Plugin/inline.pm:378
msgid "RPC::XML::Client not found, not pinging"
msgstr "RPC::XML::Client introuvable, pas de réponse au ping"
@ -260,47 +260,47 @@ msgstr ""
"après un commit sur le svn (« hook post-commit »), impossible d'envoyer des "
"notifications"
#: ../IkiWiki/Render.pm:232 ../IkiWiki/Render.pm:252
#: ../IkiWiki/Render.pm:247 ../IkiWiki/Render.pm:267
#, perl-format
msgid "skipping bad filename %s"
msgstr "Saut du nom de fichier incorrect %s"
#: ../IkiWiki/Render.pm:292
#: ../IkiWiki/Render.pm:307
#, perl-format
msgid "removing old page %s"
msgstr "Suppression de l'ancienne page %s"
#: ../IkiWiki/Render.pm:311
#: ../IkiWiki/Render.pm:326
#, perl-format
msgid "scanning %s"
msgstr "Parcours de %s"
#: ../IkiWiki/Render.pm:320
#: ../IkiWiki/Render.pm:335
#, perl-format
msgid "rendering %s"
msgstr "Rendu de %s"
#: ../IkiWiki/Render.pm:332
#: ../IkiWiki/Render.pm:347
#, perl-format
msgid "rendering %s, which links to %s"
msgstr "Rendu de %s, qui est lié à %s"
#: ../IkiWiki/Render.pm:349
#: ../IkiWiki/Render.pm:364
#, perl-format
msgid "rendering %s, which depends on %s"
msgstr "Rendu de %s, qui dépend de %s"
#: ../IkiWiki/Render.pm:387
#: ../IkiWiki/Render.pm:402
#, perl-format
msgid "rendering %s, to update its backlinks"
msgstr "Rendu de %s, afin de mettre à jour ses rétroliens"
#: ../IkiWiki/Render.pm:399
#: ../IkiWiki/Render.pm:414
#, perl-format
msgid "removing %s, no longer rendered by %s"
msgstr "Suppression de %s, qui n'est plus rendu par %s"
#: ../IkiWiki/Render.pm:425
#: ../IkiWiki/Render.pm:440
#, perl-format
msgid "ikiwiki: cannot render %s"
msgstr "ikiwiki : impossible d'effectuer le rendu de %s"
@ -388,7 +388,7 @@ msgstr "Erreur"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
#: ../IkiWiki.pm:527
#: ../IkiWiki.pm:531
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki-gu\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-01 21:27-0500\n"
"POT-Creation-Date: 2007-02-06 15:06-0500\n"
"PO-Revision-Date: 2007-01-11 16:05+0530\n"
"Last-Translator: Kartik Mistry <kartik.mistry@gmail.com>\n"
"Language-Team: Gujarati <team@utkarsh.org>\n"
@ -124,7 +124,7 @@ msgstr "અજાણ્યો ગોઠવણી પ્રકાર %s"
msgid "Discussion"
msgstr "ચર્ચા"
#: ../IkiWiki/Plugin/inline.pm:372
#: ../IkiWiki/Plugin/inline.pm:378
msgid "RPC::XML::Client not found, not pinging"
msgstr "RPC::XML::Client મળ્યું નહી, પિંગ કરવામાં આવતું નથી"
@ -250,47 +250,47 @@ msgid ""
"notifications"
msgstr "REV ગોઠવેલ નથી, svn post-commit hook માંથી ચાલતું નથી, નોંધ મોકલી શકાશે નહી"
#: ../IkiWiki/Render.pm:232 ../IkiWiki/Render.pm:252
#: ../IkiWiki/Render.pm:247 ../IkiWiki/Render.pm:267
#, perl-format
msgid "skipping bad filename %s"
msgstr "ખરાબ ફાઇલ નામ છોડી દે છે %s"
#: ../IkiWiki/Render.pm:292
#: ../IkiWiki/Render.pm:307
#, perl-format
msgid "removing old page %s"
msgstr "જુનાં પાનાં દૂર કરે છે %s"
#: ../IkiWiki/Render.pm:311
#: ../IkiWiki/Render.pm:326
#, perl-format
msgid "scanning %s"
msgstr "%s શોધે છે"
#: ../IkiWiki/Render.pm:320
#: ../IkiWiki/Render.pm:335
#, perl-format
msgid "rendering %s"
msgstr "રેન્ડર કરે છે %s"
#: ../IkiWiki/Render.pm:332
#: ../IkiWiki/Render.pm:347
#, perl-format
msgid "rendering %s, which links to %s"
msgstr "રેન્ડર કરે છે %s, જે %s સાથે જોડાણ ધરાવે છે"
#: ../IkiWiki/Render.pm:349
#: ../IkiWiki/Render.pm:364
#, perl-format
msgid "rendering %s, which depends on %s"
msgstr "રેન્ડર કરે છે %s, જે %s પર આધારિત છે"
#: ../IkiWiki/Render.pm:387
#: ../IkiWiki/Render.pm:402
#, perl-format
msgid "rendering %s, to update its backlinks"
msgstr "રેન્ડર કરે છે %s, તેનાં પાછળનાં જોડાણો સુધારવા માટે"
#: ../IkiWiki/Render.pm:399
#: ../IkiWiki/Render.pm:414
#, perl-format
msgid "removing %s, no longer rendered by %s"
msgstr "દૂર કરે છે %s, હવે %s વડે રેન્ડર કરાતું નથી"
#: ../IkiWiki/Render.pm:425
#: ../IkiWiki/Render.pm:440
#, perl-format
msgid "ikiwiki: cannot render %s"
msgstr "ikiwiki: %s રેન્ડર કરી શકાતું નથી"
@ -375,7 +375,7 @@ msgstr "ક્ષતિ"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
#: ../IkiWiki.pm:527
#: ../IkiWiki.pm:531
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "%s પર શોધાયેલ લુપ %s પર ચલાવે છે %i ઉંડાણ પર"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-01 21:30-0500\n"
"POT-Creation-Date: 2007-02-06 15:59-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -125,7 +125,7 @@ msgstr ""
msgid "Discussion"
msgstr ""
#: ../IkiWiki/Plugin/inline.pm:372
#: ../IkiWiki/Plugin/inline.pm:378
msgid "RPC::XML::Client not found, not pinging"
msgstr ""
@ -251,47 +251,47 @@ msgid ""
"notifications"
msgstr ""
#: ../IkiWiki/Render.pm:232 ../IkiWiki/Render.pm:252
#: ../IkiWiki/Render.pm:247 ../IkiWiki/Render.pm:267
#, perl-format
msgid "skipping bad filename %s"
msgstr ""
#: ../IkiWiki/Render.pm:292
#: ../IkiWiki/Render.pm:307
#, perl-format
msgid "removing old page %s"
msgstr ""
#: ../IkiWiki/Render.pm:311
#: ../IkiWiki/Render.pm:326
#, perl-format
msgid "scanning %s"
msgstr ""
#: ../IkiWiki/Render.pm:320
#: ../IkiWiki/Render.pm:335
#, perl-format
msgid "rendering %s"
msgstr ""
#: ../IkiWiki/Render.pm:332
#: ../IkiWiki/Render.pm:347
#, perl-format
msgid "rendering %s, which links to %s"
msgstr ""
#: ../IkiWiki/Render.pm:349
#: ../IkiWiki/Render.pm:364
#, perl-format
msgid "rendering %s, which depends on %s"
msgstr ""
#: ../IkiWiki/Render.pm:387
#: ../IkiWiki/Render.pm:402
#, perl-format
msgid "rendering %s, to update its backlinks"
msgstr ""
#: ../IkiWiki/Render.pm:399
#: ../IkiWiki/Render.pm:414
#, perl-format
msgid "removing %s, no longer rendered by %s"
msgstr ""
#: ../IkiWiki/Render.pm:425
#: ../IkiWiki/Render.pm:440
#, perl-format
msgid "ikiwiki: cannot render %s"
msgstr ""
@ -376,7 +376,7 @@ msgstr ""
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
#: ../IkiWiki.pm:527
#: ../IkiWiki.pm:531
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr ""

View File

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki 1.37\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-01 21:27-0500\n"
"POT-Creation-Date: 2007-02-06 15:06-0500\n"
"PO-Revision-Date: 2007-01-05 16:33+100\n"
"Last-Translator: Paweł Tęcza <ptecza@net.icm.edu.pl>\n"
"Language-Team: Debian L10n Polish <debian-l10n-polish@lists.debian.org>\n"
@ -129,7 +129,7 @@ msgstr "nieznany sposób sortowania %s"
msgid "Discussion"
msgstr "Dyskusja"
#: ../IkiWiki/Plugin/inline.pm:372
#: ../IkiWiki/Plugin/inline.pm:378
msgid "RPC::XML::Client not found, not pinging"
msgstr "Niezainstalowany moduł RPC::XML::Client, brak możliwości pingowania"
@ -262,47 +262,47 @@ msgstr ""
"Brak możliwości wysłania powiadomień przez post-commit SVN-a z powodu "
"nieustawionego parametru REV"
#: ../IkiWiki/Render.pm:232 ../IkiWiki/Render.pm:252
#: ../IkiWiki/Render.pm:247 ../IkiWiki/Render.pm:267
#, perl-format
msgid "skipping bad filename %s"
msgstr "pomijanie nieprawidłowego pliku %s"
#: ../IkiWiki/Render.pm:292
#: ../IkiWiki/Render.pm:307
#, perl-format
msgid "removing old page %s"
msgstr "usuwanie starej strony %s"
#: ../IkiWiki/Render.pm:311
#: ../IkiWiki/Render.pm:326
#, perl-format
msgid "scanning %s"
msgstr "przeszukiwanie strony %s"
#: ../IkiWiki/Render.pm:320
#: ../IkiWiki/Render.pm:335
#, perl-format
msgid "rendering %s"
msgstr "tworzenie strony %s"
#: ../IkiWiki/Render.pm:332
#: ../IkiWiki/Render.pm:347
#, perl-format
msgid "rendering %s, which links to %s"
msgstr "tworzenie strony %s z odnośnikiem do strony %s"
#: ../IkiWiki/Render.pm:349
#: ../IkiWiki/Render.pm:364
#, perl-format
msgid "rendering %s, which depends on %s"
msgstr "tworzenie strony %s zależącej od strony %s"
#: ../IkiWiki/Render.pm:387
#: ../IkiWiki/Render.pm:402
#, perl-format
msgid "rendering %s, to update its backlinks"
msgstr "tworzenie strony %s w celu aktualizacji jej powrotnych odnośników"
#: ../IkiWiki/Render.pm:399
#: ../IkiWiki/Render.pm:414
#, perl-format
msgid "removing %s, no longer rendered by %s"
msgstr "usuwanie strony %s nie tworzonej już przez %s"
#: ../IkiWiki/Render.pm:425
#: ../IkiWiki/Render.pm:440
#, perl-format
msgid "ikiwiki: cannot render %s"
msgstr "ikiwiki: awaria w trakcie tworzenie strony %s"
@ -389,7 +389,7 @@ msgstr "Błąd"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
#: ../IkiWiki.pm:527
#: ../IkiWiki.pm:531
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "polecenie preprocesora %s wykryte w %s na głębokości %i"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-01 21:27-0500\n"
"POT-Creation-Date: 2007-02-06 15:06-0500\n"
"PO-Revision-Date: 2007-01-10 23:47+0100\n"
"Last-Translator: Daniel Nylander <po@danielnylander.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
@ -124,7 +124,7 @@ msgstr "okänd sorteringstyp %s"
msgid "Discussion"
msgstr "Diskussion"
#: ../IkiWiki/Plugin/inline.pm:372
#: ../IkiWiki/Plugin/inline.pm:378
msgid "RPC::XML::Client not found, not pinging"
msgstr "RPC::XML::Client hittades inte, pingar inte"
@ -254,47 +254,47 @@ msgstr ""
"REV är inte inställt, kör inte från svn post-commit-hook, kan inte skicka "
"notifieringar"
#: ../IkiWiki/Render.pm:232 ../IkiWiki/Render.pm:252
#: ../IkiWiki/Render.pm:247 ../IkiWiki/Render.pm:267
#, perl-format
msgid "skipping bad filename %s"
msgstr "hoppar över felaktigt filnamn %s"
#: ../IkiWiki/Render.pm:292
#: ../IkiWiki/Render.pm:307
#, perl-format
msgid "removing old page %s"
msgstr "tar bort gammal sida %s"
#: ../IkiWiki/Render.pm:311
#: ../IkiWiki/Render.pm:326
#, perl-format
msgid "scanning %s"
msgstr "söker av %s"
#: ../IkiWiki/Render.pm:320
#: ../IkiWiki/Render.pm:335
#, perl-format
msgid "rendering %s"
msgstr "ritar upp %s"
#: ../IkiWiki/Render.pm:332
#: ../IkiWiki/Render.pm:347
#, perl-format
msgid "rendering %s, which links to %s"
msgstr "ritar upp %s, vilken länkar till %s"
#: ../IkiWiki/Render.pm:349
#: ../IkiWiki/Render.pm:364
#, perl-format
msgid "rendering %s, which depends on %s"
msgstr "ritar upp %s, vilken är beroende av %s"
#: ../IkiWiki/Render.pm:387
#: ../IkiWiki/Render.pm:402
#, perl-format
msgid "rendering %s, to update its backlinks"
msgstr "ritar upp %s, för att uppdatera dess bakåtlänkar"
#: ../IkiWiki/Render.pm:399
#: ../IkiWiki/Render.pm:414
#, perl-format
msgid "removing %s, no longer rendered by %s"
msgstr "tar bort %s, som inte längre ritas upp av %s"
#: ../IkiWiki/Render.pm:425
#: ../IkiWiki/Render.pm:440
#, perl-format
msgid "ikiwiki: cannot render %s"
msgstr "ikiwiki: kan inte rita upp %s"
@ -379,7 +379,7 @@ msgstr "Fel"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
#: ../IkiWiki.pm:527
#: ../IkiWiki.pm:531
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "%s förbehandlingsslinga detekterades på %s, djup %i"

View File

@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2007-02-01 21:27-0500\n"
"POT-Creation-Date: 2007-02-06 15:06-0500\n"
"PO-Revision-Date: 2007-01-13 15:31+1030\n"
"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
@ -127,7 +127,7 @@ msgstr "kiểu sắp xếp không rõ %s"
msgid "Discussion"
msgstr "Thảo luận"
#: ../IkiWiki/Plugin/inline.pm:372
#: ../IkiWiki/Plugin/inline.pm:378
msgid "RPC::XML::Client not found, not pinging"
msgstr "Không tìm thấy RPC::XML::Client nên không gửi gói tin ping"
@ -254,47 +254,47 @@ msgid ""
msgstr ""
"Chưa đặt REV, không chạy từ móc sau gài vào nên không thể gửi thông báo"
#: ../IkiWiki/Render.pm:232 ../IkiWiki/Render.pm:252
#: ../IkiWiki/Render.pm:247 ../IkiWiki/Render.pm:267
#, perl-format
msgid "skipping bad filename %s"
msgstr "đang bỏ qua tên tập tin sai %s"
#: ../IkiWiki/Render.pm:292
#: ../IkiWiki/Render.pm:307
#, perl-format
msgid "removing old page %s"
msgstr "đang gỡ bỏ trang cũ %s"
#: ../IkiWiki/Render.pm:311
#: ../IkiWiki/Render.pm:326
#, perl-format
msgid "scanning %s"
msgstr "đang quét %s"
#: ../IkiWiki/Render.pm:320
#: ../IkiWiki/Render.pm:335
#, perl-format
msgid "rendering %s"
msgstr "đang vẽ %s"
#: ../IkiWiki/Render.pm:332
#: ../IkiWiki/Render.pm:347
#, perl-format
msgid "rendering %s, which links to %s"
msgstr "đang vẽ %s mà liên kết tới %s"
#: ../IkiWiki/Render.pm:349
#: ../IkiWiki/Render.pm:364
#, perl-format
msgid "rendering %s, which depends on %s"
msgstr "đang vẽ %s mà phụ thuộc vào %s"
#: ../IkiWiki/Render.pm:387
#: ../IkiWiki/Render.pm:402
#, perl-format
msgid "rendering %s, to update its backlinks"
msgstr "đang vẽ %s để cập nhật các liên kết ngược của nó"
#: ../IkiWiki/Render.pm:399
#: ../IkiWiki/Render.pm:414
#, perl-format
msgid "removing %s, no longer rendered by %s"
msgstr "đang gỡ bỏ %s, không còn được vẽ lại bởi %s"
#: ../IkiWiki/Render.pm:425
#: ../IkiWiki/Render.pm:440
#, perl-format
msgid "ikiwiki: cannot render %s"
msgstr "ikiwiki: không thể vẽ %s"
@ -380,7 +380,7 @@ msgstr "Lỗi"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
#: ../IkiWiki.pm:527
#: ../IkiWiki.pm:531
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "vòng lặp tiền xử lý %s được phát hiện trên %s ở độ sâu %i"

View File

@ -1,29 +1,34 @@
#!/usr/bin/perl
use warnings;
use strict;
use Test::More tests => 35;
use Test::More tests => 40;
BEGIN { use_ok("IkiWiki"); }
ok(pagespec_match("foo", "*"));
ok(pagespec_match("page", "?ag?"));
ok(! pagespec_match("page", "?a?g?"));
ok(pagespec_match("foo.png", "*.*"));
ok(! pagespec_match("foo", "*.*"));
ok(pagespec_match("foo", "foo or bar"), "simple list");
ok(pagespec_match("bar", "foo or bar"), "simple list 2");
ok(pagespec_match("foo", "f?? and !foz"));
ok(! pagespec_match("foo", "f?? and !foo"));
ok(! pagespec_match("foo", "* and !foo"));
ok(! pagespec_match("foo", "foo and !foo"));
ok(! pagespec_match("foo.png", "* and !*.*"));
ok(pagespec_match("foo", "(bar or ((meep and foo) or (baz or foo) or beep))"));
ok(pagespec_match("foo", "*", ""));
ok(pagespec_match("page", "?ag?", ""));
ok(! pagespec_match("page", "?a?g?", ""));
ok(pagespec_match("foo.png", "*.*", ""));
ok(! pagespec_match("foo", "*.*", ""));
ok(pagespec_match("foo", "foo or bar", ""), "simple list");
ok(pagespec_match("bar", "foo or bar", ""), "simple list 2");
ok(pagespec_match("foo", "f?? and !foz", ""));
ok(! pagespec_match("foo", "f?? and !foo", ""));
ok(! pagespec_match("foo", "* and !foo", ""));
ok(! pagespec_match("foo", "foo and !foo", ""));
ok(! pagespec_match("foo.png", "* and !*.*", ""));
ok(pagespec_match("foo", "(bar or ((meep and foo) or (baz or foo) or beep))", ""));
ok(! pagespec_match("foo/bar", "./*", "foo"), "relative fail");
ok(! pagespec_match("a/foo", "./*", "a/b"), "relative");
ok(! pagespec_match("a/b/foo", "./*", "a/b"), "relative fail");
ok(! pagespec_match("foo", "./*", "a"), "relative toplevel");
ok(pagespec_match("foo/bar", "*", "baz"), "absolute");
$links{foo}=[qw{bar baz}];
ok(pagespec_match("foo", "link(bar)"));
ok(! pagespec_match("foo", "link(quux)"));
ok(pagespec_match("bar", "backlink(foo)"));
ok(! pagespec_match("quux", "backlink(foo)"));
ok(pagespec_match("foo", "link(bar)", ""));
ok(! pagespec_match("foo", "link(quux)", ""));
ok(pagespec_match("bar", "backlink(foo)", ""));
ok(! pagespec_match("quux", "backlink(foo)", ""));
$IkiWiki::pagectime{foo}=1154532692; # Wed Aug 2 11:26 EDT 2006
$IkiWiki::pagectime{bar}=1154532695; # after