- for (my $i=0; $i<@{$config{po_slave_languages}}; $i = $i + 2) {
- $slaves{$config{po_slave_languages}->[$i]} = $config{po_slave_languages}->[$i + 1];
- push @slavelanguages, $config{po_slave_languages}->[$i];
+ foreach my $pair (@{$config{po_slave_languages}}) {
+ my ($code, $name) = ( $pair =~ /^([a-z]{2})\|(.+)$/ );
+ if (!defined $code || !defined $name) {
+ error(sprintf(gettext("%s has invalid syntax: must use CODE|NAME"),
+ $pair));
+ }
+ $slaves{$code} = $name;
+ push @slavelanguages, $code;
+