X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/23f88690092f4434335f0ae4df90fafbf58100eb..7481329bdd11d81c4b3e85a446ab1e4bfcc298c8:/IkiWiki/Plugin/po.pm diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index d920d3648..a79e7d7f0 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -152,7 +152,7 @@ sub checkconfig () { if (ref $config{po_slave_languages} eq 'ARRAY') { foreach my $pair (@{$config{po_slave_languages}}) { my ($code, $name)=splitlangpair($pair); - if (defined $code) { + if (defined $code && ! exists $slavelanguages{$code}) { push @slavelanguages, $code; $slavelanguages{$code} = $name; } @@ -1249,8 +1249,8 @@ sub splitlangpair ($) { if (! defined $code || ! defined $name || ! length $code || ! length $name) { # not a fatal error to avoid breaking if used with web setup - print STDERR sprintf(gettext("%s has invalid syntax: must use CODE|NAME"), - $pair)."\n"; + warn sprintf(gettext("%s has invalid syntax: must use CODE|NAME"), + $pair); } return $code, $name;