summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-01-25 15:39:58 -0400
committerJoey Hess <joey@kitenet.net>2011-01-25 15:39:58 -0400
commit726e0de7d7a9044c8202f777cf2d70af2ed3abce (patch)
treeb9f52ace0c42d8d28138f606b9ff9080dc708e7b
parent7626ebeb64a02cc2d914ad2df3d5361d8ceeaae3 (diff)
run po checkconfig last so it can see underlays added in other checkconfig hooks
-rw-r--r--IkiWiki/Plugin/po.pm3
-rw-r--r--doc/bugs/po:_might_not_add_translated_versions_of_all_underlays.mdwn6
2 files changed, 8 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 9ed4a1adb..4f8d5036e 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -38,7 +38,8 @@ memoize("percenttranslated");
sub import {
hook(type => "getsetup", id => "po", call => \&getsetup);
- hook(type => "checkconfig", id => "po", call => \&checkconfig);
+ hook(type => "checkconfig", id => "po", call => \&checkconfig,
+ last => 1);
hook(type => "needsbuild", id => "po", call => \&needsbuild);
hook(type => "scan", id => "po", call => \&scan, last => 1);
hook(type => "filter", id => "po", call => \&filter);
diff --git a/doc/bugs/po:_might_not_add_translated_versions_of_all_underlays.mdwn b/doc/bugs/po:_might_not_add_translated_versions_of_all_underlays.mdwn
index 66d16bf23..82aed400d 100644
--- a/doc/bugs/po:_might_not_add_translated_versions_of_all_underlays.mdwn
+++ b/doc/bugs/po:_might_not_add_translated_versions_of_all_underlays.mdwn
@@ -6,5 +6,11 @@ of underlays added by a plugin that comes after it in `$config{add_plugins}`;
for instance, if you have `add_plugins => qw(po smiley)`, you'll probably
not get the translated versions of `smileys.mdwn`. (I haven't tested this.)
+> It doesn't happen because smiley adds the underlay unconditionally on
+> import. Which is really more usual.
+
To see them all, `po` should use `last => 1` when registering the hook.
--[[smcv]]
+
+> At least all that don't last their hooks too! But, added, since
+> it will make the problem much less likely to occur. --[[Joey]] [[done]]