summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorintrigeri <intrigeri@boum.org>2008-10-18 21:47:49 +0200
committerintrigeri <intrigeri@boum.org>2008-10-18 21:47:49 +0200
commit629968fc89bced6727981c0a1138072631751fee (patch)
tree5bab1babf88524edb46a90a0a0715ffd2aab7e09 /IkiWiki
parenta0deb3038c45c066e2c0c3acb8c6c4a93ca3301d (diff)
po plugin(refreshpot): prevent PO references to be written
... else we can fall into some kind of nasty infinite loop, when two ikiwiki instances don't store their working copy of the repository at the same place: every POT file update in one repository would trigger an update of the same POT file in the others repository, and so on. Signed-off-by: intrigeri <intrigeri@boum.org>
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/po.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 07896d95a..26bd893a9 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -9,6 +9,7 @@ use strict;
use IkiWiki 2.00;
use Encode;
use Locale::Po4a::Chooser;
+use Locale::Po4a::Po;
use File::Basename;
use File::Copy;
use File::Spec;
@@ -119,6 +120,12 @@ sub refreshpot ($) { #{{{
$doc->{TT}{utf_mode} = 1;
$doc->{TT}{file_in_charset} = 'utf-8';
$doc->{TT}{file_out_charset} = 'utf-8';
+ # let's cheat a bit to force porefs option to be passed to Locale::Po4a::Po;
+ # this is undocument use of internal Locale::Po4a::TransTractor's data,
+ # compulsory since this module prevents us from using the porefs option.
+ my %po_options = ('porefs' => 'none');
+ $doc->{TT}{po_out}=Locale::Po4a::Po->new(\%po_options);
+ # do the actual work
$doc->parse;
$doc->writepo($potfile);
} #}}}