summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/po.pm17
1 files changed, 11 insertions, 6 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 7039f3033..f13093963 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -501,16 +501,21 @@ sub maybe_add_leading_slash ($;$) { #{{{
return $str;
} #}}}
-sub istranslatable ($) { #{{{
- my $page=shift;
-
- $page=~s#^/##;
- my $file=$pagesources{$page};
+sub istranslatablefile ($) { #{{{
+ my $file=shift;
return 0 unless defined $file;
return 0 if (defined pagetype($file) && pagetype($file) eq 'po');
return 0 if $file =~ /\.pot$/;
- return 1 if pagespec_match($page, $config{po_translatable_pages});
+ return 1 if pagespec_match(pagename($file), $config{po_translatable_pages});
+ return;
+} #}}}
+
+sub istranslatable ($) { #{{{
+ my $page=shift;
+
+ $page=~s#^/##;
+ return 1 if istranslatablefile($pagesources{$page});
return;
} #}}}