setup => undef,
adminuser => undef,
adminemail => undef,
- plugin => [qw{mdwn inline htmlscrubber passwordauth signinedit lockedit}],
+ plugin => [qw{mdwn inline htmlscrubber passwordauth signinedit
+ lockedit conditional}],
timeformat => '%c',
locale => undef,
sslcookie => 0,
elsif ($word eq "(" || $word eq ")" || $word eq "!") {
$code.=" ".$word;
}
- elsif ($word =~ /^(link|backlink|created_before|created_after|creation_month|creation_year|creation_day)\((.+)\)$/) {
- $code.=" match_$1(\$page, ".safequote($2).")";
+ elsif ($word =~ /^(\w+)\((.*)\)$/) {
+ if (exists $IkiWiki::PageSpec::{"match_$1"}) {
+ $code.=" IkiWiki::PageSpec::match_$1(\$page, ".safequote($2).")";
+ }
+ else {
+ $code.=" 0";
+ }
}
else {
- $code.=" match_glob(\$page, ".safequote($word).", \$from)";
+ $code.=" IkiWiki::PageSpec::match_glob(\$page, ".safequote($word).", \$from)";
}
}
my $page=shift;
my $spec=shift;
my $from=shift;
- if (! defined $from){
- $from = "";
- }
return eval pagespec_translate($spec);
} #}}}
+package IkiWiki::PageSpec;
+
sub match_glob ($$$) { #{{{
my $page=shift;
my $glob=shift;
my $from=shift;
+ if (! defined $from){
+ $from = "";
+ }
# relative matching
if ($glob =~ m!^\./!) {
my $page=shift;
my $link=lc(shift);
- my $links = $links{$page} or return undef;
+ my $links = $IkiWiki::links{$page} or return undef;
foreach my $p (@$links) {
return 1 if lc $p eq $link;
}
my $page=shift;
my $testpage=shift;
- if (exists $pagectime{$testpage}) {
- return $pagectime{$page} < $pagectime{$testpage};
+ if (exists $IkiWiki::pagectime{$testpage}) {
+ return $IkiWiki::pagectime{$page} < $IkiWiki::pagectime{$testpage};
}
else {
return 0;
my $page=shift;
my $testpage=shift;
- if (exists $pagectime{$testpage}) {
- return $pagectime{$page} > $pagectime{$testpage};
+ if (exists $IkiWiki::pagectime{$testpage}) {
+ return $IkiWiki::pagectime{$page} > $IkiWiki::pagectime{$testpage};
}
else {
return 0;
} #}}}
sub match_creation_day ($$) { #{{{
- return ((gmtime($pagectime{shift()}))[3] == shift);
+ return ((gmtime($IkiWiki::pagectime{shift()}))[3] == shift);
} #}}}
sub match_creation_month ($$) { #{{{
- return ((gmtime($pagectime{shift()}))[4] + 1 == shift);
+ return ((gmtime($IkiWiki::pagectime{shift()}))[4] + 1 == shift);
} #}}}
sub match_creation_year ($$) { #{{{
- return ((gmtime($pagectime{shift()}))[5] + 1900 == shift);
+ return ((gmtime($IkiWiki::pagectime{shift()}))[5] + 1900 == shift);
} #}}}
1
--- /dev/null
+#!/usr/bin/perl
+package IkiWiki::Plugin::conditional;
+
+use warnings;
+use strict;
+use IkiWiki;
+use UNIVERSAL;
+
+# Globals used to pass information into the PageSpec functions.
+our ($sourcepage, $destpage);
+
+sub import { #{{{
+ hook(type => "preprocess", id => "if", call => \&preprocess_if);
+} # }}}
+
+sub preprocess_if (@) { #{{{
+ my %params=@_;
+
+ if (! exists $params{test} || ! exists $params{then}) {
+ return "[[if requires \"test\" and \"then\" parameters]]";
+ }
+
+ my $result=0;
+ $sourcepage=$params{page};
+ $destpage=$params{destpage};
+ # An optimisation to avoid needless looping over every page
+ # and adding of dependencies for simple uses of some of the
+ # tests.
+ if ($params{test} =~ /^(enabled|sourcepage|destpage)\((.*)\)$/) {
+ $result=eval "IkiWiki::PageSpec::match_$1(undef, ".
+ IkiWiki::safequote($2).")";
+ }
+ else {
+ add_depends($params{page}, $params{test});
+
+ foreach my $page (keys %pagesources) {
+ if (pagespec_match($page, $params{test}, $params{page})) {
+ $result=1;
+ last;
+ }
+ }
+ }
+ $sourcepage="";
+ $destpage="";
+
+ my $ret;
+ if ($result) {
+ $ret=$params{then};
+ }
+ elsif (exists $params{else}) {
+ $ret=$params{else};
+ }
+ else {
+ $ret="";
+ }
+ return IkiWiki::preprocess($params{page}, $params{destpage}, $ret);
+} # }}}
+
+package IkiWiki::PageSpec;
+
+sub match_enabled ($$) { #{{{
+ shift;
+ my $plugin=shift;
+
+ # test if the plugin is enabled
+ return UNIVERSAL::can("IkiWiki::Plugin::".$plugin, "import");
+} #}}}
+
+sub match_sourcepage ($$) { #{{{
+ shift;
+ my $glob=shift;
+
+ return match_glob($IkiWiki::Plugin::conditional::sourcepage, $glob,
+ $IkiWiki::Plugin::conditional::sourcepage);
+} #}}}
+
+sub match_destpage ($$) { #{{{
+ shift;
+ my $glob=shift;
+
+ return match_glob($IkiWiki::Plugin::conditional::destpage, $glob,
+ $IkiWiki::Plugin::conditional::sourcepage);
+} #}}}
+
+sub match_included ($$) { #{{{
+ return $IkiWiki::Plugin::conditional::sourcepage ne $IkiWiki::Plugin::conditional::destpage;
+} #}}}
+
+1
You can also use [[PreProcessorDirective]]s to do additional cool stuff.
-Also, if the smiley plugin is enabled in your wiki, you can insert
-[[smileys]] and some other useful symbols.
+[[if test="enabled(smiley)" then="""
+Also, because this wiki has the smiley plugin enabled, you can
+insert \[[smileys]] and some other useful symbols.
+"""]]
+ikiwiki (1.43) UNRELEASED; urgency=low
+
+ * Allow plugins to add new types of tests that can be used in PageSpecs.
+ * Add a "conditional" plugin, which allows displaying text if a condition
+ is true. It is enabled by default so conditional can be used in the
+ basewiki.
+ * Use conditionals in the template for plugins, so that plugin pages
+ say if they're currently enabled or not, and in various other places
+ in the wiki.
+
+ -- Joey Hess <joeyh@debian.org> Sun, 11 Feb 2007 20:18:51 -0500
+
ikiwiki (1.42) unstable; urgency=low
* Fix several more missing translations of Discussion.
install and use plugins [[contributed|contrib]] by others.
The [[mdwn]], [[inline]], [[htmlscrubber]], [[passwordauth]],
-[[signinedit]], and [[lockedit]] plugins are enabled by default.
-To enable other plugins, use the `--plugin` switch described in
+[[signinedit]], [[lockedit]], and [[conditional]] plugins are enabled
+by default. To enable other plugins, use the `--plugin` switch described in
[[usage]], or the equivalent `add_plugins` line in [[ikiwiki.setup]].
# Plugin directory
to say, any two or more words capitalised and mashed together are assumed
to be the name of some other page on the wiki, and so become a link.
-If this plugin is enabled, here is a link: SandBox
+If this plugin is enabled, this will be a link: SandBox
[[tag type/link]]
--- /dev/null
+[[template id=plugin name=conditional core=1 included=1 author="[[Joey]]"]]
+[[tag type/format]]
+
+With this plugin, you can make text be conditionally displayed on a page.
+For example:
+
+ \[[if test="enabled(smiley)"
+ then="The smiley plugin is enabled :-)"
+ else="No smiley plugin here.."]]
+
+If the specified `test` succeeds, the `then` text will be displayed,
+otherwise the `else` text will be displayed. The `else` part is optional.
+
+The `then` and `else` values can include any markup that would be allowed
+in the wiki page outside the template. Triple-quoting the values even allows
+quotes to be included.
+
+The `test` is a [[PageSpec]]; if it matches any page in the wiki then it
+succeeds. So you can do things like testing for the existence of a page or
+pages, testing to see if any pages were created in a given month, and so
+on. The regular [[PageSpec]] syntax is expanded with the following
+additional tests:
+
+* enabled(plugin)
+
+ Tests whether the specified plugin is enabled.
+
+* sourcepage(glob)
+
+ Tests whether the glob matches the name of the page that contains the
+ conditional.
+
+* destpage(glob)
+
+ Tests whether the glob matches the name of the page that is being built.
+ That might be different than the name of the page that contains the
+ conditional, if it's being inlined into another page.
+
+* included()
+
+ Tests whether the page is being included onto another page.
[[template id=plugin name=googlemaps author="Christian Mock"]]
[[tag type/special-purpose]]
-[[meta title="googlemaps (third-party plugin)"]]
`googlemaps` is a plugin that allows using the [Google Maps API][2]
from ikiwiki.
[[template id=plugin name=img author="Christian Mock"]]
[[tag type/chrome]]
-[[meta title="img (third-party plugin)"]]
`img` is an enhanced image handling plugin.
[[template id=plugin name=linguas author="Jordà Polo"]]
-[[meta title="linguas (third-party plugin)"]]
Linguas
=======
[[template id=plugin name=navbar author="[[TobiOetiker]]"]]
-[[meta title="navbar (third-party plugin)"]]
-
The Navbar Plugin renders a Navigation Bar into your page. It is based on code
from the sidebar plug in see <http://ikiwiki.kitenet.net/plugins/sidebar.html>
Tobi Oetiker 2006.12.30
-If you are interested in this, drop me a line tobi at oetiker dot ch
\ No newline at end of file
+If you are interested in this, drop me a line tobi at oetiker dot ch
[[template id=plugin name=syntax author="[[VictorMoral]]"]]
[[tag type/chrome type/slow]]
-[[meta title="syntax (third-party plugin)"]]
-
`syntax` is a plugin that add support to ikiwiki for syntax highlighting through the *vim* editor and its perl interface [[cpan Text::VimColor]], so it depends on a vim functional installation.
-[[meta title="table (third-party plugin)"]]
+[[template id=plugin name=table author="[[VictorMoral]]"]]
+[[tag type/format]]
This plugin supplies a `table` [[PreprocessorDirective]] to build html tables from data in CSV (comma-separated values) or DSV (delimiter-separated values) format.
\[[fortune ]]
-If this plugin is enabled, here's a fortune for you:
+[[if test="enabled(fortune)" then="""
+Here's a fortune for you:
----
[[fortune ]]
+"""]]
This plugin lets html pages be used as source pages for the wiki. The
html pages will still be wrapped in the same html template as any other
page, so for best results you should include only the page body in the html
-file. Also, if the htmlscrubber plugin is enabled, the html pages will be
+file. Also, if the [[htmlscrubber]] plugin is enabled, the html pages will be
sanitised like any other page. You can also use standard [[WikiLink]]s etc
in the html pages.
in inches. Both must be specified for the limiting to take effect, otherwise
the map's size is not limited.
-This plugin is included in ikiwiki, but is not enabled by default.
-
-If this plugin is enabled, here is a link map of the index page and all
-pages it links to:
+[[if test="enabled(linkmap)" then="""
+Here is an example link map, of the index page and all pages it links to:
[[linkmap pages="index or (backlink(index) and !*.png)"]]
+"""]
Hint: To limit the map to displaying pages less than a certian level deep,
use a [[PageSpec]] like this: `pages="* and !*/*/*"`
-This plugin is included in ikiwiki, but is not enabled by default.
-
-If this plugin is enabled, here is a page map for the plugins section
-of this wiki:
+[[if test="enabled(map)" then="""
+Here's an example map, for the plugins section of this wiki:
[[map pages="(plugins or plugins/*) and !*/*/*"]]
+"""]]
The field value is treated as HTML entity-escaped text, so you can include
a quote in the text by writing `"` and so on.
-
-If this plugin is enabled, the title of this page will say that it is.
-[[meta title="meta plugin (enabled)"]]
page as linking to it, so will generally count many blog-type pages as
orphans.
-If it is enabled, here's a list of orphaned pages on this wiki:
+[[if test="enabled(orphans)" then="""
+Here's a list of orphaned pages on this wiki:
[[orphans ]]
+"""]]
It's also possible to specify a starting nonterminal for the grammar by
including `symbol="text"` in the directive.
+[[if test="enabled(polygen)" then="""
----
-If this plugin is enabled, and polygen is installed, here are a few notes
-about ikiwiki.
+Here are a few notes about ikiwiki, courtesy of polygen:
Ikiwiki is internally based on a [[polygen grammar="designpatterns"]]
coupled to a [[polygen grammar="designpatterns"]], as described in
<li>[[polygen grammar="reviews"]]</li>
<li>[[polygen grammar="reviews"]]</li>
</ul>
+
+"""]]
rcs\_getctime does nothing except for throwing an error.
See [[about_RCS_backends]] for some more info.
+
+## PageSpec plugins
+
+It's also possible to write plugins that add new functions to
+[[PageSpecs|PageSpec]]. Such a plugin should add a function to the
+IkiWiki::PageSpec package, that is named `match_foo`, where "foo()" is
+how it will be accessed in a [[PageSpec]]. The function will be passed two
+parameters: The name of the page being matched, and the thing to match
+against. It should return true if the page matches.
<span class="infobox">
Plugin: <TMPL_VAR name><br />
Author: <TMPL_VAR author><br />
-Enabled by default: <TMPL_IF core>yes<TMPL_ELSE>no</TMPL_IF><br />
Included in ikiwiki: <TMPL_IF included>yes<TMPL_ELSE>no</TMPL_IF><br />
+Enabled by default: <TMPL_IF core>yes<TMPL_ELSE>no</TMPL_IF><br />
+Currently enabled: [[if test="enabled(<TMPL_VAR name>)" then="yes" else="no"]]<br />
</span>
+[[if test="sourcepage(plugins/contrib/*)" then="""[[meta title="<TMPL_VAR name> (third party plugin)"]]"""]]
>> typing in the if.
>>
>> --[[JoshTriplett]]
+
+This is now completely [[todo/done]]! See [[plugins/conditional]].
+
+--[[Joey]]
msgstr ""
"Project-Id-Version: ikiwiki-bg\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-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"
msgid "usage: ikiwiki [options] source dest"
msgstr "формат: ikiwiki [опции] източник местоназначение"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr ""
"При използване на пареметъра „--cgi” е необходимо да се укаже и "
"местоположението на уикито чрез параметъра „--url”"
-#: ../IkiWiki.pm:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "Грешка"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "открита е циклична завидимост при %s на „%s” на дълбочина %i"
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-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"
msgid "usage: ikiwiki [options] source dest"
msgstr "použití: ikiwiki [volby] zdroj cíl"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
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:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "Chyba"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, 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"
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-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"
msgid "usage: ikiwiki [options] source dest"
msgstr "uso: ikiwiki [opciones] origen destino"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr ""
"Es obligatorio especicar un url al wiki con el parámetro --url si se utiliza "
"el parámetro --cgi"
-#: ../IkiWiki.pm:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "Error"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr ""
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-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"
msgid "usage: ikiwiki [options] source dest"
msgstr "Syntaxe : ikiwiki [options] source destination"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr ""
"Vous devez indiquer une url vers le wiki par --url lors de l'utilisation de "
"--cgi"
-#: ../IkiWiki.pm:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "Erreur"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr ""
msgstr ""
"Project-Id-Version: ikiwiki-gu\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-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"
msgid "usage: ikiwiki [options] source dest"
msgstr "ઉપયોગ: ikiwiki [વિકલ્પો] source dest"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr "જ્યારે --cgi ઉપયોગ કરતાં હોય ત્યારે વીકીનું યુઆરએલ સ્પષ્ટ કરવું જ પડશે"
-#: ../IkiWiki.pm:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "ક્ષતિ"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "%s પર શોધાયેલ લુપ %s પર ચલાવે છે %i ઉંડાણ પર"
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 21:42-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"
msgid "usage: ikiwiki [options] source dest"
msgstr ""
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr ""
-#: ../IkiWiki.pm:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr ""
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr ""
msgstr ""
"Project-Id-Version: ikiwiki 1.37\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-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"
msgid "usage: ikiwiki [options] source dest"
msgstr "użycie: ikiwiki [parametry] źródło cel"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
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:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "Błąd"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "polecenie preprocesora %s wykryte w %s na głębokości %i"
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-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"
msgid "usage: ikiwiki [options] source dest"
msgstr "användning: ikiwiki [flaggor] källa mål"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
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:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "Fel"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, perl-format
msgid "%s preprocessing loop detected on %s at depth %i"
msgstr "%s förbehandlingsslinga detekterades på %s, djup %i"
msgstr ""
"Project-Id-Version: ikiwiki\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2007-02-10 15:26-0500\n"
+"POT-Creation-Date: 2007-02-11 20:35-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"
msgid "usage: ikiwiki [options] source dest"
msgstr "cách sử dụng: ikiwiki [tùy chọn] nguồn đích"
-#: ../IkiWiki.pm:102
+#: ../IkiWiki.pm:103
msgid "Must specify url to wiki with --url when using --cgi"
msgstr ""
"Cần phải xác định địa chỉ URL tới wiki với « --url » khi dùng « --cgi »"
-#: ../IkiWiki.pm:147 ../IkiWiki.pm:148
+#: ../IkiWiki.pm:148 ../IkiWiki.pm:149
msgid "Error"
msgstr "Lỗi"
#. translators: preprocessor directive name,
#. translators: the second a page name, the
#. translators: third a number.
-#: ../IkiWiki.pm:531
+#: ../IkiWiki.pm:532
#, 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"
#!/usr/bin/perl
use warnings;
use strict;
-use Test::More tests => 41;
+use Test::More tests => 42;
BEGIN { use_ok("IkiWiki"); }
ok(pagespec_match("foo", "creation_day(2)"), "day");
ok(! pagespec_match("foo", "creation_day(3)"), "other day");
+ok(! pagespec_match("foo", "no_such_function(foo)"), "foo");
+
# old style globlists
ok(pagespec_match("foo", "foo bar"), "simple list");
ok(pagespec_match("bar", "foo bar"), "simple list 2");