]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/po.pm
po: Detect if nowrapi18n can't be passed to po4a, and warn about the old version...
[git.ikiwiki.info.git] / IkiWiki / Plugin / po.pm
index e9dc9dd8cfc2ba7dd0ed5291434c48a795bde50a..52677076ec02cde9a9465485200c1e2ec98c3e84 100644 (file)
@@ -10,7 +10,12 @@ use warnings;
 use strict;
 use IkiWiki 3.00;
 use Encode;
-use Locale::Po4a::Common qw(nowrapi18n !/.*/);
+eval q{use Locale::Po4a::Common qw(nowrapi18n !/.*/)};
+if ($@) {
+       print STDERR gettext("warning: Old po4a detected! Recommend upgrade to 0.35.")."\n";
+       eval q{use Locale::Po4a::Common qw(!/.*/)};
+       die $@ if $@;
+}
 use Locale::Po4a::Chooser;
 use Locale::Po4a::Po;
 use File::Basename;