Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

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: 39058
Status: resolved
Priority: 0/
Queue: Locale-Maketext-Lexicon

People
Owner: Nobody in particular
Requestors: felix.ostmann [...] thewar.de
Cc:
AdminCc:

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

Attachments
tests-for-new-patch-for-concat-and-tt-FILTER.patch



Subject: concat in loc() works now and TT can now use [% FILTER loc %]
now it is possible to concat strings in loc() and in TT you can use [% FILTER loc %]
Subject: tests-for-new-patch-for-concat-and-tt-FILTER.patch
--- Locale-Maketext-Lexicon-0.68/t/5-extract.t.orig 2008-09-07 02:13:04.000000000 +0200 +++ Locale-Maketext-Lexicon-0.68/t/5-extract.t 2008-09-07 03:23:01.000000000 +0200 @@ -1,7 +1,7 @@ #! /usr/bin/perl -w use lib '../lib'; use strict; -use Test::More tests => 43; +use Test::More tests => 47; use_ok('Locale::Maketext::Extract'); my $Ext = Locale::Maketext::Extract->new; @@ -61,6 +61,12 @@ extract_ok(q(_("","car")) => '', 'ignore empty string'); extract_ok(q(_("0")) => '', 'ignore zero'); +extract_ok(<<'__EXAMPLE__' => 'foo bar baz', 'use FILTER (tt)'); +[% FILTER l -%] +foo bar baz +[%- END %] +__EXAMPLE__ + extract_ok(<<'__EXAMPLE__' => 'foo bar baz', 'trim the string (tt)'); [% |loc -%] foo bar baz @@ -173,6 +179,50 @@ msgstr "" __EXPECTED__ +write_po_ok(<<'__EXAMPLE__' => <<'__EXPECTED__', "concat (heredoc)"); +_('exam'.<<"", 10) +ple1 %1 + +__EXAMPLE__ +#: :1 +#. (10) +msgid "example1 %1\n" +msgstr "" +__EXPECTED__ + +write_po_ok(<<'__EXAMPLE__' => <<'__EXPECTED__', "two _() calls with concat over multiline (heredoc)"); +_('example' . +<<"", 10) +1 %1 + +_(<<"", 5) +example2 %1 + +__EXAMPLE__ +#: :1 +#. (10) +msgid "example1 %1\n" +msgstr "" + +#: :5 +#. (5) +msgid "example2 %1\n" +msgstr "" +__EXPECTED__ + +write_po_ok(<<'__EXAMPLE__' => <<'__EXPECTED__', "i can concat the world!"); +_( +'\$foo' +."\$bar" +.<<'' +\$baz + +) +__EXAMPLE__ +#: :2 +msgid "\\$foo$bar\\$baz\n" +msgstr "" +__EXPECTED__ sub extract_ok { my ($text, $expected, $info, $verbatim) = @_;
Subject: Re: [rt.cpan.org #39058] concat in loc() works now and TT can now use [% FILTER loc %]
Date: Sun, 7 Sep 2008 15:00:16 -0400
To: Felix Antonius Wilhelm Ostmann via RT <bug-Locale-Maketext-Lexicon [...] rt.cpan.org>
From: jesse <jesse [...] fsck.com>
Download (untitled) / with headers
text/plain 2.3k
[Duplicate of 39057] On Sat, Sep 06, 2008 at 09:43:12PM -0400, Felix Antonius Wilhelm Ostmann via RT wrote: Show quoted text
> Sat Sep 06 21:43:04 2008: Request 39058 was acted upon. > Transaction: Ticket created by Sadrak > Queue: Locale-Maketext-Lexicon > Subject: concat in loc() works now and TT can now use [% FILTER loc %] > Broken in: (no value) > Severity: Wishlist > Owner: Nobody > Requestors: felix.ostmann@thewar.de > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=39058 > > > > now it is possible to concat strings in loc() and in TT you can use [% > FILTER loc %]
Show quoted text
> --- Locale-Maketext-Lexicon-0.68/t/5-extract.t.orig 2008-09-07 02:13:04.000000000 +0200 > +++ Locale-Maketext-Lexicon-0.68/t/5-extract.t 2008-09-07 03:23:01.000000000 +0200 > @@ -1,7 +1,7 @@ > #! /usr/bin/perl -w > use lib '../lib'; > use strict; > -use Test::More tests => 43; > +use Test::More tests => 47; > > use_ok('Locale::Maketext::Extract'); > my $Ext = Locale::Maketext::Extract->new; > @@ -61,6 +61,12 @@ > extract_ok(q(_("","car")) => '', 'ignore empty string'); > extract_ok(q(_("0")) => '', 'ignore zero'); > > +extract_ok(<<'__EXAMPLE__' => 'foo bar baz', 'use FILTER (tt)'); > +[% FILTER l -%] > +foo bar baz > +[%- END %] > +__EXAMPLE__ > + > extract_ok(<<'__EXAMPLE__' => 'foo bar baz', 'trim the string (tt)'); > [% |loc -%] > foo bar baz > @@ -173,6 +179,50 @@ > msgstr "" > __EXPECTED__ > > +write_po_ok(<<'__EXAMPLE__' => <<'__EXPECTED__', "concat (heredoc)"); > +_('exam'.<<"", 10) > +ple1 %1 > + > +__EXAMPLE__ > +#: :1 > +#. (10) > +msgid "example1 %1\n" > +msgstr "" > +__EXPECTED__ > + > +write_po_ok(<<'__EXAMPLE__' => <<'__EXPECTED__', "two _() calls with concat over multiline (heredoc)"); > +_('example' . > +<<"", 10) > +1 %1 > + > +_(<<"", 5) > +example2 %1 > + > +__EXAMPLE__ > +#: :1 > +#. (10) > +msgid "example1 %1\n" > +msgstr "" > + > +#: :5 > +#. (5) > +msgid "example2 %1\n" > +msgstr "" > +__EXPECTED__ > + > +write_po_ok(<<'__EXAMPLE__' => <<'__EXPECTED__', "i can concat the world!"); > +_( > +'\$foo' > +."\$bar" > +.<<'' > +\$baz > + > +) > +__EXAMPLE__ > +#: :2 > +msgid "\\$foo$bar\\$baz\n" > +msgstr "" > +__EXPECTED__ > > sub extract_ok { > my ($text, $expected, $info, $verbatim) = @_;
--
Download (untitled) / with headers
text/plain 2.6k
On Sun Sep 07 15:00:25 2008, jesse@fsck.com wrote: Show quoted text
> [Duplicate of 39057] > > > On Sat, Sep 06, 2008 at 09:43:12PM -0400, Felix Antonius Wilhelm > Ostmann via RT wrote:
> > Sat Sep 06 21:43:04 2008: Request 39058 was acted upon. > > Transaction: Ticket created by Sadrak > > Queue: Locale-Maketext-Lexicon > > Subject: concat in loc() works now and TT can now use [% FILTER
> loc %]
> > Broken in: (no value) > > Severity: Wishlist > > Owner: Nobody > > Requestors: felix.ostmann@thewar.de > > Status: new > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=39058 > > > > > > > now it is possible to concat strings in loc() and in TT you can use
> [%
> > FILTER loc %]
>
> > --- Locale-Maketext-Lexicon-0.68/t/5-extract.t.orig 2008-09-07
> 02:13:04.000000000 +0200
> > +++ Locale-Maketext-Lexicon-0.68/t/5-extract.t 2008-09-07
> 03:23:01.000000000 +0200
> > @@ -1,7 +1,7 @@ > > #! /usr/bin/perl -w > > use lib '../lib'; > > use strict; > > -use Test::More tests => 43; > > +use Test::More tests => 47; > > > > use_ok('Locale::Maketext::Extract'); > > my $Ext = Locale::Maketext::Extract->new; > > @@ -61,6 +61,12 @@ > > extract_ok(q(_("","car")) => '',
> 'ignore empty string');
> > extract_ok(q(_("0")) => '',
> 'ignore zero');
> > > > +extract_ok(<<'__EXAMPLE__' => 'foo bar baz', 'use
> FILTER (tt)');
> > +[% FILTER l -%] > > +foo bar baz > > +[%- END %] > > +__EXAMPLE__ > > + > > extract_ok(<<'__EXAMPLE__' => 'foo bar baz',
> 'trim the string (tt)');
> > [% |loc -%] > > foo bar baz > > @@ -173,6 +179,50 @@ > > msgstr "" > > __EXPECTED__ > > > > +write_po_ok(<<'__EXAMPLE__' => <<'__EXPECTED__',
> "concat (heredoc)");
> > +_('exam'.<<"", 10) > > +ple1 %1 > > + > > +__EXAMPLE__ > > +#: :1 > > +#. (10) > > +msgid "example1 %1\n" > > +msgstr "" > > +__EXPECTED__ > > + > > +write_po_ok(<<'__EXAMPLE__' => <<'__EXPECTED__',
> "two _() calls with concat over multiline (heredoc)");
> > +_('example' . > > +<<"", 10) > > +1 %1 > > + > > +_(<<"", 5) > > +example2 %1 > > + > > +__EXAMPLE__ > > +#: :1 > > +#. (10) > > +msgid "example1 %1\n" > > +msgstr "" > > + > > +#: :5 > > +#. (5) > > +msgid "example2 %1\n" > > +msgstr "" > > +__EXPECTED__ > > + > > +write_po_ok(<<'__EXAMPLE__' => <<'__EXPECTED__', "i
> can concat the world!");
> > +_( > > +'\$foo' > > +."\$bar" > > +.<<'' > > +\$baz > > + > > +) > > +__EXAMPLE__ > > +#: :2 > > +msgid "\\$foo$bar\\$baz\n" > > +msgstr "" > > +__EXPECTED__ > > > > sub extract_ok { > > my ($text, $expected, $info, $verbatim) = @_;
>


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.