X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/769be3d48e5612a73232b868cbd6cd35ab3515df..10af328ff1a4c5da585889c3c580fd5a579dea70:/IkiWiki/Plugin/po.pm diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 1ef332d83..9dc4061ef 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -105,7 +105,7 @@ sub checkconfig () { #{{{ } map { islanguagecode($_) - or error(sprintf(gettext("%s is not a valid language code"), $_)); + or error(sprintf(gettext("%s is not a valid language code"), $_)); } ($config{po_master_language}{code}, keys %{$config{po_slave_languages}}); if (! exists $config{po_translatable_pages} || ! defined $config{po_translatable_pages}) { @@ -115,9 +115,9 @@ sub checkconfig () { #{{{ ! defined $config{po_link_to}) { $config{po_link_to}='default'; } - elsif ($config{po_link_to} != 'default' - && $config{po_link_to} != 'current' - && $config{po_link_to} != 'negotiated') { + elsif (! grep { + $config{po_link_to} eq $_ + } ('default', 'current', 'negotiated')) { warn(sprintf(gettext('po_link_to=%s is not a valid setting, falling back to po_link_to=default'), $config{po_link_to})); $config{po_link_to}='default'; @@ -216,7 +216,7 @@ sub needsbuild () { #{{{ } } if (@pofiles) { - refreshpofiles($file, @pofiles) ; + refreshpofiles($file, @pofiles); map { IkiWiki::rcs_add($_); } @pofiles if ($config{rcs}); $updated_po_files = 1; }