X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/23f88690092f4434335f0ae4df90fafbf58100eb..f5c270b11dbfb2589df21388a07f55002e076d3c:/IkiWiki/Plugin/po.pm?ds=sidebyside 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;