Remove \r or ^M when reading teranslation files. Thanks to Filipe Teixeira for the report.

This commit is contained in:
Darold Gilles 2014-02-05 17:17:01 +01:00
parent a8d5a58277
commit adbc23a034
1 changed files with 1 additions and 0 deletions

View File

@ -737,6 +737,7 @@ sub _init
open(IN, "$self->{Lang}") or die "ERROR: can't open translation file $self->{Lang}, $!\n"; open(IN, "$self->{Lang}") or die "ERROR: can't open translation file $self->{Lang}, $!\n";
while (my $l = <IN>) { while (my $l = <IN>) {
chomp($l); chomp($l);
$l =~ s/\r//gs;
next if ($l =~ /^[\s\t]*#/); next if ($l =~ /^[\s\t]*#/);
next if (!$l); next if (!$l);
my ($key, $str) = split(/\t+/, $l); my ($key, $str) = split(/\t+/, $l);