* 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.
master
joey 2007-02-12 02:44:47 +00:00
parent fe62c0ff20
commit 479c7a1ea6
33 changed files with 247 additions and 83 deletions

View File

@ -65,7 +65,8 @@ sub defaultconfig () { #{{{
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,
@ -850,11 +851,16 @@ sub pagespec_translate ($) { #{{{
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)";
}
}
@ -865,17 +871,19 @@ sub pagespec_match ($$;$) { #{{{
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!^\./!) {
@ -896,7 +904,7 @@ sub match_link ($$) { #{{{
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;
}
@ -911,8 +919,8 @@ sub match_created_before ($$) { #{{{
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;
@ -923,8 +931,8 @@ sub match_created_after ($$) { #{{{
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;
@ -932,15 +940,15 @@ sub match_created_after ($$) { #{{{
} #}}}
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

View File

@ -0,0 +1,89 @@
#!/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

View File

@ -72,5 +72,7 @@ To link to any other web page, or to an email address, you can just put the url
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.
"""]]

12
debian/changelog vendored
View File

@ -1,3 +1,15 @@
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.

View File

@ -8,8 +8,8 @@ There's documentation if you want to [[write]] your own plugins, or you can
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

View File

@ -4,6 +4,6 @@ This plugin makes words in CamelCase be treated as a [[WikiLink]]. That is
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]]

View File

@ -0,0 +1,41 @@
[[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.

View File

@ -1,6 +1,5 @@
[[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.

View File

@ -1,6 +1,5 @@
[[template id=plugin name=img author="Christian Mock"]]
[[tag type/chrome]]
[[meta title="img (third-party plugin)"]]
`img` is an enhanced image handling plugin.

View File

@ -1,5 +1,4 @@
[[template id=plugin name=linguas author="Jordà Polo"]]
[[meta title="linguas (third-party plugin)"]]
Linguas
=======

View File

@ -1,6 +1,4 @@
[[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>
@ -35,4 +33,4 @@ ikiwiki look good anyway, I won't go into details here ...
Tobi Oetiker 2006.12.30
If you are interested in this, drop me a line tobi at oetiker dot ch
If you are interested in this, drop me a line tobi at oetiker dot ch

View File

@ -1,7 +1,5 @@
[[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.

View File

@ -1,4 +1,5 @@
[[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.

View File

@ -6,8 +6,10 @@ Usage:
\[[fortune ]]
If this plugin is enabled, here's a fortune for you:
[[if test="enabled(fortune)" then="""
Here's a fortune for you:
----
[[fortune ]]
"""]]

View File

@ -4,7 +4,7 @@
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.

View File

@ -22,9 +22,8 @@ directive:
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)"]]
"""]

View File

@ -11,9 +11,8 @@ the wiki are mapped.
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 !*/*/*"]]
"""]]

View File

@ -54,6 +54,3 @@ header.
The field value is treated as HTML entity-escaped text, so you can include
a quote in the text by writing `&quot;` and so on.
If this plugin is enabled, the title of this page will say that it is.
[[meta title="meta plugin (enabled)"]]

View File

@ -11,6 +11,8 @@ Note that it takes [[BackLinks]] into account, but does not count inlining a
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 ]]
"""]]

View File

@ -9,10 +9,10 @@ For example:
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
@ -25,3 +25,5 @@ Ikiwiki reviews:
<li>[[polygen grammar="reviews"]]</li>
<li>[[polygen grammar="reviews"]]</li>
</ul>
"""]]

View File

@ -413,3 +413,12 @@ See IkiWiki::RCS::Stub for the full list of functions. It's ok if
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.

View File

@ -1,6 +1,8 @@
<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)"]]"""]]

View File

@ -100,3 +100,7 @@ for the condition itself.
>> typing in the if.
>>
>> --[[JoshTriplett]]
This is now completely [[todo/done]]! See [[plugins/conditional]].
--[[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-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"
@ -376,13 +376,13 @@ msgstr "успешно генериране на %s"
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 "Грешка"
@ -390,7 +390,7 @@ 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"

View File

@ -7,7 +7,7 @@ msgid ""
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"
@ -370,11 +370,11 @@ msgstr "%s byl úspěšně vytvořen"
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"
@ -382,7 +382,7 @@ 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"

View File

@ -7,7 +7,7 @@ msgid ""
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"
@ -379,13 +379,13 @@ msgstr "creado con éxito el programa envoltorio %s"
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"
@ -393,7 +393,7 @@ 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 ""

View File

@ -7,7 +7,7 @@ msgid ""
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"
@ -379,13 +379,13 @@ msgstr "%s a été créé avec succès"
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"
@ -393,7 +393,7 @@ 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 ""

View File

@ -7,7 +7,7 @@ msgid ""
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"
@ -368,11 +368,11 @@ msgstr "સફળતાપૂર્વક પેદા કરેલ છે %s"
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 "ક્ષતિ"
@ -380,7 +380,7 @@ 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 ઉંડાણ પર"

View File

@ -8,7 +8,7 @@ msgid ""
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"
@ -369,11 +369,11 @@ msgstr ""
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 ""
@ -381,7 +381,7 @@ 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 ""

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-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"
@ -380,13 +380,13 @@ msgstr "strona pomyślnie utworzona %s"
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"
@ -394,7 +394,7 @@ 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"

View File

@ -7,7 +7,7 @@ msgid ""
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"
@ -372,11 +372,11 @@ msgstr "generering av %s lyckades"
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"
@ -384,7 +384,7 @@ 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"

View File

@ -6,7 +6,7 @@ msgid ""
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"
@ -372,12 +372,12 @@ msgstr "%s đã được tạo ra"
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"
@ -385,7 +385,7 @@ 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"

View File

@ -1,7 +1,7 @@
#!/usr/bin/perl
use warnings;
use strict;
use Test::More tests => 41;
use Test::More tests => 42;
BEGIN { use_ok("IkiWiki"); }
@ -44,6 +44,8 @@ ok(! pagespec_match("foo", "creation_month(9)"), "other month");
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");