diff options
author | Joey Hess <joey@kitenet.net> | 2010-04-24 16:46:30 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-04-24 16:46:30 -0400 |
commit | 4321b301398f6e5e034bfb7b1ab5a996d42ddbb5 (patch) | |
tree | 456a0dcc4f528d57fa4854e4cea904fceb6d2969 | |
parent | c2656f08f3a3671b0ba7dc861d53347c7f695ec1 (diff) | |
parent | cce3042457facddfe5100327dbe98445d9d12b7c (diff) |
Merge branch 'master' into templatemove
-rw-r--r-- | IkiWiki/Plugin/po.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 759e812e6..7c979ebca 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -567,7 +567,7 @@ sub mybestlink ($$) { my $link=shift; return $origsubs{'bestlink'}->($page, $link) - if $config{po_link_to} eq "default"; + if defined $config{po_link_to} && $config{po_link_to} eq "default"; my $res=$origsubs{'bestlink'}->(masterpage($page), $link); my @caller = caller(1); @@ -585,7 +585,7 @@ sub mybeautify_urlpath ($) { my $url=shift; my $res=$origsubs{'beautify_urlpath'}->($url); - if ($config{po_link_to} eq "negotiated") { + if (defined $config{po_link_to} && $config{po_link_to} eq "negotiated") { $res =~ s!/\Qindex.$config{po_master_language}{code}.$config{htmlext}\E$!/!; $res =~ s!/\Qindex.$config{htmlext}\E$!/!; map { @@ -729,6 +729,7 @@ sub istranslatablefile ($) { my $type=pagetype($file); return 0 if ! defined $type || $type eq 'po'; return 0 if $file =~ /\.pot$/; + return 0 if ! defined $config{po_translatable_pages}; return 1 if pagespec_match(pagename($file), $config{po_translatable_pages}); return; } |