From 10c4e858b8a090917d7a7dd41ef5fa08254ee935 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Wed, 12 Nov 2008 21:15:33 +0100 Subject: [PATCH] po(change): flush Memoize cache, to fix bug after rename/remove Signed-off-by: intrigeri --- IkiWiki/Plugin/po.pm | 6 ++++++ doc/plugins/po.mdwn | 6 ++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 1212181ca..5e2aea691 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -364,6 +364,7 @@ sub change(@) { #{{{ # Reinitialize module's private variables. resetalreadyfiltered(); resettranslationscache(); + flushmemoizecache(); # Trigger a wiki refresh. require IkiWiki::Render; # without preliminary saveindex/loadindex, refresh() @@ -658,6 +659,11 @@ sub resettranslationscache() { #{{{ undef %translations; } #}}} +sub flushmemoizecache() { #{{{ + Memoize::flush_cache("_istranslation"); + Memoize::flush_cache("percenttranslated"); +} #}}} + sub urlto_with_orig_beautiful_urlpath($$) { #{{{ my $to=shift; my $from=shift; diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index 14ce07866..209b573cb 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -592,10 +592,8 @@ Robustness tests ### Creating pages - creating a master page via RCS: **OK** -- creating a master page via CGI: **FIXME** the new page's - translations are rendered as if they weren't translations (i.e. - `targetpage=newpage.LL/index.html`, and no de-gettext-isation); - touch'ing `newpage.mdwn` + refresh does not fix it, rebuild does. +- creating a master page via CGI: **FIXME** the new master page has no + `otherlanguages` links until refreshed once more ### Deleting pages -- 2.44.0