From ef35ba1feacbebfaba410bb7e9c99bf617e5f827 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 13 Feb 2004 17:33:04 +0000 Subject: fix CREDITS parsing due to new format (#7482) --- credits2po | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'credits2po') diff --git a/credits2po b/credits2po index e10dc527..b1b65d49 100755 --- a/credits2po +++ b/credits2po @@ -15,12 +15,18 @@ use lib qw(/usr/lib/libDrakX); use common; { ), - (map { - my ($contributor, $descr) = split(', ', $_, 2); - chomp($descr); - $descr =~ s/(["@$])/\\$1/g; - qq(\tN("$contributor") => N("$descr"),); - } cat_(glob("/usr/share/doc/mandrake-release-*/CREDITS"))), + (map { + if (/^\s*\* (.*)$/) { + my ($contributor, $descr) = split(', ', $1); + #if (/^\s*\* (.*), (.*)/) { + chomp($descr); + $descr =~ s/(["@$])/\\$1/g; + join('', qq(\tN("$contributor") => ), $descr ? qq(N("$descr"),) : '"",'); + } else { + chomp; + qq(\tN("$_") => "",); + } + } grep { $_ ne "\n" } cat_(glob("/usr/share/doc/mandrake-release-*/CREDITS"))), "}" ) ); -- cgit v1.2.1