summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/po.pm11
-rw-r--r--IkiWiki/Render.pm2
-rw-r--r--doc/plugins/po.mdwn4
3 files changed, 12 insertions, 5 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 33bc2b057..c529828d6 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -35,6 +35,7 @@ sub import { #{{{
hook(type => "filter", id => "po", call => \&filter);
hook(type => "htmlize", id => "po", call => \&htmlize);
hook(type => "pagetemplate", id => "po", call => \&pagetemplate, last => 1);
+ hook(type => "postscan", id => "po", call => \&postscan);
hook(type => "rename", id => "po", call => \&renamepages);
hook(type => "delete", id => "po", call => \&mydelete);
hook(type => "change", id => "po", call => \&change);
@@ -340,6 +341,16 @@ sub pagetemplate (@) { #{{{
}
} # }}}
+sub postscan (@) {
+ my %params = @_;
+ my $page = $params{page};
+
+ # backlinks involve back-dependencies, so that nicepagetitle effects,
+ # such as translation status displayed in links, are updated
+ use IkiWiki::Render;
+ map add_depends($page, $_), keys %{$IkiWiki::backlinks{$page}};
+}
+
# Add the renamed page translations to the list of to-be-renamed pages.
# Save information about master page rename, so that:
# - our delete hook can ignore the translations not renamed already
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index adae9f0d5..0ce972ac7 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -7,7 +7,7 @@ use strict;
use IkiWiki;
use Encode;
-my %backlinks;
+our %backlinks=();
my $backlinks_calculated=0;
sub calculate_backlinks () {
diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn
index 4ce8ad7d9..7d8da987e 100644
--- a/doc/plugins/po.mdwn
+++ b/doc/plugins/po.mdwn
@@ -511,10 +511,6 @@ intrigeri's `meta` branch, the generated links' text is based on the
page titles set with the [[meta|plugins/meta]] plugin. This has to be
merged upstream, though.
-### Backlinks
-
-They are not updated when the source page changes (e.g. meta title).
-
Page formats
------------