Package: liblocale-maketext-lexicon-perl Version: 0.49-1 Severity: normal Subject: liblocale-maketext-lexicon-perl: ::Run -f option non-working Package: liblocale-maketext-lexicon-perl Version: 0.49-1 Severity: normal Tags: patch
Hi, I am learning how to use Locale::Maketext for internationalizing my application. I am using Template Toolkit and Locale::Maketext. I use Locale::Maketext::Extract::Run to extract translatable strings. Since I have multiple files to translate (it's a web application with a lot of templates), I am using the -f option in the following way: (wrapped) perl /usr/share/doc/liblocale-maketext-lexicon-perl/examples/xgettext.pl -f - -o po/en.po < list but no file gets processed. The cause is that the filenames aren't chomp'ed when read from supplied file and of cource none of them is found. The one-line-patch (attached) adds the missing chomp and -f works again. Thanks for packaginh Locale::Maketext::Lexicon, dam -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (101, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.11+dam.2 Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8) Versions of packages liblocale-maketext-lexicon-perl depends on: ii perl 5.8.4-8 Larry Wall's Practical Extraction ii perl-modules [liblocale-maket 5.8.4-8 Core Perl modules -- no debconf information *** /tmp/chomp.patch --- /usr/share/perl5/Locale/Maketext/Extract/Run.pm 2005-04-13 18:45:19.000000000 +0300 +++ /usr/share/perl5/Locale/Maketext/Extract/Run.pm.patched 2005-05-05 15:17:36.000000000 +0300 @@ -37,6 +37,7 @@ foreach my $file (@{$opts{f}||[]}) { open FILE, $file or die "Cannot open $file: $!"; while (<FILE>) { + chomp; push @ARGV, $_ if -r and !-d; } } -- System Information: Debian Release: 3.1 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (101, 'experimental') Architecture: i386 (i686) Kernel: Linux 2.6.11+dam.2 Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8) Versions of packages liblocale-maketext-lexicon-perl depends on: ii perl 5.8.4-8 Larry Wall's Practical Extraction ii perl-modules [liblocale-maket 5.8.4-8 Core Perl modules -- no debconf information -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]