Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Locale-Maketext-Lexicon CPAN distribution.

Report information
The Basics
Id: 42000
Status: resolved
Priority: 0/
Queue: Locale-Maketext-Lexicon

People
Owner: Nobody in particular
Requestors: johannes [...] plunien.de
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.76
Fixed in: (no value)



Subject: Locale::Maketext::Extract::Plugin::FormFu broken
Download (untitled) / with headers
text/plain 512b
Hi, current version of Locale::Maketext::Extract::Plugin::FormFu doesnt work as expected. We're currently working on localization of MojoMojo and had problems using FormFu extractor plugin. I'll attach MojoMojo FormFu config files so you have something to test against: xgettext.pl -D ./forms -o test.po I'll also attach some diff which fixes the issue. But it's only tested with YAML config files for FormFu. The current version just includes the whole YAML file into the .po file :( Kind regards, Johannes
Subject: mojomojo-root-forms.tar.bz2
Download mojomojo-root-forms.tar.bz2
application/octet-stream 1.3k

Message body not shown because it is not plain text.

Subject: locale-maketext-extract-plugin-formfu.diff
--- lib/Locale/Maketext/Extract/Plugin/FormFu.pm 2008-12-28 17:57:47.000000000 +0100 +++ /opt/perl/lib/site_perl/5.8.8/Locale/Maketext/Extract/Plugin/FormFu.pm 2008-09-21 20:21:54.000000000 +0200 @@ -47,14 +47,14 @@ sub extract { my $self = shift; - my $content = shift; - my $lno = 0; - foreach my $line (split /\n/, $content) { - $lno++; - if (my ($str) = $line =~ /.*?_loc[:]*\s+(.*?)$/) { - $self->add_entry($str, $lno); - } + local $_ = shift; + my$line = 1; + while (m/\G(.*?_loc:\s+(.*))/sg) { + my ($str) = $2; + $line += ( () = ($1 =~ /\n/g) ); # cryptocontext! + $self->add_entry($str, $line ); } + } =head1 SEE ALSO
Download (untitled) / with headers
text/plain 188b
Show quoted text
> I'll also attach some diff which fixes the issue. But it's only tested > with YAML config files for FormFu.
sorry, i managed to f***k up the diff in two ways. Here's the good version...
--- /opt/perl/lib/site_perl/5.8.8/Locale/Maketext/Extract/Plugin/FormFu.pm 2008-09-21 20:21:54.000000000 +0200 +++ lib/Locale/Maketext/Extract/Plugin/FormFu.pm 2008-12-28 18:18:43.000000000 +0100 @@ -47,14 +47,14 @@ sub extract { my $self = shift; - local $_ = shift; - my$line = 1; - while (m/\G(.*?_loc:\s+(.*))/sg) { - my ($str) = $2; - $line += ( () = ($1 =~ /\n/g) ); # cryptocontext! - $self->add_entry($str, $line ); + my $content = shift; + my $lno = 0; + foreach my $line (split /\n/, $content) { + $lno++; + if (my ($str) = $line =~ /.*?_loc[:]*\s+['"]*(.*?)['"]*$/) { + $self->add_entry($str, $lno); + } } - } =head1 SEE ALSO
Download (untitled) / with headers
text/plain 325b
On Sun Dec 28 12:20:58 2008, PLU wrote: Show quoted text
> > I'll also attach some diff which fixes the issue. But it's only tested > > with YAML config files for FormFu.
> > sorry, i managed to f***k up the diff in two ways. Here's the good > version...
I've rewritten the FormFu parser to use YAML.pm and released it in version 0.77.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.