From f0e796d9a12d5f78fb89f312f138c1a0bb6f0141 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Tue, 11 Nov 2008 16:04:40 +0100 Subject: po(change): fix uninitialized variables when running IkiWiki::refresh() Signed-off-by: intrigeri --- IkiWiki/Plugin/po.pm | 4 ++++ doc/plugins/po.mdwn | 12 ------------ 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 739564c6b..a8d9b9cd9 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -362,6 +362,10 @@ sub change(@) { #{{{ resettranslationscache(); # Trigger a wiki refresh. require IkiWiki::Render; + # without preliminary saveindex/loadindex, refresh() + # complains about a lot of uninitialized variables + IkiWiki::saveindex(); + IkiWiki::loadindex(); IkiWiki::refresh(); IkiWiki::saveindex(); } diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index d27b5af1d..544c7ef62 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -463,18 +463,6 @@ gettext/po4a rough corners into the Pot file, and let it propagate; should be fixed in `773de05a7a1ee68d2bed173367cf5e716884945a`, time will tell. -When committing a translatable page to the repository, msgmerge -happens and then: - - Use of uninitialized value $page in pattern match (m//) at /usr/local/share/perl/5.10.0/IkiWiki.pm line 624. - Use of uninitialized value $p in hash element at /usr/local/share/perl/5.10.0/IkiWiki/Render.pm line 423. - Use of uninitialized value $file in string eq at /usr/local/share/perl/5.10.0/IkiWiki/Render.pm line 444. - Use of uninitialized value $page in pattern match (m//) at /usr/local/share/perl/5.10.0/IkiWiki.pm line 624. - -And then tons of: - Use of uninitialized value $page in pattern match (m//) at /usr/local/share/perl/5.10.0/IkiWiki.pm line 1860. - Use of uninitialized value $page in concatenation (.) or string at /usr/local/share/perl/5.10.0/IkiWiki.pm line 1869. - Page titles in links -------------------- -- cgit v1.2.3