summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2008-10-15 07:12:28 +0200
committerintrigeri <intrigeri@boum.org>2008-10-18 15:49:13 +0200
commit7b7865150f1670e92d6d81ece36902df7028ec97 (patch)
treeb9f67492f26f9d7385d5695aad304e5dd820824f /IkiWiki/Plugin
parent93b316f7c1ec87170882ebf6ebae657f41e5f7e3 (diff)
po plugin: add correct dependencies on pages using OTHERLANGUAGES
Signed-off-by: intrigeri <intrigeri@boum.org>
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/po.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 716aa9151..9a25ff602 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -368,6 +368,18 @@ sub pagetemplate (@) { #{{{
}
if ($template->query(name => "otherlanguages")) {
$template->param(otherlanguages => [otherlanguages($page)]);
+ if (istranslatable($page)) {
+ foreach my $translation (values %{$translations{$page}}) {
+ add_depends($page, $translation);
+ }
+ }
+ elsif (istranslation($page)) {
+ my ($masterpage, $curlang) = ($page =~ /(.*)[.]([a-z]{2})$/);
+ add_depends($page, $masterpage);
+ foreach my $translation (values %{$translations{$masterpage}}) {
+ add_depends($page, $translation);
+ }
+ }
}
} # }}}